From: Zhang Yi <yi.zhang@huaweicloud.com>
To: linux-ext4@vger.kernel.org
Cc: tytso@mit.edu, adilger.kernel@dilger.ca, jack@suse.cz,
yi.zhang@huawei.com, yi.zhang@huaweicloud.com,
chengzhihao1@huawei.com, yukuai3@huawei.com
Subject: [PATCH v3 0/6] ext4: make ext4_map_blocks() recognize delalloc only extent
Date: Fri, 5 Jan 2024 11:30:12 +0800 [thread overview]
Message-ID: <20240105033018.1665752-1-yi.zhang@huaweicloud.com> (raw)
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
next reply other threads:[~2024-01-05 3:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-05 3:30 Zhang Yi [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240105033018.1665752-1-yi.zhang@huaweicloud.com \
--to=yi.zhang@huaweicloud.com \
--cc=adilger.kernel@dilger.ca \
--cc=chengzhihao1@huawei.com \
--cc=jack@suse.cz \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
--cc=yi.zhang@huawei.com \
--cc=yukuai3@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).