Skip to content

Commit

Permalink
ext4: increase wait time needed before reuse of deleted inode numbers
Browse files Browse the repository at this point in the history
Current wait times have proven to be too short to protect against inode
reuses that lead to metadata inconsistencies.

Now that we will retry the inode allocation if we can't find any
recently deleted inodes, it's a lot safer to increase the recently
deleted time from 5 seconds to a minute.

Link: https://lore.kernel.org/r/[email protected]
Google-Bug-Id: 36602237
Signed-off-by: Theodore Ts'o <[email protected]>
  • Loading branch information
tytso committed Apr 16, 2020
1 parent 6488141 commit a17a9d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/ext4/ialloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ static int find_group_other(struct super_block *sb, struct inode *parent,
* block has been written back to disk. (Yes, these values are
* somewhat arbitrary...)
*/
#define RECENTCY_MIN 5
#define RECENTCY_MIN 60
#define RECENTCY_DIRTY 300

static int recently_deleted(struct super_block *sb, ext4_group_t group, int ino)
Expand Down

0 comments on commit a17a9d9

Please sign in to comment.