From: Trond Myklebust <Trond.Myklebust@netapp.com>
To: NeilBrown <neilb@suse.de>
Cc: "J. Bruce Fields" <bfields@fieldses.org>,
Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>,
Christoph Hellwig <hch@infradead.org>,
Matthew Treinish <treinish@linux.vnet.ibm.com>,
linux-nfs@vger.kernel.org
Subject: Re: [PATCH/RFC 0/7] Volatile Filehandle Client-side Support
Date: Mon, 14 Nov 2011 19:27:07 +0200 [thread overview]
Message-ID: <1321291627.2632.49.camel@lade.trondhjem.org> (raw)
In-Reply-To: <20111114080745.57083bfe@notabene.brown>
On Mon, 2011-11-14 at 08:07 +1100, NeilBrown wrote:
> On Sun, 13 Nov 2011 11:36:32 -0500 "J. Bruce Fields" <bfields@fieldses.org>
> wrote:
>
> > On Sun, Nov 13, 2011 at 02:45:48PM +0100, Tigran Mkrtchyan wrote:
> > > I have a server which runs on top of hadoop. The problem with hadoop
> > > is that there is no way to have persistent file handles. I am
> > > currently working on a way to do that - either simulate them or add a
> > > support for unique file id to hadoop. If linux client will support
> > > volatile file handles then I can stop inventing some workarounds.
> >
> > I might call that "fixing" rather than inventing workarounds.
> >
> > Our of curiosity: if we really wanted to support such filesystems, what
> > would we need in the protocol? Just saying "filehandles aren't stable,
> > deal with it" seems insufficient.
>
> 1/ no guarantees if the file is not 'open'
> 2/ two possible responses to FHEXPIRED:
Question: Section 8.11 states that
When the server chooses to export multiple filehandles corresponding
to the same file object and returns different filehandles on two
different OPENs of the same file object, the server MUST NOT "OR"
together the access and deny bits and coalesce the two open files.
Instead the server must maintain separate OPENs with separate
stateids and will require separate CLOSEs to free them.
How does one reconcile the above paragraph with a case where the server
can expire a filehandle while the file is open? For one thing, it seems
to say that you cannot CLOSE (or unlock!) a file once the filehandle
expires...
> a/ perform a GETATTR and request the 'filehandle' attribute. Client then
> uses that filehandle instead.
??? GETATTR takes a filehandle argument and will presumably get an
automatic FHEXPIRED. If not, and if you can map one filehandle into
another, then why do you need the second filehandle?
If the issue is that the mapping is expensive then what stops you from
caching the first filehandle for the duration of the file being open?
> b/ perform LOOKUP on parent filehandle with same name as before, and use
> the resulting filehandle.
> Server specifies which somehow (different error code? magic attribute
> flag somewhere? doesn't really matter)
How do I know this is the same file?
> If a server has objects that are never renamed, it can easily use volatile
> file handles.
How do you deal with unlink("foo") followed by create("foo")? The spec
says that the server is free to return FHEXPIRED in this case too.
> If a server has objects which can be renamed and wants to use volatile file
> handles, then if such an object is open and is about to be renamed, it must
> first log to stable storage some mapping to allow it to access the file from
> the old volatile file handle. And of course it cannot allow renames during
> the grace period, but I think we already have that.
> Also, if the VFH is such that it will be lost on a reboot, the server must
> log it to stable storage before allowing an open.
>
> >
> > Say there was some way for the client to indicate which filehandles it
> > currently has in use, and some way for the server to ask the client to
> > return in-use filehandles if there are too many (like DELEG_RECALL_ANY).
> > Then the server could at least place a limit on the number of
> > filehandles that it had to guarantee persistent.
> >
> > And/or the client could get a callback on rename/link/unlink. Bah.
> >
> > Would any of that actually be easier than implementing persistent file
> > handles?
>
> Easier for whom? Should NFSv4 be designed to make life easier for filesystem
> implementers, or easier for NFS implementers :-?
>
> While I don't have concrete examples I would not be surprised if there were
> filesystems where implementing limited persistence was practical while
> implementing universal persistence was not.
The question is why would we need to support exporting such filesystems
over NFS?
The thing to note is that not everything in the NFSv4 spec is actually
useful. A lot of it is "it seemed like a good idea a the time" material
and is recognisably incompletely thought through (volatile filehandles
being a major case in point). That's why we need to
A. demand very concrete use-cases with very real reasons for why
there is no alternative
B. make sure that we work out the spec details before attempting
implementations.
Trond
Trond
--
Trond Myklebust
Linux NFS client maintainer
NetApp
Trond.Myklebust@netapp.com
www.netapp.com
next prev parent reply other threads:[~2011-11-14 17:27 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-11 23:04 [PATCH/RFC 0/7] Volatile Filehandle Client-side Support Matthew Treinish
2011-11-11 23:04 ` [PATCH/RFC 1/7] New mount option for volatile filehandle recovery Matthew Treinish
2011-11-12 0:19 ` Trond Myklebust
2011-11-12 3:35 ` Malahal Naineni
2011-11-11 23:04 ` [PATCH/RFC 2/7] Added support for FH_EXPIRE_TYPE attribute Matthew Treinish
2011-11-11 23:04 ` [PATCH/RFC 3/7] Add VFS objects from nfs4_proc calls into nfs4_exception Matthew Treinish
2011-11-11 23:04 ` [PATCH/RFC 4/7] Save root file handle in nfs_server Matthew Treinish
2011-11-11 23:04 ` [PATCH/RFC 5/7] Added VFH FHEXPIRED recovery functions Matthew Treinish
2011-11-12 0:27 ` Trond Myklebust
2011-11-12 3:45 ` Malahal Naineni
2011-11-12 17:16 ` Trond Myklebust
2011-11-14 21:12 ` Matthew Treinish
2011-11-11 23:04 ` [PATCH/RFC 6/7] Perform recovery on both inodes for rename Matthew Treinish
2011-11-11 23:04 ` [PATCH/RFC 7/7] Added error handling for NFS4ERR_FHEXPIRED Matthew Treinish
2011-11-11 23:04 ` [PATCH/RFC] Hard code testing on server <ONLY FOR TESTING> Matthew Treinish
2011-11-12 0:13 ` [PATCH/RFC 0/7] Volatile Filehandle Client-side Support Trond Myklebust
2011-11-12 14:49 ` Christoph Hellwig
2011-11-13 3:54 ` NeilBrown
2011-11-13 13:45 ` Tigran Mkrtchyan
2011-11-13 16:36 ` J. Bruce Fields
2011-11-13 21:07 ` NeilBrown
2011-11-14 0:42 ` J. Bruce Fields
2011-11-14 1:26 ` NeilBrown
2011-11-14 17:27 ` Trond Myklebust [this message]
2011-11-15 6:33 ` Trond Myklebust
2012-01-13 17:09 ` Malahal Naineni
2012-01-14 1:38 ` J. Bruce Fields
2012-01-16 16:52 ` Malahal Naineni
2012-01-17 15:18 ` J. Bruce Fields
2012-01-17 17:22 ` Malahal Naineni
2012-01-17 18:47 ` J. Bruce Fields
2012-01-17 19:43 ` Malahal Naineni
2011-11-14 16:29 ` Trond Myklebust
2011-11-13 16:42 ` J. Bruce Fields
2011-11-13 16:45 ` J. Bruce Fields
2011-11-13 18:25 ` Matthew Treinish
2011-11-13 18:06 ` Matthew Treinish
2011-11-14 9:09 ` Tigran Mkrtchyan
2011-11-14 21:47 ` Matthew Treinish
2011-11-15 6:49 ` Trond Myklebust
2011-11-15 22:38 ` Matthew Treinish
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=1321291627.2632.49.camel@lade.trondhjem.org \
--to=trond.myklebust@netapp.com \
--cc=bfields@fieldses.org \
--cc=hch@infradead.org \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@suse.de \
--cc=tigran.mkrtchyan@desy.de \
--cc=treinish@linux.vnet.ibm.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