Re: [PATCH -V14 0/11] Generic name to handle and open by handlesyscalls

From: J. Bruce Fields
Date: Wed Jul 07 2010 - 11:06:00 EST


On Wed, Jul 07, 2010 at 01:40:53AM -0600, Andreas Dilger wrote:
> On 2010-07-06, at 11:09, Aneesh Kumar K. V wrote:
> > On Tue, 6 Jul 2010 12:10:02 -0400, "J. Bruce Fields" <bfields@xxxxxxxxxxxx> wrote:
> >> ... I don't understand why both need to come in the same system call.
> >> Is it purely an efficiency question? If so, why do you expect this to
> >> be significant?
> >
> > Since we know that system wide file handle should include a file system
> > identifier and a file identifier my plan was to retrieve both in the
> > same syscall.
>
> Won't having it be in a separate system call be racy w.r.t. doing the pathname lookup twice?

It'll be rare that a server will want to *just* get a filehandle;
normally it will at least want to get some attributes at the same time.

So I think it will always need to open the file first and then do the
rest of the operations on the returned filehandle.

--b.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/