From: David Woodhouse <dwmw2@infradead.org>
To: Andreas Dilger <adilger@sun.com>
Cc: Artem Bityutskiy <dedekind@infradead.org>,
Christoph Hellwig <hch@infradead.org>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
Adrian Hunter <ext-adrian.hunter@nokia.com>
Subject: Re: [PATCH] UBIFS: fill f_fsid
Date: Tue, 02 Sep 2008 18:29:29 +0100 [thread overview]
Message-ID: <1220376569.2982.225.camel@pmac.infradead.org> (raw)
In-Reply-To: <20080902170954.GE3086@webber.adilger.int>
On Tue, 2008-09-02 at 11:09 -0600, Andreas Dilger wrote:
> The fsid is supposed to be a persistent, unique identifier for the
> filesystem, used by NFS in file handles. Using st_dev is unsafe,
> because that may change from one server boot to the next, because
> of device probing order, driver changes, etc. Also, not all
> filesystems
> HAVE a valid st_dev in the first place, which is the whole reason
> for this thread.
Yes, putting st_dev in f_fsid probably isn't a good thing to do.
> I think a ->get_fsid() export method would be preferable.
I implemented that, but it doesn't really work. The fsid->export mapping
happens in userspace, so mountd needs access to the fsid. So the mount
would work fine and return a FH with the appropriate fsid, and then
mountd would have no knowledge of how to handle that FH, and mount(8) on
the client would eventually time out and fail.
It worked if I prepopulated the nfsd.fh cache in expkey_parse() so we
didn't end up asking userspace to resolve that FH for us -- but that was
just a quick hack. It wouldn't have worked after a server reboot, for
example -- we'd have asked userspace again.
We'd need to export that fsid to userspace somehow. I did briefly think
about adding something like ',uuid=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' to
each line in /proc/mounts, as if it was a file system option -- but I
don't like that much.
When looking for other options, I realised that we already have the
f_fsid field in struct statfs, and we might as well just use that. That
does seem to be what it was _designed_ for, after all.
--
David Woodhouse Open Source Technology Centre
David.Woodhouse@intel.com Intel Corporation
next prev parent reply other threads:[~2008-09-02 17:29 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1220194366-12731-1-git-send-email-dedekind@infradead.org>
2008-08-31 14:32 ` UBIFS updates for 2.6.27 Artem Bityutskiy
[not found] ` <1220194366-12731-13-git-send-email-dedekind@infradead.org>
2008-09-01 9:43 ` [PATCH] UBIFS: fill f_fsid David Woodhouse
2008-09-01 11:16 ` Artem Bityutskiy
2008-09-01 11:28 ` David Woodhouse
2008-09-01 11:43 ` Artem Bityutskiy
2008-09-01 11:50 ` David Woodhouse
2008-09-01 11:56 ` Artem Bityutskiy
2008-09-01 15:01 ` Christoph Hellwig
2008-09-02 7:03 ` Artem Bityutskiy
2008-09-02 17:09 ` Andreas Dilger
2008-09-02 17:29 ` David Woodhouse [this message]
2008-09-02 19:13 ` Andreas Dilger
2008-09-02 19:32 ` David Woodhouse
2008-09-02 21:02 ` Christoph Hellwig
2008-09-02 21:26 ` David Woodhouse
2008-09-02 21:48 ` Christoph Hellwig
[not found] ` <20080902214841.GA9204-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2008-09-02 22:12 ` David Woodhouse
2008-09-03 6:20 ` Artem Bityutskiy
2008-09-02 22:32 ` David Woodhouse
2008-09-03 9:44 ` Artem Bityutskiy
2008-09-03 10:14 ` David Woodhouse
2008-08-31 16:17 UBIFS updates for 2.6.27 Artem Bityutskiy
2008-08-31 16:17 ` [PATCH] UBIFS: fill f_fsid Artem Bityutskiy
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=1220376569.2982.225.camel@pmac.infradead.org \
--to=dwmw2@infradead.org \
--cc=adilger@sun.com \
--cc=dedekind@infradead.org \
--cc=ext-adrian.hunter@nokia.com \
--cc=hch@infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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).