linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xfs_io: allow chattr & chproj on foreign filesystems
@ 2016-09-17  1:00 Eric Sandeen
  2016-09-25 14:34 ` Christoph Hellwig
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Sandeen @ 2016-09-17  1:00 UTC (permalink / raw)
  To: xfs-oss, linux-xfs

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>
---

diff --git a/io/attr.c b/io/attr.c
index 0186b1d..d1962f3 100644
--- 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;
diff --git a/io/open.c b/io/open.c
index a5d465a..3eaa013 100644
--- 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;

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-09-25 14:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-17  1:00 [PATCH] xfs_io: allow chattr & chproj on foreign filesystems Eric Sandeen
2016-09-25 14:34 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).