[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170523192000.GE13222@htj.duckdns.org>
Date: Tue, 23 May 2017 15:20:00 -0400
From: Tejun Heo <tj@...nel.org>
To: Shaohua Li <shli@...com>
Cc: Christoph Hellwig <hch@...radead.org>,
linux-kernel@...r.kernel.org, gregkh@...uxfoundation.org,
viro@...iv.linux.org.uk, Kernel-team@...com
Subject: Re: [PATCH 1/5] kernfs: implement i_generation
Hello,
On Tue, May 23, 2017 at 08:09:48AM -0700, Shaohua Li wrote:
> > i_generation is only supposed to be valid on a per-inode basis, so this
> > global counter seems really odd.
>
> What's the difference between per-inode or per-super? The i_generation doesn't
> need to be consecutive for an inode. I checked other fs, a lot of filesystems
> implement i_generation in this way, for example, f2fs, ext4.
One worry is that it is reasonably possible to wrap on the generation
number. Some setups go through cgroups really fast and wrapping 2^32
on the number of files ever created isn't that difficult over time.
This actually showing up as a malfunction would be very low probabilty
but is still nasty.
It'd be nice to give out unique 64bit id for each kn but then we can't
use idr. rbtree or extensible hash should work, right?
Thanks.
--
tejun
Powered by blists - more mailing lists