summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2020-04-13 22:30:52 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-05-02 17:25:59 +0200
commitfffce4a4c4befb2a53fe9bbd5da9addd1efe41a8 (patch)
treee6d35fd6a3ddf039942bd0c75c3dfe433c90f65d
parent70e1d0a0e9f5d07481c6e0996621e4e105424b8f (diff)
downloadlinux-stable-fffce4a4c4befb2a53fe9bbd5da9addd1efe41a8.tar.gz
linux-stable-fffce4a4c4befb2a53fe9bbd5da9addd1efe41a8.tar.bz2
linux-stable-fffce4a4c4befb2a53fe9bbd5da9addd1efe41a8.zip
ext4: increase wait time needed before reuse of deleted inode numbers
[ Upstream commit a17a9d935dc4a50acefaf319d58030f1da7f115a ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
-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 dafa7e4aaecb..8876eaad10f6 100644
--- a/fs/ext4/ialloc.c
+++ b/fs/ext4/ialloc.c
@@ -665,7 +665,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)