From: David Woodhouse <dwmw2@infradead.org>
To: Artem Bityutskiy <dedekind@infradead.org>
Cc: 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: Mon, 01 Sep 2008 10:43:07 +0100 [thread overview]
Message-ID: <1220262187.2982.58.camel@pmac.infradead.org> (raw)
In-Reply-To: <1220194366-12731-13-git-send-email-dedekind@infradead.org>
On Sun, 2008-08-31 at 17:52 +0300, Artem Bityutskiy wrote:
> From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
>
> UBIFS stores 16-bit UUID in the superblock, and it is a good
> idea to return part of it in 'f_fsid' filed of kstatfs structure.
I think you mean a 16-byte UUID, not 16-bit?
> + memcpy(&buf->f_fsid, c->uuid, sizeof(__kernel_fsid_t));
For btrfs I xor the first 64 bits with the second 64 bits, and put
_that_ into f_fsid. You're just putting the first 64 bits in and
ignoring the second 64 bits. Neither is really _better_ than the other;
you just alter the circumstances in which you get collisions. But I
suppose we might as well be consistent about how we do it?
(Actually I XOR in the root object ID for the subvol too, but you don't
need to worry about that).
Alternatively, there's space in the struct statfs to export a couple
more uint32_ts, and thus the _whole_ of the uuid. Perhaps we should do
that?
--
David Woodhouse Open Source Technology Centre
David.Woodhouse@intel.com Intel Corporation
next prev parent reply other threads:[~2008-09-01 9:43 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 ` David Woodhouse [this message]
2008-09-01 11:16 ` [PATCH] UBIFS: fill f_fsid 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
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=1220262187.2982.58.camel@pmac.infradead.org \
--to=dwmw2@infradead.org \
--cc=dedekind@infradead.org \
--cc=ext-adrian.hunter@nokia.com \
--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).