Skip to content

Commit 520de2d

Browse files
Kanchan Joshikawasaki
authored andcommitted
fs: add a write stream field to the inode
Prepare for supporting per-inode write streams. Part of the existing 32-bit hole is used for the new field. Signed-off-by: Kanchan Joshi <[email protected]>
1 parent 6a01bea commit 520de2d

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

fs/inode.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ int inode_init_always_gfp(struct super_block *sb, struct inode *inode, gfp_t gfp
250250
atomic_set(&inode->i_writecount, 0);
251251
inode->i_size = 0;
252252
inode->i_write_hint = WRITE_LIFE_NOT_SET;
253+
inode->i_write_stream = 0;
253254
inode->i_blocks = 0;
254255
inode->i_bytes = 0;
255256
inode->i_generation = 0;

include/linux/fs.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,8 @@ struct inode {
725725

726726
/* Misc */
727727
u32 i_state;
728-
/* 32-bit hole */
728+
u8 i_write_stream;
729+
/* 24-bit hole */
729730
struct rw_semaphore i_rwsem;
730731

731732
unsigned long dirtied_when; /* jiffies of first dirtying */

0 commit comments

Comments
 (0)