linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@redhat.com>
To: Andreas Dilger <adilger.kernel@dilger.ca>
Cc: Neil Brown <neilb@suse.de>, Chris Mason <chris.mason@oracle.com>,
	Dave Chinner <david@fromorbit.com>,
	Josef Bacik <josef@redhat.com>,
	linux-btrfs Btrfs <linux-btrfs@vger.kernel.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>, hch <hch@lst.de>,
	ssorce <ssorce@redhat.com>,
	"K. V K.V" <aneesh.kumar@linux.vnet.ibm.com>
Subject: Re: What to do about subvolumes?
Date: Thu, 9 Dec 2010 10:19:11 -0500	[thread overview]
Message-ID: <20101209151910.GA10010@pad.home.fieldses.org> (raw)
In-Reply-To: <FBF72E13-C120-44FF-AFB0-1B4F9B06DFBE@dilger.ca>

On Wed, Dec 08, 2010 at 09:41:33PM -0700, Andreas Dilger wrote:
> On 2010-12-08, at 16:07, Neil Brown wrote:
> > On Mon, 6 Dec 2010 11:48:45 -0500 "J. Bruce Fields" <bfields@redhat.com>
> > wrote:
> > 
> >> On Fri, Dec 03, 2010 at 04:01:44PM -0700, Andreas Dilger wrote:
> >>> Any chance we can add a ->get_fsid(sb, inode) method to
> >>> export_operations (or something simiar), that allows the
> >>> filesystem to generate an FSID based on the volume and
> >>> inode that is being exported?
> >> 
> >> No objection from here.
> > 
> > My standard objection here is that you cannot guarantee that the
> > fsid is 100% guarantied to be unique across all filesystems in
> > the system (including filesystems mounted from dm snapshots of
> > filesystems that are currently mounted).  NFSd needs this uniqueness.
> 
> Sure, but you also cannot guarantee that the devno is constant across reboots, yet NFS continues to use this much-less-constant value...
> 
> > This is only really an objection if user-space cannot over-ride
> > the fsid provided by the filesystem.
> 
> Agreed.  It definitely makes sense to allow this, for whatever strange circumstances might arise.  However, defaulting to using the filesystem UUID definitely makes the most sense, and looking at the nfs-utils mountd code, it seems that this is already standard behaviour for local block devices (excluding "btrfs" filesystems).
> 
> > I'd be very happy to see an interface to user-space whereby
> > user-space can get a reasonably unique fsid for a given
> > filesystem.
> 
> Hmm, maybe I'm missing something, but why does userspace need to be able to get this value?  I would think that nfsd gets it from the filesystem directly in the kernel, but if a "uuid=" option is present in the exports file that is preferentially used over the value from the filesystem.

Well, the kernel can't distinguish the case of an explicit "uuid="
option in /etc/exports from one that was (as is the normal default)
generated automatically by mountd.  Maybe not a big deal.

The uuid seems like a useful thing to have access to from userspace
anyway, for userspace nfs servers if for no other reason:

> That said, I think Aneesh's open_by_handle patchset also made the UUID visible in /proc/<pid>/mountinfo, after the filesystems stored it in
> sb->s_uuid at mount time.  That _should_ make it visible for non-block mountpoints as well, assuming they fill in s_uuid.
> 
> > Whether this is an export_operations method or some field in the
> > 'struct super' which gets copied out doesn't matter to me.
> 
> Since Aneesh has already developed patches, is there any objection to using those (last sent to linux-fsdevel on 2010-10-29):
> 
> [PATCH -V22 12/14] vfs: Export file system uuid via /proc/<pid>/mountinfo
> [PATCH -V22 13/14] ext3: Copy fs UUID to superblock.
> [PATCH -V22 14/14] ext4: Copy fs UUID to superblock

I can't see anything wrong with that.

--b.

  reply	other threads:[~2010-12-09 15:19 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-01 14:21 What to do about subvolumes? Josef Bacik
2010-12-01 14:50 ` Mike Hommey
2010-12-01 14:51 ` C Anthony Risinger
2010-12-01 16:01   ` Chris Mason
2010-12-01 16:03     ` C Anthony Risinger
2010-12-01 16:13       ` Chris Mason
2010-12-01 16:31     ` Mike Hommey
2010-12-09 19:53       ` Martin Steigerwald
2010-12-01 16:00 ` Chris Mason
2010-12-01 16:38 ` Hugo Mills
2010-12-01 16:48   ` Gordan Bobic
2010-12-01 16:52   ` Mike Hommey
2010-12-01 16:52   ` C Anthony Risinger
2010-12-01 17:38   ` Josef Bacik
2010-12-01 19:35     ` Hugo Mills
2010-12-01 20:24       ` Freddie Cash
2010-12-01 21:28         ` Hugo Mills
2010-12-01 23:32           ` Freddie Cash
2010-12-02  4:46             ` Mike Fedyk
2010-12-01 18:33 ` Goffredo Baroncelli
2010-12-01 18:36   ` Josef Bacik
2010-12-01 18:48     ` C Anthony Risinger
2010-12-01 18:52       ` C Anthony Risinger
2010-12-01 19:08         ` Goffredo Baroncelli
2010-12-01 19:44 ` J. Bruce Fields
2010-12-01 19:54   ` Josef Bacik
2010-12-01 20:00     ` J. Bruce Fields
2010-12-01 20:09       ` Josef Bacik
2010-12-01 20:16         ` J. Bruce Fields
2010-12-02  1:52         ` Michael Vrable
2010-12-03 20:53           ` J. Bruce Fields
2010-12-01 20:03 ` Jeff Layton
2010-12-01 20:46   ` Goffredo Baroncelli
2010-12-01 21:06     ` Jeff Layton
2010-12-02  9:26 ` Arne Jansen
2010-12-02  9:49 ` Arne Jansen
2010-12-02 16:11   ` Chris Mason
2010-12-02 17:14     ` David Pottage
2010-12-03 20:56       ` J. Bruce Fields
2010-12-03  2:43   ` Phillip Susi
2011-01-31  2:40   ` Ian Kent
2010-12-03  4:25 ` Chris Ball
2010-12-03 14:00   ` Josef Bacik
2010-12-03 21:45 ` Josef Bacik
2010-12-03 22:16   ` J. Bruce Fields
2010-12-03 22:27   ` Dave Chinner
2010-12-03 22:29     ` Chris Mason
2010-12-03 22:45       ` J. Bruce Fields
2010-12-03 23:01         ` Andreas Dilger
2010-12-06 16:48           ` J. Bruce Fields
2010-12-08  6:39             ` Andreas Dilger
2010-12-08 23:07             ` Neil Brown
2010-12-09  4:41               ` Andreas Dilger
2010-12-09 15:19                 ` J. Bruce Fields [this message]
2010-12-07 16:52         ` hch
2010-12-07 20:45           ` J. Bruce Fields
2010-12-07 16:51     ` Christoph Hellwig
2010-12-07 17:02       ` Trond Myklebust
2010-12-08 17:16         ` Andreas Dilger
2010-12-08 17:27           ` J. Bruce Fields
2010-12-08 21:18             ` Andreas Dilger
2010-12-04 21:58   ` Mike Fedyk
2010-12-06 14:27     ` Josef Bacik
2011-01-31  2:56       ` Ian Kent
2010-12-07 16:48 ` Christoph Hellwig

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=20101209151910.GA10010@pad.home.fieldses.org \
    --to=bfields@redhat.com \
    --cc=adilger.kernel@dilger.ca \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=chris.mason@oracle.com \
    --cc=david@fromorbit.com \
    --cc=hch@lst.de \
    --cc=josef@redhat.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=ssorce@redhat.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).