]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_io: allow chattr & chproj on foreign filesystems
authorEric Sandeen <sandeen@redhat.com>
Mon, 19 Sep 2016 06:07:55 +0000 (16:07 +1000)
committerDave Chinner <david@fromorbit.com>
Mon, 19 Sep 2016 06:07:55 +0000 (16:07 +1000)
Now that FS_IOC_FSSETXATTR is a generic vfs call, these
functions can be used on non-xfs filesystems, and this is
needed for generic project quota testing.

(not all flags are valid on all filesystems.)

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
io/attr.c
io/open.c

index 0186b1ddd2e406eb218aaf8708b4e033ab7e2442..d1962f3a8a599f77ba65a0f90630aecfb15dc568 100644 (file)
--- a/io/attr.c
+++ b/io/attr.c
@@ -340,7 +340,7 @@ attr_init(void)
        chattr_cmd.args = _("[-R|-D] [+/-"CHATTR_XFLAG_LIST"]");
        chattr_cmd.argmin = 1;
        chattr_cmd.argmax = -1;
-       chattr_cmd.flags = CMD_NOMAP_OK;
+       chattr_cmd.flags = CMD_NOMAP_OK | CMD_FOREIGN_OK;
        chattr_cmd.oneline =
                _("change extended inode flags on the currently open file");
        chattr_cmd.help = chattr_help;
index a5d465a749a183a399fb001e94f192f47a78bead..3eaa0138f7b20f68585490936332c8ffbeb4e2dd 100644 (file)
--- a/io/open.c
+++ b/io/open.c
@@ -929,7 +929,7 @@ open_init(void)
        chproj_cmd.args = _("[-D | -R] projid");
        chproj_cmd.argmin = 1;
        chproj_cmd.argmax = -1;
-       chproj_cmd.flags = CMD_NOMAP_OK;
+       chproj_cmd.flags = CMD_NOMAP_OK | CMD_FOREIGN_OK;
        chproj_cmd.oneline =
                _("change project identifier on the currently open file");
        chproj_cmd.help = chproj_help;