Re: overlayfs stopped working in v4.8-rc4-359-g4b30b6d

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

 



On Sun, Sep 04, 2016 at 01:37:36AM +0200, ziegler@xxxxxxxxxxxxxxx wrote:
> Dear Miklos,
> 
> overlayfs works still in  v4.8-rc4, but not longer in the newest kernel:
> 
> 
> If the four directories test_lowerdir,test/upperd, test/workd,
> test_mountdir exist, the command
> 
>   mount -t overlay -o lowerdir=test_lowerdir,upperdir=test/upperd,workdir=test/workd,noatime overlay test_mountdir
> 
> does not produce a writable files system. The kernel says:
> 
> 
>   kernel: overlayfs: failed to create directory /root/test/workd/work (errno: 95); mounting read-only
> 
> 
> I bisected between v4.8-rc4 and v4.8-rc4-359-g4b30b6d and found
> 
>   c11b9fdd6a612f376a5e886505f1c54c16d8c380
>   Author: Miklos Szeredi <mszeredi@xxxxxxxxxx>
>   Date:   Thu Sep 1 11:11:59 2016 +0200
> 
>     ovl: remove posix_acl_default from workdir
> 
> responsible. Reverting this makes overlayfs work again.
>

Thanks for spotting this bug!

The following patch should fix it.  Pushed to overlayfs-linus branch of
git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs.git

Thanks,
Miklos
---

From: Miklos Szeredi <mszeredi@xxxxxxxxxx>
Subject: ovl: fix workdir creation

Workdir creation fails in latest kernel.

Fix by allowing EOPNOTSUPP as a valid return value from
vfs_removexattr(XATTR_NAME_POSIX_ACL_*).  Upper filesystem may not support
ACL and still be perfectly able to support overlayfs.

Reported-by: Martin Ziegler <ziegler@xxxxxxxxxxxxxxx>
Signed-off-by: Miklos Szeredi <mszeredi@xxxxxxxxxx>
Fixes: c11b9fdd6a61 ("ovl: remove posix_acl_default from workdir")
Cc: <stable@xxxxxxxxxxxxxxx>
---
 fs/overlayfs/super.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/fs/overlayfs/super.c
+++ b/fs/overlayfs/super.c
@@ -835,11 +835,11 @@ static struct dentry *ovl_workdir_create
 			goto out_dput;
 
 		err = vfs_removexattr(work, XATTR_NAME_POSIX_ACL_DEFAULT);
-		if (err && err != -ENODATA)
+		if (err && err != -ENODATA && err != -EOPNOTSUPP)
 			goto out_dput;
 
 		err = vfs_removexattr(work, XATTR_NAME_POSIX_ACL_ACCESS);
-		if (err && err != -ENODATA)
+		if (err && err != -ENODATA && err != -EOPNOTSUPP)
 			goto out_dput;
 
 		/* Clear any inherited mode bits */
--
To unsubscribe from this list: send the line "unsubscribe linux-unionfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystems Devel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux