public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Ross Zwisler <ross.zwisler@linux.intel.com>
To: fstests@vger.kernel.org, linux-xfs@vger.kernel.org
Cc: Ross Zwisler <ross.zwisler@linux.intel.com>,
	Eric Sandeen <sandeen@redhat.com>,
	Dave Chinner <david@fromorbit.com>, Jan Kara <jack@suse.cz>
Subject: [PATCH] xfs_io: allow lsattr & lsproj on foreign filesystems
Date: Mon, 31 Jul 2017 16:58:33 -0600	[thread overview]
Message-ID: <20170731225833.11104-1-ross.zwisler@linux.intel.com> (raw)

The following commit:

commit 73b54bb6a2fb ("xfs_io: allow chattr & chproj on foreign filesystems")

allowed chattr and chproj to be run on non-xfs filesystems now that
FS_IOC_FSSETXATTR is a generic vfs call.  It failed to enable the
corresponding lsattr and lsproj commands for those filesystems, though.

Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Fixes: 73b54bb6a2fb ("xfs_io: allow chattr & chproj on foreign filesystems")
Cc: Eric Sandeen <sandeen@redhat.com>
Cc: Dave Chinner <david@fromorbit.com>
Cc: Jan Kara <jack@suse.cz>
---
 io/attr.c | 2 +-
 io/open.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/io/attr.c b/io/attr.c
index b8eec1b..728560e 100644
--- a/io/attr.c
+++ b/io/attr.c
@@ -353,7 +353,7 @@ attr_init(void)
 	lsattr_cmd.args = _("[-R|-D|-a|-v]");
 	lsattr_cmd.argmin = 0;
 	lsattr_cmd.argmax = 1;
-	lsattr_cmd.flags = CMD_NOMAP_OK;
+	lsattr_cmd.flags = CMD_NOMAP_OK | CMD_FOREIGN_OK;
 	lsattr_cmd.oneline =
 		_("list extended inode flags set on the currently open file");
 	lsattr_cmd.help = lsattr_help;
diff --git a/io/open.c b/io/open.c
index b50f068..f2ea7c3 100644
--- a/io/open.c
+++ b/io/open.c
@@ -812,7 +812,7 @@ open_init(void)
 	lsproj_cmd.args = _("[-D | -R]");
 	lsproj_cmd.argmin = 0;
 	lsproj_cmd.argmax = -1;
-	lsproj_cmd.flags = CMD_NOMAP_OK;
+	lsproj_cmd.flags = CMD_NOMAP_OK | CMD_FOREIGN_OK;
 	lsproj_cmd.oneline =
 		_("list project identifier set on the currently open file");
 	lsproj_cmd.help = lsproj_help;
-- 
2.9.4


             reply	other threads:[~2017-07-31 22:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-31 22:58 Ross Zwisler [this message]
2017-08-02 16:10 ` [PATCH] xfs_io: allow lsattr & lsproj on foreign filesystems Darrick J. Wong

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=20170731225833.11104-1-ross.zwisler@linux.intel.com \
    --to=ross.zwisler@linux.intel.com \
    --cc=david@fromorbit.com \
    --cc=fstests@vger.kernel.org \
    --cc=jack@suse.cz \
    --cc=linux-xfs@vger.kernel.org \
    --cc=sandeen@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox