From: Theodore Ts'o <tytso@mit.edu>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: Christoph Hellwig <hch@infradead.org>, Jan Kara <jack@suse.cz>,
Aurelien Jarno <aurelien@aurel32.net>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Rob Browning <rlb@defaultvalue.org>,
Dave Chinner <david@fromorbit.com>,
Miklos Szeredi <miklos@szeredi.hu>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
linux-kernel@vger.kernel.org, linux-ext4@vger.kernel.org
Subject: Re: [RFC PATCH] fs: xattr-based FS_IOC_[GS]ETFLAGS interface
Date: Tue, 7 Jan 2014 17:27:39 -0500 [thread overview]
Message-ID: <20140107222739.GA22610@thunk.org> (raw)
In-Reply-To: <20140107194356.GC9229@birch.djwong.org>
On Tue, Jan 07, 2014 at 11:43:56AM -0800, Darrick J. Wong wrote:
> I had thought of indexed inode flags as an alternative to the xattr/string
> parsing thing. Feature flags make their first appearance as part of a per-FS
> flag-space and are migrated to the common flag-space when there is demand.
> It would also avoid the need for each fs to create its own flag ioctl.
>
> On the other hand, someone suggested I try remaking IOC_[GS]ETFLAG as an xattr,
> so off I went. :)
>
> #define FS_IOC_FLAGS_COMMON 0
> #define FS_IOC_FLAGS_COMMON2 1
> #define FS_IOC_FLAGS_EXT4 0xEF53
>
> struct inode_flag_ioctl {
> u32 flag;
> u32 value; /* or u64? */
> };
> #define FS_IOC_GETFLAGS2 _IOR('f', 12, struct inode_flag_ioctl);
> #define FS_IOC_SETFLAGS2 _IOW('f', 13, struct inode_flag_ioctl);
Is having this structure and demultiplexing based on
inode_flag_ioctl.flag really worth it?
I'd just simply introduce two new ioctl's for generic flags:
FS_IOC_COMMON_[GS]ETFLAGS, and then two new ioctl's for each file
system: FS_IOC_EXT4_[GS]ETFLAGS, FS_IOC_BTRFS_[GS]ETFLAGS, etc.
Is this uglier or pretier than using strings? Eh.... six of one, half
dozen of the other. I think it's mostly a matter of personal taste.
- Ted
next prev parent reply other threads:[~2014-01-07 22:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-07 2:58 [RFC PATCH] fs: xattr-based FS_IOC_[GS]ETFLAGS interface Darrick J. Wong
2014-01-07 12:48 ` Jan Kara
2014-01-07 15:49 ` Christoph Hellwig
2014-01-07 17:04 ` Theodore Ts'o
2014-01-07 19:43 ` Darrick J. Wong
2014-01-07 19:59 ` Chris Mason
2014-01-07 22:02 ` Darrick J. Wong
2014-01-07 22:08 ` Chris Mason
2014-01-07 22:27 ` Theodore Ts'o [this message]
2014-01-07 22:04 ` [RFC PATCH v2] fs: new FS_IOC_[GS]ETFLAGS2 interface 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=20140107222739.GA22610@thunk.org \
--to=tytso@mit.edu \
--cc=aurelien@aurel32.net \
--cc=darrick.wong@oracle.com \
--cc=david@fromorbit.com \
--cc=hch@infradead.org \
--cc=jack@suse.cz \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=rlb@defaultvalue.org \
--cc=viro@zeniv.linux.org.uk \
/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;
as well as URLs for NNTP newsgroup(s).