diff options
author | Bob Gilligan <gilligan@vyatta.com> | 2009-05-28 14:52:49 -0700 |
---|---|---|
committer | Bob Gilligan <gilligan@vyatta.com> | 2009-05-28 14:52:49 -0700 |
commit | 2afd98987f8fd35019cb0b816aea183be0e74e52 (patch) | |
tree | faa641d39bed176b926118a0d0937f4b09b59821 | |
parent | f209201a04b37c570690fc509042eff049a418ce (diff) | |
parent | ea515c9e264270f8d68798979be5a79902c0b19e (diff) | |
download | vyatta-cfg-2afd98987f8fd35019cb0b816aea183be0e74e52.tar.gz vyatta-cfg-2afd98987f8fd35019cb0b816aea183be0e74e52.zip |
Merge branch 'jenner' of http://git.vyatta.com/vyatta-cfg into jenner
-rw-r--r-- | debian/changelog | 12 | ||||
-rw-r--r-- | src/common/unionfs.c | 46 | ||||
-rw-r--r-- | templates/priority | 4 |
3 files changed, 58 insertions, 4 deletions
diff --git a/debian/changelog b/debian/changelog index 0f1de74..fb8ec25 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,15 @@ +vyatta-cfg (0.14.88) unstable; urgency=low + + * fix for bug 4212 and bug 4434. + + -- slioch <slioch@eng-140.vyatta.com> Thu, 28 May 2009 13:26:05 -0700 + +vyatta-cfg (0.14.87) unstable; urgency=low + + * Fix ordering of ospf + + -- Stephen Hemminger <stephen.hemminger@vyatta.com> Wed, 27 May 2009 16:01:23 -0700 + vyatta-cfg (0.14.86) unstable; urgency=low * Bugfix 4428: Disable copybreak in selected drivers to improve diff --git a/src/common/unionfs.c b/src/common/unionfs.c index b0128c3..b259b5d 100644 --- a/src/common/unionfs.c +++ b/src/common/unionfs.c @@ -273,8 +273,12 @@ retrieve_data(char* rel_data_path, GNode *node, char* root, NODE_OPERATION op) //finally iterate over valid child directory entries boolean processed = FALSE; + boolean whiteout_file_found = FALSE; struct dirent *dirp = NULL; while ((dirp = readdir(dp)) != NULL) { + if (strcmp(dirp->d_name,WHITEOUT_FILE) == 0) { + whiteout_file_found = TRUE; + } if (strcmp(dirp->d_name, ".") != 0 && strcmp(dirp->d_name, "..") != 0 && strcmp(dirp->d_name, MODIFIED_FILE) != 0 && @@ -345,8 +349,48 @@ retrieve_data(char* rel_data_path, GNode *node, char* root, NODE_OPERATION op) ((struct VyattaNode*)node->data)->_data._operation = K_CREATE_OP; } } - closedir(dp); + + //if there is a ".wh.__dir_opaque" and were not already + //iterating the active dir then test for a hidden deletion + if (whiteout_file_found == TRUE && op != K_DEL_OP) { + //scan active dir for entry not found in tmp + DIR *dp_wo; + //build active directory for this... + char active_data_path[MAX_LENGTH_DIR_PATH]; + sprintf(active_data_path,"%s%s",get_adirp(),rel_data_path); + if ((dp_wo = opendir(active_data_path)) != NULL) { + if (g_debug) { + //could also be a terminating value now + syslog(LOG_DEBUG,"unionfs::retrieve_data(), failed to open directory: %s\n", active_data_path); + printf("unionfs::retrieve_data(), failed to open directory: %s\n", active_data_path); + } + struct dirent *dirp_wo = NULL; + while ((dirp_wo = readdir(dp_wo)) != NULL) { + char tmp_new_data_path[MAX_LENGTH_DIR_PATH]; + sprintf(tmp_new_data_path,"%s/%s/%s",get_cdirp(),rel_data_path,dirp_wo->d_name); + struct stat s; + if (lstat(tmp_new_data_path,&s) != 0) { + //create new node and insert... + struct VyattaNode *vn = calloc(1,sizeof(struct VyattaNode)); + char *data_buf = malloc(MAX_LENGTH_DIR_PATH*sizeof(char)); + strcpy(data_buf,dirp_wo->d_name); + vn->_data._name = data_buf; + vn->_data._value = FALSE; + vn->_data._operation = K_DEL_OP; + vn->_priority = LOWEST_PRIORITY; + + GNode *new_node = g_node_new(vn); + new_node = insert_sibling_in_order(node,new_node); + char new_data_path[MAX_LENGTH_DIR_PATH]; + sprintf(new_data_path,"%s/%s",rel_data_path,dirp_wo->d_name); + retrieve_data(new_data_path,new_node,root,K_DEL_OP); + } + } + closedir(dp_wo); + } + } + return; } diff --git a/templates/priority b/templates/priority index a24f03d..3605751 100644 --- a/templates/priority +++ b/templates/priority @@ -91,8 +91,6 @@ 210 firewall/ipv6-name/node.tag 210 firewall/ipv6-modify/node.tag 215 firewall -300 protocols/ospf -301 protocols/ospfv3 310 interfaces/bridge 315 interfaces/bonding 318 interfaces/ethernet @@ -119,7 +117,7 @@ 530 protocols/bgp/node.tag/timers 610 protocols/ospf/parameters 620 protocols/ospf -630 protocols/ospfv3/area +630 protocols/ospfv3/parameters 640 protocols/ospfv3 650 protocols/rip 660 protocols/ripng |