]> git.itanic.dy.fi Git - linux-stable/commitdiff
ext4: increase wait time needed before reuse of deleted inode numbers
authorTheodore Ts'o <tytso@mit.edu>
Tue, 14 Apr 2020 02:30:52 +0000 (22:30 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 16 Apr 2020 03:58:49 +0000 (23:58 -0400)
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/20200414023925.273867-1-tytso@mit.edu
Google-Bug-Id: 36602237
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/ialloc.c

index 9faaf32be5cc767c25f4a3812ac0c957efc0ad90..4b8c9a9bdf0c8c0e77a39aaa7e0bb653d4c64b40 100644 (file)
@@ -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)