Re: overlayfs v8 problems with whiteout links

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



A Dimarts 26 Abril 2011 17:50:54, Miklos Szeredi va escriure:
> It doesn't look like the correct fix, however.  Even though
> ovl_dentry_lower() returns NULL, the lower file should normally exist.
it solves the problem, but we should investigate why,

> 
> Please look a the ovl_do_lookup() logic: if oe->opaque is set to true,
> then oe->lowerdentry will be set to NULL, even when the lower dentry
> does actually exist.
> 
> So your patch might cover up the problem that you've been observing
> (because it won't create the whiteouts in some cases), but it will
> introduce another bug.
> 
Agree, the working line in this patch is checking for ovl_dentry_lower in 
ovl_do_remove, the other lines are part of the test; should not be used.

another patch is attached,

Thanks,

Jordi Pujol

Live never ending Tale
GNU/Linux Live forever!
http://livenet.selfip.com
--- a/fs/overlayfs/dir.c
+++ b/fs/overlayfs/dir.c
@@ -376,7 +383,8 @@ static int ovl_do_remove(struct dentry *
 		ovl_dentry_version_inc(dentry->d_parent);
 	}
 
-	if (type != OVL_PATH_UPPER || ovl_dentry_is_opaque(dentry))
+	if ((type != OVL_PATH_UPPER || ovl_dentry_is_opaque(dentry))
+	&& ovl_dentry_lower(dentry))
 		err = ovl_whiteout(upperdir, dentry);
 
 	/*

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux