Message ID | 20240823-work-i_state-v3-2-5cd5fd207a57@kernel.org (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | inode: turn i_state into u32 | expand |
On Fri 23-08-24 14:47:36, Christian Brauner wrote: > so that we can use the first bits to derive unique addresses from > i_state. > > Signed-off-by: Christian Brauner <brauner@kernel.org> Sure. Feel free to add: Reviewed-by: Jan Kara <jack@suse.cz> Honza > --- > include/linux/fs.h | 38 +++++++++++++++++++++----------------- > 1 file changed, 21 insertions(+), 17 deletions(-) > > diff --git a/include/linux/fs.h b/include/linux/fs.h > index 1d895b8cb801..f257f8fad7d0 100644 > --- a/include/linux/fs.h > +++ b/include/linux/fs.h > @@ -2417,28 +2417,32 @@ static inline void kiocb_clone(struct kiocb *kiocb, struct kiocb *kiocb_src, > * i_count. > * > * Q: What is the difference between I_WILL_FREE and I_FREEING? > + * > + * __I_{SYNC,NEW,LRU_ISOLATING} are used to derive unique addresses to wait > + * upon. There's one free address left. > */ > -#define I_DIRTY_SYNC (1 << 0) > -#define I_DIRTY_DATASYNC (1 << 1) > -#define I_DIRTY_PAGES (1 << 2) > -#define __I_NEW 3 > +#define __I_NEW 0 > #define I_NEW (1 << __I_NEW) > -#define I_WILL_FREE (1 << 4) > -#define I_FREEING (1 << 5) > -#define I_CLEAR (1 << 6) > -#define __I_SYNC 7 > +#define __I_SYNC 1 > #define I_SYNC (1 << __I_SYNC) > -#define I_REFERENCED (1 << 8) > +#define __I_LRU_ISOLATING 2 > +#define I_LRU_ISOLATING (1 << __I_LRU_ISOLATING) > + > +#define I_DIRTY_SYNC (1 << 3) > +#define I_DIRTY_DATASYNC (1 << 4) > +#define I_DIRTY_PAGES (1 << 5) > +#define I_WILL_FREE (1 << 6) > +#define I_FREEING (1 << 7) > +#define I_CLEAR (1 << 8) > +#define I_REFERENCED (1 << 9) > #define I_LINKABLE (1 << 10) > #define I_DIRTY_TIME (1 << 11) > -#define I_WB_SWITCH (1 << 13) > -#define I_OVL_INUSE (1 << 14) > -#define I_CREATING (1 << 15) > -#define I_DONTCACHE (1 << 16) > -#define I_SYNC_QUEUED (1 << 17) > -#define I_PINNING_NETFS_WB (1 << 18) > -#define __I_LRU_ISOLATING 19 > -#define I_LRU_ISOLATING (1 << __I_LRU_ISOLATING) > +#define I_WB_SWITCH (1 << 12) > +#define I_OVL_INUSE (1 << 13) > +#define I_CREATING (1 << 14) > +#define I_DONTCACHE (1 << 15) > +#define I_SYNC_QUEUED (1 << 16) > +#define I_PINNING_NETFS_WB (1 << 17) > > #define I_DIRTY_INODE (I_DIRTY_SYNC | I_DIRTY_DATASYNC) > #define I_DIRTY (I_DIRTY_INODE | I_DIRTY_PAGES) > > -- > 2.43.0 >
diff --git a/include/linux/fs.h b/include/linux/fs.h index 1d895b8cb801..f257f8fad7d0 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -2417,28 +2417,32 @@ static inline void kiocb_clone(struct kiocb *kiocb, struct kiocb *kiocb_src, * i_count. * * Q: What is the difference between I_WILL_FREE and I_FREEING? + * + * __I_{SYNC,NEW,LRU_ISOLATING} are used to derive unique addresses to wait + * upon. There's one free address left. */ -#define I_DIRTY_SYNC (1 << 0) -#define I_DIRTY_DATASYNC (1 << 1) -#define I_DIRTY_PAGES (1 << 2) -#define __I_NEW 3 +#define __I_NEW 0 #define I_NEW (1 << __I_NEW) -#define I_WILL_FREE (1 << 4) -#define I_FREEING (1 << 5) -#define I_CLEAR (1 << 6) -#define __I_SYNC 7 +#define __I_SYNC 1 #define I_SYNC (1 << __I_SYNC) -#define I_REFERENCED (1 << 8) +#define __I_LRU_ISOLATING 2 +#define I_LRU_ISOLATING (1 << __I_LRU_ISOLATING) + +#define I_DIRTY_SYNC (1 << 3) +#define I_DIRTY_DATASYNC (1 << 4) +#define I_DIRTY_PAGES (1 << 5) +#define I_WILL_FREE (1 << 6) +#define I_FREEING (1 << 7) +#define I_CLEAR (1 << 8) +#define I_REFERENCED (1 << 9) #define I_LINKABLE (1 << 10) #define I_DIRTY_TIME (1 << 11) -#define I_WB_SWITCH (1 << 13) -#define I_OVL_INUSE (1 << 14) -#define I_CREATING (1 << 15) -#define I_DONTCACHE (1 << 16) -#define I_SYNC_QUEUED (1 << 17) -#define I_PINNING_NETFS_WB (1 << 18) -#define __I_LRU_ISOLATING 19 -#define I_LRU_ISOLATING (1 << __I_LRU_ISOLATING) +#define I_WB_SWITCH (1 << 12) +#define I_OVL_INUSE (1 << 13) +#define I_CREATING (1 << 14) +#define I_DONTCACHE (1 << 15) +#define I_SYNC_QUEUED (1 << 16) +#define I_PINNING_NETFS_WB (1 << 17) #define I_DIRTY_INODE (I_DIRTY_SYNC | I_DIRTY_DATASYNC) #define I_DIRTY (I_DIRTY_INODE | I_DIRTY_PAGES)
so that we can use the first bits to derive unique addresses from i_state. Signed-off-by: Christian Brauner <brauner@kernel.org> --- include/linux/fs.h | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-)