diff options
| author | Jianan Huang <jnhuang95@gmail.com> | 2026-10-12 10:54:42 +0800 |
|---|---|---|
| committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2026-10-15 23:08:41 +0000 |
| commit | f6f8f34480c78eade6542faea6386c47c9b4c6b3 (patch) | |
| tree | fe95901d633c80d443aaef97db2f8cbb1295763e /tools/lib/python/kdoc/python_version.py | |
| parent | 53b12b63304b34a3850a901c4de3cc6ad08e0aee (diff) | |
f2fs: quota: fix quota flush failure during filesystem freeze
Quota flush retries can be exhausted during filesystem freeze.
freeze_super() and the quota checkpoint may race as below.
freeze_super() f2fs_ckpt
- down_write(&sb->s_umount)
- sb->s_writers.frozen = SB_FREEZE_PAGEFAULT
- sync_filesystem()
- f2fs_sync_fs()
- f2fs_issue_checkpoint()
- queue CP_SYNC -----------------> - block_operations()
- down_read_trylock(s_umount)
: fails; freeze holds write lock
- quota flush retries exhausted
- set CP_QUOTA_NEED_FSCK_FLAG
During the PAGEFAULT sync pass, freeze_super() holds s_umount for
write, but umount_lock_holder is not set until f2fs_freeze(). Thus
quota writeback tries to acquire s_umount again and can exhaust retries.
With checkpoint merge enabled, f2fs_issue_checkpoint() may dispatch
CP_SYNC to f2fs_ckpt. That thread also cannot acquire the freeze lock.
Record current as umount_lock_holder around the VFS PAGEFAULT sync so
checkpoint runs in the freeze caller and quota flush uses its existing
s_umount write lock.
Fixes: eb85c2410d6f ("f2fs: quota: fix to avoid warning in dquot_writeback_dquots()")
Signed-off-by: Jianan Huang <jnhuang95@gmail.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'tools/lib/python/kdoc/python_version.py')
0 files changed, 0 insertions, 0 deletions
