summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2020-04-14 05:30:52 +0300
committerTheodore Ts'o <tytso@mit.edu>2020-04-16 06:58:49 +0300
commita17a9d935dc4a50acefaf319d58030f1da7f115a (patch)
tree205f2f4f09e6c272669f7ca48fdabd60a22ae2c0 /fs
parent648814111af26485762a22da0f4b3159f3f9632c (diff)
downloadlinux-a17a9d935dc4a50acefaf319d58030f1da7f115a.tar.xz
ext4: increase wait time needed before reuse of deleted inode numbers
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>
Diffstat (limited to 'fs')
-rw-r--r--fs/ext4/ialloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c
index 9faaf32be5cc..4b8c9a9bdf0c 100644
--- a/fs/ext4/ialloc.c
+++ b/fs/ext4/ialloc.c
@@ -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)