From: Chris Mason <chris.mason@oracle.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Zach Brown <zach.brown@oracle.com>, Mingming <cmm@us.ibm.com>,
linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] COW and checksumming ioctls
Date: Sun, 22 Jun 2008 10:10:06 -0400 [thread overview]
Message-ID: <1214143806.10187.538.camel@think.oraclecorp.com> (raw)
In-Reply-To: <20080621072730.GA20871@infradead.org>
On Sat, 2008-06-21 at 03:27 -0400, Christoph Hellwig wrote:
> On Thu, Jun 19, 2008 at 10:23:17PM -0700, Zach Brown wrote:
> >
> > > +#define BTRFS_IOC_NODATACOW _IO(BTRFS_IOCTL_MAGIC, 13)
> > > +#define BTRFS_IOC_DATACOW _IO(BTRFS_IOCTL_MAGIC, 14)
> > > +#define BTRFS_IOC_NODATASUM _IO(BTRFS_IOCTL_MAGIC, 15)
> > > +#define BTRFS_IOC_DATASUM _IO(BTRFS_IOCTL_MAGIC, 16)
> >
> > Hmm. Do we really want 4 different ioctl commands to turn 2 features on
> > and off? Surely we could have 1 ioctl which updates a bitfield? Or a
> > ioctl that takes an explicit feature enum argument and a boolean which
> > indicates that it should be enabled or not?
>
> The best interface for per-file boolean flags
> FS_IOC_SETFLAGS/FS_IOC_GETFLAGS ioctls which would fir this really
> nicely.
>
> > (And is ioctl the right interface for this? maybe it should be xattr
> > ops in some defined btrfs string namespace? I'm just making this up. I
> > feel the the lack of a single comment in the patch, while in keeping
> > with the existing precedent in btrfs, leaves a lot of room for wild
> > speculation :))
>
> Synthetic xattrs are a really utterly horrible interface. Xattrs on
> disk are nice and simple, but the Linux invention of making some up
> on the fly, starting with the Posix ACL interface makes the
> implementation not just utterly complicated but also confuses backup
> programs.
The idea is that backup programs already know how to do xattrs and can
easily be changed to preserve them. Every ioctl interface we
create/make up has to be handed coded into the backup program.
I know xattrs are ugly, but we need to weigh the cost of the perfect
interface with the availability of a common one. Dave Chinner had
talked about using xattrs to control file behavior in XFS as well, not
sure if that ever happened.
-chris
next prev parent reply other threads:[~2008-06-22 14:10 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-20 0:26 [PATCH] COW and checksumming ioctls Mingming
2008-06-20 5:23 ` Zach Brown
2008-06-20 14:01 ` Joe Peterson
2008-06-20 13:58 ` Josef Bacik
2008-06-20 15:07 ` Joe Peterson
2008-06-20 16:37 ` Chris Mason
2008-06-21 6:07 ` Joe Peterson
2008-06-20 19:44 ` jim owens
2008-06-21 5:59 ` Joe Peterson
2008-06-21 7:27 ` Christoph Hellwig
2008-06-22 14:10 ` Chris Mason [this message]
2008-06-22 18:13 ` Joshua J. Berry
2008-06-30 18:38 ` 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=1214143806.10187.538.camel@think.oraclecorp.com \
--to=chris.mason@oracle.com \
--cc=cmm@us.ibm.com \
--cc=hch@infradead.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=zach.brown@oracle.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