linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/9] ext4: fix stale extent status entries and clairfy rules
@ 2025-04-23  8:52 Zhang Yi
  2025-04-23  8:52 ` [PATCH 1/9] ext4: ext4: unify EXT4_EX_NOCACHE|NOFAIL flags in ext4_ext_remove_space() Zhang Yi
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: Zhang Yi @ 2025-04-23  8:52 UTC (permalink / raw)
  To: linux-ext4
  Cc: linux-fsdevel, linux-kernel, tytso, adilger.kernel, jack,
	yi.zhang, yi.zhang, libaokun1, yukuai3, yangerkun

This patch series addresses the potential problems discussed with Jan
Kara regarding the modification rules for mapping extents[1]. Preparing
for the buffered I/O conversion for regular files.

This change includes:

Patch 1-5 fixes problems related to stale extent status entries that
may arise during the collapsing of ranges, the insertion of ranges, or
file truncation when these operations compete with concurrent writeback,
fiemap, or get extent cache.

Patch 6-8 adds a helper function to verify whether the context for
modifying extents is safe when EXT4_DEBUG is enabled. It primarily
checks the inode's i_rwsem and the mapping's invalidate_lock.

Patch 9 adds a comment to clarify the rules for loading, mapping,
modifying, and removing extents.

Please refer to the following patches for details.

[1] https://lore.kernel.org/linux-ext4/20241211160047.qnxvodmbzngo3jtr@quack3/

Thanks,
Yi.

Zhang Yi (9):
  ext4: ext4: unify EXT4_EX_NOCACHE|NOFAIL flags in
    ext4_ext_remove_space()
  ext4: generalize EXT4_GET_BLOCKS_IO_SUBMIT flag usage
  ext4: prevent stale extent cache entries caused by concurrent I/O
    writeback
  ext4: prevent stale extent cache entries caused by concurrent fiemap
  ext4: prevent stale extent cache entries caused by concurrent get
    es_cache
  ext4: factor out is_special_ino()
  ext4: introduce ext4_check_map_extents_env() debug helper
  ext4: check env when mapping and modifying extents
  ext4: clairfy the rules for modifying extents

 fs/ext4/ext4.h           | 26 ++++++++++++---
 fs/ext4/extents.c        | 54 ++++++++++++++++++++----------
 fs/ext4/extents_status.c | 35 ++++++++++++++++++--
 fs/ext4/fast_commit.c    |  4 ++-
 fs/ext4/inode.c          | 71 +++++++++++++++++++++++++++++++---------
 fs/ext4/ioctl.c          |  8 ++++-
 6 files changed, 157 insertions(+), 41 deletions(-)

-- 
2.46.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2025-05-20 14:40 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-23  8:52 [PATCH 0/9] ext4: fix stale extent status entries and clairfy rules Zhang Yi
2025-04-23  8:52 ` [PATCH 1/9] ext4: ext4: unify EXT4_EX_NOCACHE|NOFAIL flags in ext4_ext_remove_space() Zhang Yi
2025-04-23  8:52 ` [PATCH 2/9] ext4: generalize EXT4_GET_BLOCKS_IO_SUBMIT flag usage Zhang Yi
2025-04-23  8:52 ` [PATCH 3/9] ext4: prevent stale extent cache entries caused by concurrent I/O writeback Zhang Yi
2025-04-23  8:52 ` [PATCH 4/9] ext4: prevent stale extent cache entries caused by concurrent fiemap Zhang Yi
2025-04-23  8:52 ` [PATCH 5/9] ext4: prevent stale extent cache entries caused by concurrent get es_cache Zhang Yi
2025-04-23  8:52 ` [PATCH 6/9] ext4: factor out is_special_ino() Zhang Yi
2025-04-23  8:52 ` [PATCH 7/9] ext4: introduce ext4_check_map_extents_env() debug helper Zhang Yi
2025-04-23  8:52 ` [PATCH 8/9] ext4: check env when mapping and modifying extents Zhang Yi
2025-04-23  8:52 ` [PATCH 9/9] ext4: clairfy the rules for " Zhang Yi
2025-05-20 14:40 ` [PATCH 0/9] ext4: fix stale extent status entries and clairfy rules Theodore Ts'o

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).