From: "J. Bruce Fields" <bfields@fieldses.org>
To: Neil Brown <neilb@suse.de>
Cc: Steve Dickson <SteveD@redhat.com>,
linux-nfs@vger.kernel.org, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] Improve support for exporting btrfs subvolumes.
Date: Wed, 23 Jun 2010 20:15:23 -0400 [thread overview]
Message-ID: <20100624001523.GB8500@fieldses.org> (raw)
In-Reply-To: <20100624073157.743983ec-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
On Thu, Jun 24, 2010 at 07:31:57AM +1000, Neil Brown wrote:
> On Wed, 23 Jun 2010 14:28:38 -0400
> "J. Bruce Fields" <bfields@fieldses.org> wrote:
>
> > On Thu, Jun 17, 2010 at 02:54:01PM +1000, Neil Brown wrote:
> > >
> > > If you export two subvolumes of a btrfs filesystem, they will both be
> > > given the same uuid so lookups will be confused.
> > > blkid cannot differentiate the two, so we must use the fsid from
> > > statfs64 to identify the filesystem.
> > >
> > > We cannot tell if blkid or statfs is best without knowing internal
> > > details of the filesystem in question, so we need to encode specific
> > > knowledge of btrfs in mountd. This is unfortunate.
> > >
> > > To ensure smooth handling of this and possible future changes in uuid
> > > generation, we add infrastructure for multiple different uuids to be
> > > recognised on old filehandles, but only the preferred on is used on
> > > new filehandles.
> >
> > Could you just contatenate the two (or hash them somehow)? Or does that
> > just use up too much space in the filehandle?
>
> I did consider xoring them together but came to the conclusion that would
> actually be a regression.
> If you look down at the comment that I included in uuid_by_path, you will see
> that some filesystems (e.g. VFAT) just use the major/minor device number for
> the f_fsid from statfs. As you know that is not necessarily stable over
> reboots, while the UUID that blkid gives is.
> So if we always adding the two uuids somehow, it would be an improvement for
> btrfs, no change for e.g. ext3/XFS, and a regression for VFAT (and others I
> think). Not good.
OK, got it.
--b.
prev parent reply other threads:[~2010-06-24 0:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-17 4:54 [PATCH] Improve support for exporting btrfs subvolumes Neil Brown
[not found] ` <19481.43625.476833.275104-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
2010-06-22 20:16 ` Steve Dickson
2010-06-23 18:28 ` J. Bruce Fields
2010-06-23 21:31 ` Neil Brown
[not found] ` <20100624073157.743983ec-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
2010-06-24 0:15 ` J. Bruce Fields [this message]
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=20100624001523.GB8500@fieldses.org \
--to=bfields@fieldses.org \
--cc=SteveD@redhat.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@suse.de \
/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