From 14f7589a6b1cdebd453aba87948c7edf785aadc1 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Thu, 4 Sep 2008 15:21:40 -0700 Subject: Handle special files in aufs aufs uses .wh.wh.XXX files for internal state. So ignore them in the commit function. --- src/commit.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src') 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 #include #include +#include #include #include #include @@ -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); -- cgit v1.2.3