lkml.org 
[lkml]   [2020]   [May]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.19 41/46] ext4: increase wait time needed before reuse of deleted inode numbers
    Date
    From: Theodore Ts'o <tytso@mit.edu>

    [ 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>
    ---
    fs/ext4/ialloc.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c
    index dafa7e4aaecb9..8876eaad10f68 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)
    --
    2.20.1


    \
     
     \ /
      Last update: 2020-05-01 15:37    [W:2.972 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site