[PATCH v3 0/6] ext4: make ext4_map_blocks() recognize delalloc only extent

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



v2->v3:
 - Rename ext4_ext_determine_hole() to ext4_ext_determine_insert_hole()
   and keep setting of 'map' inside ext4_ext_map_blocks().
 - Don't set EXT4_MAP_DELAYED in ext4_ext_determine_insert_hole()
   because it's unreliable, and revise the comments.
v1->v2:
 - Fix a long standing race issue between determine hole and inserting
   new delalloc extent analyzed by Jan Kara.
 - Change method of adjusting hole length, instead of skip holes in
   ext4_map_blocks(), now we find delalloc and correct length and type
   in ext4_ext_determine_hole().

v2: https://lore.kernel.org/linux-ext4/20231223110223.3650717-1-yi.zhang@xxxxxxxxxxxxxxx/
v1: https://lore.kernel.org/linux-ext4/20231121093429.1827390-1-yi.zhang@xxxxxxxxxxxxxxx/

Hello, all!

I'm working on switching ext4 buffer IO from buffer_head to iomap
and enable large folio on regular file recently [1], this patch set
is one of a preparation of this work. It first fix a long standing race
issue between bmap querying and adding new delalloc extents, then
correct the hole length returned by ext4_map_blocks() when user querying
map type and blocks range, after that, make this function and
ext4_set_iomap() are able to distinguish delayed allocated only mapping
from hole, finally BTW cleanup the ext4_iomap_begin_report().

This preparation patch set changes the ext4 map -> iomap converting logic
in ext4_set_iomap(), so that the later buffer IO conversion can use this
helper to connect iomap frame. This patch set is already passed
'kvm-xfstests -g auto' tests.

Thanks,
Yi.

[1] https://lore.kernel.org/linux-ext4/20240102123918.799062-1-yi.zhang@xxxxxxxxxxxxxxx/

Zhang Yi (6):
  ext4: refactor ext4_da_map_blocks()
  ext4: convert to exclusive lock while inserting delalloc extents
  ext4: correct the hole length returned by ext4_map_blocks()
  ext4: add a hole extent entry in cache after punch
  ext4: make ext4_map_blocks() distinguish delalloc only extent
  ext4: make ext4_set_iomap() recognize IOMAP_DELALLOC map type

 fs/ext4/ext4.h    |   4 +-
 fs/ext4/extents.c | 114 +++++++++++++++++++++++++++++-----------------
 fs/ext4/inode.c   |  84 +++++++++++-----------------------
 3 files changed, 103 insertions(+), 99 deletions(-)

-- 
2.39.2





[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux