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


Groups > linux.kernel > #1592350 > unrolled thread

Re: [RFC PATCH v1 30/30] fs: convert i_version counter over to an atomic64_t

Started byNeilBrown <neil@brown.name>
First post2017-03-04 01:10 +0100
Last post2017-03-04 01:10 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [RFC PATCH v1 30/30] fs: convert i_version counter over to an atomic64_t NeilBrown <neil@brown.name> - 2017-03-04 01:10 +0100

#1592350 — Re: [RFC PATCH v1 30/30] fs: convert i_version counter over to an atomic64_t

FromNeilBrown <neil@brown.name>
Date2017-03-04 01:10 +0100
SubjectRe: [RFC PATCH v1 30/30] fs: convert i_version counter over to an atomic64_t
Message-ID<th5qO-nH-5@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

On Wed, Dec 21 2016, Jeff Layton wrote:

>  
> +/*
> + * We borrow the top bit in the i_version to use as a flag to tell us whether
> + * it has been queried since we last bumped it. If it has, then we must bump
> + * it and set the flag. Note that this means that we have to handle wrapping
> + * manually.
> + */
> +#define INODE_I_VERSION_QUERIED		(1ULL<<63)
> +

I would prefer that the least significant bit were used, rather than the
most significant.

Partly, this is because the "queried" state is less significant than
that "number has changed" state.
But most, this would mean we wouldn't need inode_cmp_iversion() at all.
We could just use "<" or ">=" or whatever.
The number returned by inode_get_iversion() would always be even (or
maybe odd) and wrapping (after the end of time) would "just work".

Thanks,
NeilBrown

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web