[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240904062925.716856-1-yi.zhang@huaweicloud.com>
Date: Wed, 4 Sep 2024 14:29:15 +0800
From: Zhang Yi <yi.zhang@...weicloud.com>
To: linux-ext4@...r.kernel.org
Cc: linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org,
tytso@....edu,
adilger.kernel@...ger.ca,
jack@...e.cz,
ritesh.list@...il.com,
yi.zhang@...wei.com,
yi.zhang@...weicloud.com,
chengzhihao1@...wei.com,
yukuai3@...wei.com
Subject: [PATCH v2 00/10] ext4: clean up and refactor fallocate
From: Zhang Yi <yi.zhang@...wei.com>
Changes since v1:
- Fix an using uninitialized variable problem in the error out path in
ext4_do_fallocate() in patch 08.
Current ext4 fallocate code is mess with mode checking, locking, input
parameter checking, position calculation, and having some stale code.
Almost all of the five sub-functions have the same preparation, it
deserve a clean up now.
This series tries to clean this up by refactor all fallocate related
operations, it unify variable naming, reduce some unnecessary position
calculation, factor out one common helper to check input parameters, and
also foctor out one common helper to wait for the dios to finish, hold
filemap invalidate lock, write back dirty data and drop page cache.
The first patch fix a potential data loss problem when punch hole, zero
range and collapse range by always write back dirty pages. Later patchs
do cleanup and refactor work, please see them for details. After this
series, we can reduce a lot of redundant code and make it more clear
than before.
Thanks,
Yi.
Zhang Yi (10):
ext4: write out dirty data before dropping pages
ext4: don't explicit update times in ext4_fallocate()
ext4: drop ext4_update_disksize_before_punch()
ext4: refactor ext4_zero_range()
ext4: refactor ext4_punch_hole()
ext4: refactor ext4_collapse_range()
ext4: refactor ext4_insert_range()
ext4: factor out ext4_do_fallocate()
ext4: factor out the common checking part of all fallocate operations
ext4: factor out a common helper to lock and flush data before
fallocate
fs/ext4/ext4.h | 5 +-
fs/ext4/extents.c | 566 +++++++++++++++++++---------------------------
fs/ext4/inode.c | 173 ++++----------
3 files changed, 278 insertions(+), 466 deletions(-)
--
2.39.2
Powered by blists - more mailing lists