Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1648361

Re: [PATCH 1/5] kernfs: implement i_generation

From Tejun Heo <tj@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH 1/5] kernfs: implement i_generation
Date 2017-05-23 21:30 +0200
Message-ID <tKnFf-7zH-13@gated-at.bofh.it> (permalink)
References <tK4sV-3eD-3@gated-at.bofh.it> <tK4sW-3eD-9@gated-at.bofh.it> <tKcJQ-65-17@gated-at.bofh.it> <tKnFf-7zH-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/5] kernfs: implement i_generation Shaohua Li <shli@fb.com> - 2017-05-23 01:00 +0200
  Re: [PATCH 1/5] kernfs: implement i_generation Christoph Hellwig <hch@infradead.org> - 2017-05-23 09:50 +0200
    Re: [PATCH 1/5] kernfs: implement i_generation Tejun Heo <tj@kernel.org> - 2017-05-23 21:30 +0200
    Re: [PATCH 1/5] kernfs: implement i_generation Christoph Hellwig <hch@infradead.org> - 2017-05-24 19:50 +0200

csiph-web