]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_quota: un-flag non-foreign-capable commands
authorEric Sandeen <sandeen@redhat.com>
Mon, 19 Sep 2016 06:06:57 +0000 (16:06 +1000)
committerDave Chinner <david@fromorbit.com>
Mon, 19 Sep 2016 06:06:57 +0000 (16:06 +1000)
The off command calls XFS_QUOTAOFF / Q_XQUOTAOFF, which calls
quota_disable in the kernel, which returns ENOSYS if the
->quota_enable quota op doesn't exist - and it does not exist
on any non-xfs filesystems.

We could get clever if we wanted it, and send Q_QUOTAOFF
instead for foreign filesystems, but for now it's broken
so just remove the flag.

The free command relies on XFS_IOC_FSGEOMETRY_V1, so unflag it
as well.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Bill O'Donnell <billodo@redhat.com
Signed-off-by: Dave Chinner <david@fromorbit.com>
quota/free.c
quota/state.c

index b9be9547dc20703d9efaf4c6e384cc6a49f5925a..3c8a5ce1b734bd10ee4a8b24d2288005349d3182 100644 (file)
@@ -372,7 +372,6 @@ free_init(void)
        free_cmd.args = _("[-bir] [-hn] [-f file]");
        free_cmd.oneline = _("show free and used counts for blocks and inodes");
        free_cmd.help = free_help;
-       free_cmd.flags = CMD_FLAG_FOREIGN_OK;
 
        add_command(&free_cmd);
 }
index 05e4ec5290454f9d66addf913c1bce08e08b52b3..09dfa7053a3ba128bf3b0e5371b37e3524df8bae 100644 (file)
@@ -584,7 +584,6 @@ state_init(void)
        off_cmd.args = _("[-gpu] [-v]");
        off_cmd.oneline = _("permanently switch quota off for a path");
        off_cmd.help = off_help;
-       off_cmd.flags = CMD_FLAG_FOREIGN_OK;
 
        state_cmd.name = "state";
        state_cmd.cfunc = state_f;