All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: xfs-oss <xfs@oss.sgi.com>, linux-xfs@vger.kernel.org
Subject: [PATCH] xfs_io: allow chattr & chproj on foreign filesystems
Date: Fri, 16 Sep 2016 20:00:39 -0500	[thread overview]
Message-ID: <e1471cdf-9f83-91d1-9e93-f3877baeccb5@redhat.com> (raw)

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

             reply	other threads:[~2016-09-17  1:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-17  1:00 Eric Sandeen [this message]
2016-09-25 14:34 ` [PATCH] xfs_io: allow chattr & chproj on foreign filesystems Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e1471cdf-9f83-91d1-9e93-f3877baeccb5@redhat.com \
    --to=sandeen@redhat.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.