]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: avoid ENOSPC when avoiding to reuse recently deleted inodes
authorJan Kara <jack@suse.cz>
Wed, 18 Mar 2020 12:13:17 +0000 (13:13 +0100)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 26 Mar 2020 14:55:00 +0000 (10:55 -0400)
commitec28ac7edb3c03b3939ca834ce91ba35a8466e12
tree904b8e026266797c5292283fb1ddfffb9e8f2185
parent96a70cab083fc9ed3bd28845de394690d5c3edca
ext4: avoid ENOSPC when avoiding to reuse recently deleted inodes

When ext4 is running on a filesystem without a journal, it tries not to
reuse recently deleted inodes to provide better chances for filesystem
recovery in case of crash. However this logic forbids reuse of freed
inodes for up to 5 minutes and especially for filesystems with smaller
number of inodes can lead to ENOSPC errors returned when allocating new
inodes.

Fix the problem by allowing to reuse recently deleted inode if there's
no other inode free in the scanned range.

Signed-off-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20200318121317.31941-1-jack@suse.cz
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/ialloc.c