From: Christoph Hellwig <hch@lst.de>
To: Bruce James Fields <bfields@fieldses.org>
Cc: Trond Myklebust <trondmy@gmail.com>, linux-nfs@vger.kernel.org
Subject: Re: [nfsv4] RFC 7530: Filehandle of opened file after the REMOVE
Date: Fri, 30 Dec 2016 09:35:30 +0100 [thread overview]
Message-ID: <20161230083530.GA26413@lst.de> (raw)
In-Reply-To: <20161229205426.GA389@fieldses.org>
On Thu, Dec 29, 2016 at 03:54:26PM -0500, Bruce James Fields wrote:
> I assume this would need userspace updates too, so fsck would know not
> to free the unlinked files, and so administrators could see what was
> going on and maybe free them manually if need be.
At least for XFS that's not a worry - if the file system is so toast
that you run xfs_repair NFS exports getting back are the least of your
worries.
Note that these open but unlinked files already happen all the time during
normal operation, they only interesting aspect that NFS would add is that
we might have to reclaim them later when NFS is involved.
> It may seem like overkill, but we have (mostly complete) support for
> running multiple nfsd's in containers, which can be started and stopped
> independently. And we may want to allow a single filesystem to be
> exported by more than one such nfsd. I think we can still manage that
> with a single unlinked inode list, though--we'd just need logic in nfsd
> to delay freeing as long as any nfsd is restarting.
I'd really want to avoid that logic in the fs. What I can trivially
offer you from the fs is to:
1) offer a mount option not to reclaim the unlinked inode list
2) offer an interface (e.g. in super_operations or export_ops)
to reclaim the unlinked inodes for a fs mounted with that option
and NFSD would have call the second options. But I'd like to keep
it out of the fs when that is called exactly.
Note that the filesystem still is in a perfectly fine (although a little
odd) state before we reclaim the unlinked inodes - from the on disk
POV it is not different from a currently active but unlinked file,
the only difference is that we won't ever get a final unlink for it
and only a manual reclaim free them.
The only somewhat hard thing about implementing this on the fs side
is to come up with a scheme to distinguish between old unlinked inodes
left over from before a crash, and new ones created after it that are
active. But that's something a simple inode flag should be able to
solve.
next prev parent reply other threads:[~2016-12-30 8:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAABAsM5L0xdKodxk1dRSugLyROzn2JzgDkq6kdHE0LuGcfh++A@mail.gmail.com>
[not found] ` <20161213181734.Horde.EqgB09El8rupnkesIQaBwJ3@mail.telka.sk>
[not found] ` <CADaq8jcq2C0o8EWXoGjxDn58sV_J+-SP-=rj934Se-DV69b-pw@mail.gmail.com>
[not found] ` <20161214112112.Horde.aPh8AjT6iWRl37CULwihyV7@mail.telka.sk>
[not found] ` <CAABAsM7v6y0bsb0jKzfvobkUjniTLhM3uv8FYjo07HcLD2004w@mail.gmail.com>
[not found] ` <20161227144414.GA32002@fieldses.org>
[not found] ` <CADaq8jck14SKL6Ua9QxbqPyX1=1aaA7+76wv-__EWFvh7ZcEJA@mail.gmail.com>
[not found] ` <C496AE44-0F27-4B66-A1F6-A76AEAFD7A90@gmail.com>
[not found] ` <20161229024703.GA21325@fieldses.org>
[not found] ` <20161229074830.GA3002@lst.de>
2016-12-29 20:54 ` [nfsv4] RFC 7530: Filehandle of opened file after the REMOVE Bruce James Fields
2016-12-30 8:35 ` Christoph Hellwig [this message]
2017-01-01 13:58 ` Christoph Hellwig
2017-01-01 22:10 ` Bruce James Fields
2017-01-02 8:40 ` Christoph Hellwig
2017-01-02 15:27 ` Bruce James Fields
2017-01-04 17:42 ` Bruce James Fields
2017-01-05 5:51 ` Christoph Hellwig
2017-01-06 21:13 ` Bruce James Fields
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=20161230083530.GA26413@lst.de \
--to=hch@lst.de \
--cc=bfields@fieldses.org \
--cc=linux-nfs@vger.kernel.org \
--cc=trondmy@gmail.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;
as well as URLs for NNTP newsgroup(s).