From: Dave Chinner <david@fromorbit.com>
To: "Aneesh Kumar K. V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: Neil Brown <neilb@suse.de>,
hch@infradead.org, viro@zeniv.linux.org.uk, adilger@sun.com,
corbet@lwn.net, serue@us.ibm.com, linux-fsdevel@vger.kernel.org,
sfrench@us.ibm.com, philippe.deniel@CEA.FR,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH -V7 4/9] vfs: Add open by file handle support
Date: Fri, 14 May 2010 20:41:40 +1000 [thread overview]
Message-ID: <20100514104139.GM13617@dastard> (raw)
In-Reply-To: <87pr101f5d.fsf@linux.vnet.ibm.com>
On Thu, May 13, 2010 at 12:07:02PM +0530, Aneesh Kumar K. V wrote:
> On Thu, 13 May 2010 16:09:55 +1000, Dave Chinner <david@fromorbit.com> wrote:
> > On Thu, May 13, 2010 at 09:44:22AM +1000, Neil Brown wrote:
> > > On Wed, 12 May 2010 21:20:39 +0530
> > > "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> wrote:
> > >
> > > > + filp->f_flags |= O_NOATIME;
> > > > + filp->f_mode |= FMODE_NOCMTIME;
> > > > + }
> > >
> > > I think you need a comment here explaining the rational for these setting.
> >
> > If you've never seen how applications use the XFS handle interface
> > in conjunction with other XFS functionality, then I guess if would
> > seem like bad voodoo.
> >
> > > Why is O_NOATIME important IFREG but not for IFDIR?
> >
> > No application has ever required directory access or modification
> > via the handle interface to be invisible to the rest of the system.
> >
> > > Why is it not sufficient to honour O_NOATIME that is passed in.
> >
> > Because the XFS handle library is cross platform and predates
> > O_NOATIME on linux. Hence the library it has never set that flag and
> > always relied on the kernel implementation of the API to ensure
> > atime was never updated on fds derived from handles..
> >
> > > How can you ever justify setting FMODE_NOCMTIME ?
> >
> > Quite easily. ;)
> >
> > The XFS handle interface was designed specifically to allow
> > applications to execute silent/invisible movement of data in, out
> > and around the filesystem without leaving user visible traces in
> > file metadata. This enables backup or filesysetm utilities that
> > operate on active filesystems need to be able to access or modify
> > inodes and data without affecting running applications. It's a
> > feature of the handle interface, and used by xfs_dump, xfs_fsr,
> > SGI's HSM, etc to do stuff that isn't otherwise possible.
> >
> > FWIW, if you are curious, here's the initial commit of the XFS
> > handle code into Irix tree from 3 Sep 1994, showing that the initial
> > XFS open_by_handle() implementation sets the FINVIS flag to trigger
> > invisible IO semantics:
> >
> > http://oss.sgi.com/cgi-bin/gitweb.cgi?p=archive/xfs-import.git;a=commitdiff;h=575b66fae833429a51fcadb204d45521c2dfc26f
>
> Thanks for sharing this. I haven't looked at the details you mentioned here.
>
> >
> > > I guess you are just copying from xfs code, but it still needs justification.
> >
> > "They are intended for use by a limited set of system
> > utilities such as backup programs."
> >
> > - open_by_handle(3) man page
> >
>
> Should we retain all the above behaviour in the new syscall ?. Or just
> do what a normal open(2) call does ?
I'm not sure that FMODE_NOCMTIME can be set from userspace at the
moment. In fs.h:
82 /*
83 * Don't update ctime and mtime.
84 *
85 * Currently a special hack for the XFS open_by_handle ioctl, but we'll
86 * hopefully graduate it to a proper O_CMTIME flag supported by open(2) soon.
87 */
88 #define FMODE_NOCMTIME ((__force fmode_t)0x800)
Perhaps we need to introduce O_NOCMTIME as the comment suggests, and
then the new handle code doesn't need to automatically set it. If
libhandle is converted, then it could set the open flags as
necessary...
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2010-05-14 10:41 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-12 15:50 [PATCH -V7 0/8] Generic name to handle and open by handle syscalls Aneesh Kumar K.V
2010-05-12 15:50 ` [PATCH -V7 1/9] exportfs: Return the minimum required handle size Aneesh Kumar K.V
2010-05-12 15:50 ` [PATCH -V7 2/9] vfs: Add uuid based vfsmount lookup Aneesh Kumar K.V
2010-05-12 15:50 ` [PATCH -V7 3/9] vfs: Add name to file handle conversion support Aneesh Kumar K.V
2010-05-12 21:49 ` Andreas Dilger
2010-05-12 22:43 ` Neil Brown
2010-05-13 6:17 ` Aneesh Kumar K. V
2010-05-13 7:11 ` Neil Brown
2010-05-13 8:30 ` Andreas Dilger
2010-05-13 8:47 ` Neil Brown
2010-05-13 14:21 ` Aneesh Kumar K. V
2010-05-13 18:17 ` Aneesh Kumar K. V
2010-05-13 22:54 ` Andreas Dilger
2010-05-14 17:25 ` Al Viro
2010-05-14 18:18 ` Aneesh Kumar K. V
2010-05-14 18:40 ` Al Viro
2010-05-15 5:31 ` Aneesh Kumar K. V
2010-05-15 6:00 ` Al Viro
2010-05-15 15:28 ` Aneesh Kumar K. V
2010-05-13 0:20 ` Dave Chinner
2010-05-13 6:23 ` Aneesh Kumar K. V
2010-05-13 7:31 ` Dave Chinner
2010-05-13 5:56 ` Aneesh Kumar K. V
2010-05-13 14:24 ` Aneesh Kumar K. V
2010-05-12 15:50 ` [PATCH -V7 4/9] vfs: Add open by file handle support Aneesh Kumar K.V
2010-05-12 23:44 ` Neil Brown
2010-05-13 6:09 ` Dave Chinner
2010-05-13 6:37 ` Aneesh Kumar K. V
2010-05-14 10:41 ` Dave Chinner [this message]
2010-05-12 15:50 ` [PATCH -V7 5/9] vfs: Add freadlink syscall Aneesh Kumar K.V
2010-05-13 1:43 ` Neil Brown
2010-05-13 6:25 ` Aneesh Kumar K. V
2010-05-13 6:56 ` Neil Brown
2010-05-13 7:34 ` Aneesh Kumar K. V
2010-05-13 8:09 ` Neil Brown
2010-05-14 11:18 ` Aneesh Kumar K. V
2010-05-12 15:50 ` [PATCH -V7 6/9] ext4: Add get_fsid callback Aneesh Kumar K.V
2010-05-13 3:11 ` Dave Chinner
2010-05-13 6:32 ` Aneesh Kumar K. V
2010-05-14 1:44 ` Dave Chinner
2010-05-15 6:09 ` Aneesh Kumar K. V
2010-05-14 17:32 ` Coly Li
2010-05-14 18:21 ` Aneesh Kumar K. V
2010-05-14 19:08 ` Coly Li
2010-05-12 15:50 ` [PATCH -V7 7/9] x86: Add new syscalls for x86_32 Aneesh Kumar K.V
2010-05-12 15:50 ` [PATCH -V7 8/9] x86: Add new syscalls for x86_64 Aneesh Kumar K.V
2010-05-12 15:50 ` [PATCH -V7 9/9] ext3: Add get_fsid callback Aneesh Kumar K.V
-- strict thread matches above, loose matches on Subject: below --
2010-05-14 19:56 [PATCH -V7 4/9] vfs: Add open by file handle support Steve French
2010-05-16 7:24 ` Aneesh Kumar K. V
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=20100514104139.GM13617@dastard \
--to=david@fromorbit.com \
--cc=adilger@sun.com \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=corbet@lwn.net \
--cc=hch@infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=neilb@suse.de \
--cc=philippe.deniel@CEA.FR \
--cc=serue@us.ibm.com \
--cc=sfrench@us.ibm.com \
--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).