lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240830073800.2131781-1-yi.zhang@huaweicloud.com>
Date: Fri, 30 Aug 2024 15:37:50 +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 00/10] ext4: clean up and refactor fallocate

From: Zhang Yi <yi.zhang@...wei.com>

Hello!

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 unifiy 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

Powered by Openwall GNU/*/Linux Powered by OpenVZ