linux/fs/ext4
Davidlohr Bueso 2d900efff9
mm/migrate: fix sleep in atomic for large folios and buffer heads
The large folio + buffer head noref migration scenarios are
being naughty and blocking while holding a spinlock.

As a consequence of the pagecache lookup path taking the
folio lock this serializes against migration paths, so
they can wait for each other. For the private_lock
atomic case, a new BH_Migrate flag is introduced which
enables the lookup to bail.

This allows the critical region of the private_lock on
the migration path to be reduced to the way it was before
ebdf4de564 ("mm: migrate: fix reference  check race
between __find_get_block() and migration"), that is covering
the count checks.

The scope is always noref migration.

Reported-by: kernel test robot <oliver.sang@intel.com>
Reported-by: syzbot+f3c6fda1297c748a7076@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/oe-lkp/202503101536.27099c77-lkp@intel.com
Fixes: 3c20917120 ("block/bdev: enable large folio support for large logical block sizes")
Reviewed-by: Jan Kara <jack@suse.cz>
Co-developed-by: Luis Chamberlain <mcgrof@kernel.org>
Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>
Link: https://kdevops.org/ext4/v6.15-rc2.html # [0]
Link: https://lore.kernel.org/all/aAAEvcrmREWa1SKF@bombadil.infradead.org/ # [1]
Link: https://lore.kernel.org/20250418015921.132400-8-dave@stgolabs.net
Tested-by: kdevops@lists.linux.dev # [0] [1]
Reviewed-by: Luis Chamberlain <mcgrof@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
2025-04-22 18:16:08 +02:00
..
.kunitconfig
Kconfig
Makefile
acl.c
acl.h
balloc.c
bitmap.c
block_validity.c ext4: make block validity check resistent to sb bh corruption 2025-04-12 22:01:37 -04:00
crypto.c
dir.c ext4: fix OOB read when checking dotdot dir 2025-03-21 01:33:11 -04:00
ext4.h ext4: Make sb update interval tunable 2025-03-21 01:12:33 -04:00
ext4_extents.h
ext4_jbd2.c
ext4_jbd2.h ext4: avoid journaling sb update on error if journal is destroying 2025-03-21 01:12:33 -04:00
extents.c ext4: correct the error handle in ext4_fallocate() 2025-03-21 01:33:11 -04:00
extents_status.c
extents_status.h
fast_commit.c
fast_commit.h
file.c Ext4 bug fixes and cleanups, including: 2025-03-27 13:27:08 -07:00
fsmap.c
fsmap.h
fsync.c
hash.c ext4: hash: simplify kzalloc(n * 1, ...) to kzalloc(n, ...) 2025-03-21 01:10:10 -04:00
ialloc.c mm/migrate: fix sleep in atomic for large folios and buffer heads 2025-04-22 18:16:08 +02:00
indirect.c
inline.c - The 6 patch series "Enable strict percpu address space checks" from 2025-04-01 09:29:18 -07:00
inode-test.c
inode.c A few more miscellaneous ext4 bug fixes and cleanups including some 2025-04-13 07:15:50 -07:00
ioctl.c
mballoc-test.c
mballoc.c fs/ext4: use sleeping version of sb_find_get_block() 2025-04-22 18:16:08 +02:00
mballoc.h
migrate.c
mmp.c
move_extent.c
namei.c A few more miscellaneous ext4 bug fixes and cleanups including some 2025-04-13 07:15:50 -07:00
orphan.c
page-io.c Ext4 bug fixes and cleanups, including: 2025-03-27 13:27:08 -07:00
readpage.c
resize.c
super.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
symlink.c
sysfs.c ext4: Make sb update interval tunable 2025-03-21 01:12:33 -04:00
truncate.h
verity.c
xattr.c
xattr.h
xattr_hurd.c
xattr_security.c
xattr_trusted.c
xattr_user.c