ovl: disable index when no xattr support
authorAmir Goldstein <amir73il@gmail.com>
Tue, 19 Sep 2017 09:14:18 +0000 (12:14 +0300)
committerMiklos Szeredi <mszeredi@redhat.com>
Wed, 24 Jan 2018 09:19:07 +0000 (10:19 +0100)
Overlayfs falls back to index=off if lower/upper fs does not support
file handles. Do the same if upper fs does not support xattr.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/overlayfs/super.c

index 3387e6d..f3281f0 100644 (file)
@@ -968,7 +968,8 @@ static int ovl_make_workdir(struct ovl_fs *ofs, struct path *workpath)
        err = ovl_do_setxattr(ofs->workdir, OVL_XATTR_OPAQUE, "0", 1, 0);
        if (err) {
                ofs->noxattr = true;
-               pr_warn("overlayfs: upper fs does not support xattr.\n");
+               ofs->config.index = false;
+               pr_warn("overlayfs: upper fs does not support xattr, falling back to index=off.\n");
                err = 0;
        } else {
                vfs_removexattr(ofs->workdir, OVL_XATTR_OPAQUE);