summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2008-09-04 15:21:40 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2008-09-04 15:21:40 -0700
commit14f7589a6b1cdebd453aba87948c7edf785aadc1 (patch)
tree47ba596f350d355c9eddc78266a2295e579371c4
parent4100250c8079e8c4ee8f553f5af9979d81df5e46 (diff)
downloadvyatta-cfg-14f7589a6b1cdebd453aba87948c7edf785aadc1.tar.gz
vyatta-cfg-14f7589a6b1cdebd453aba87948c7edf785aadc1.zip
Handle special files in aufs
aufs uses .wh.wh.XXX files for internal state. So ignore them in the commit function.
-rw-r--r--src/commit.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/commit.c b/src/commit.c
index ee159b7..d000f41 100644
--- a/src/commit.c
+++ b/src/commit.c
@@ -3,6 +3,7 @@
#include <string.h>
#include <assert.h>
#include <ctype.h>
+#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
@@ -800,6 +801,10 @@ static boolean commit_delete_child(vtw_def *pdefp, char *child,
/* deleted subdirectory */
if (strncmp(child, ".wh.", 4) == 0) { /* whiteout */
+ /* ignore aufs control files */
+ if (strncmp(child, ".wh..wh.", 8) == 0)
+ return TRUE;
+
if (deleting)
/* in do_delete mode we traverse A hierarchy, no white-outs possible */
INTERNAL; /* it is exit */
@@ -815,9 +820,10 @@ static boolean commit_delete_child(vtw_def *pdefp, char *child,
begin and end
*/
ok = commit_delete_child(pdefp, child + 4, TRUE, in_txn);
- }else {
- /* I do not understand how we could be here */
- printf("Mystery #1\n");
+ } else {
+ /* whiteout entry exists but can't see it race or unionfs problem? */
+ printf("commit delete confused by lstat(%s) %s\n",
+ m_path.path, strerror(errno));
ok = TRUE;
}
switch_path(CPATH);