public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/6] ext4: make ext4_map_blocks() recognize delalloc only extent
@ 2024-01-05  3:30 Zhang Yi
  2024-01-05  3:30 ` [PATCH v3 1/6] ext4: refactor ext4_da_map_blocks() Zhang Yi
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Zhang Yi @ 2024-01-05  3:30 UTC (permalink / raw)
  To: linux-ext4
  Cc: tytso, adilger.kernel, jack, yi.zhang, yi.zhang, chengzhihao1,
	yukuai3

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@huaweicloud.com/
v1: https://lore.kernel.org/linux-ext4/20231121093429.1827390-1-yi.zhang@huaweicloud.com/

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@huaweicloud.com/

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


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

end of thread, other threads:[~2024-01-05 11:17 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-05  3:30 [PATCH v3 0/6] ext4: make ext4_map_blocks() recognize delalloc only extent Zhang Yi
2024-01-05  3:30 ` [PATCH v3 1/6] ext4: refactor ext4_da_map_blocks() Zhang Yi
2024-01-05  3:30 ` [PATCH v3 2/6] ext4: convert to exclusive lock while inserting delalloc extents Zhang Yi
2024-01-05  3:30 ` [PATCH v3 3/6] ext4: correct the hole length returned by ext4_map_blocks() Zhang Yi
2024-01-05 10:17   ` Jan Kara
2024-01-05 11:17     ` Zhang Yi
2024-01-05  3:30 ` [PATCH v3 4/6] ext4: add a hole extent entry in cache after punch Zhang Yi
2024-01-05  3:30 ` [PATCH v3 5/6] ext4: make ext4_map_blocks() distinguish delalloc only extent Zhang Yi
2024-01-05 10:18   ` Jan Kara
2024-01-05  3:30 ` [PATCH v3 6/6] ext4: make ext4_set_iomap() recognize IOMAP_DELALLOC map type Zhang Yi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox