From: Greg Banks <gnb@melbourne.sgi.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: David Chinner <dgc@sgi.com>, xfs-dev <xfs-dev@sgi.com>,
xfs-oss <xfs@oss.sgi.com>
Subject: Re: [PATCH] Don't initialise new inode generation numbers to zero V2
Date: Mon, 28 Apr 2008 13:24:20 +1000 [thread overview]
Message-ID: <48154364.3070208@melbourne.sgi.com> (raw)
In-Reply-To: <20080425085750.GA6395@infradead.org>
Christoph Hellwig wrote:
> On Tue, Apr 22, 2008 at 03:04:48PM +1000, David Chinner wrote:
>
>>
>> Christoph, care to explain how and why this is a problem to everyone?
>>
>
> XFS has some heuristics for inode placement and of course for removing
> the inode cluster and re-allocting it. I have a gut feeling that there
> is a small chance to trigger a re-use via nfs operations.
Dave's initial patch -- please correct me if I misunderstood it -- kept
a per-AG counter which was used to initialise the generation number of
new inodes. This counter incremented every time an inode was created in
that AG, i.e. every mknod() mkdir() or creat() bumps the counter for the
appropriate AG. So it served as a per-AG inode generation number, which
given the fixed mapping between AG and inode# means it's just like a
per-inode generation number but sparser. Thus the only way you could
cause a re-use of an (inode,gen) tuple would be by cycling through
2^32-1 inode creations anywhere in the same AG before destroying and
re-creating the original inode. That's as good a protection as 32bits
is going to buy. So if Dave's first patch works the way I think it
works, it should be just fine for NFS' purposes. Am I missing something?
--
Greg Banks, P.Engineer, SGI Australian Software Group.
The cake is *not* a lie.
I don't speak for SGI.
prev parent reply other threads:[~2008-04-28 3:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-22 1:58 [PATCH] Don't initialise new inode generation numbers to zero V2 David Chinner
2008-04-22 4:05 ` Greg Banks
2008-04-22 5:04 ` David Chinner
2008-04-25 8:57 ` Christoph Hellwig
2008-04-28 3:11 ` David Chinner
2008-04-28 5:59 ` Christoph Hellwig
2008-04-28 6:20 ` David Chinner
2008-04-28 6:25 ` Christoph Hellwig
2008-04-28 3:24 ` Greg Banks [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=48154364.3070208@melbourne.sgi.com \
--to=gnb@melbourne.sgi.com \
--cc=dgc@sgi.com \
--cc=hch@infradead.org \
--cc=xfs-dev@sgi.com \
--cc=xfs@oss.sgi.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