mbox series

[v6,0/3] iomap: fix zero padding data issue in concurrent append writes

Message ID 20241209114241.3725722-1-leo.lilong@huawei.com (mailing list archive)
Headers show
Series iomap: fix zero padding data issue in concurrent append writes | expand

Message

Long Li Dec. 9, 2024, 11:42 a.m. UTC
Hi ALL,

This patch series fixes zero padding data issues in concurrent append write
scenarios. A detailed problem description and solution can be found in patch 2.
Patch 1 is introduced as preparation for the fix in patch 2, eliminating the
need to resample inode size for io_size trimming and avoiding issues caused
by inode size changes during concurrent writeback and truncate operations.
Patch 3 is a minor cleanup.


v5: https://lore.kernel.org/linux-xfs/20241127063503.2200005-1-leo.lilong@huawei.com/
v4: https://lore.kernel.org/linux-xfs/20241125023341.2816630-1-leo.lilong@huawei.com/
v3: https://lore.kernel.org/linux-xfs/20241121063430.3304895-1-leo.lilong@huawei.com/
v2: https://lore.kernel.org/linux-xfs/20241113091907.56937-1-leo.lilong@huawei.com/
v1: https://lore.kernel.org/linux-xfs/20241108122738.2617669-1-leo.lilong@huawei.com/

v5->v6:
  1. Introduce patch 1. 
  2. The io_size is trimmed based on the end_pos in patch 2.
  3. Update the fix tag to a more accurate in patch 2.
  4. Collect reviewed tag.

Long Li (3):
  iomap: pass byte granular end position to iomap_add_to_ioend
  iomap: fix zero padding data issue in concurrent append writes
  xfs: clean up xfs_end_ioend() to reuse local variables

 fs/iomap/buffered-io.c | 66 ++++++++++++++++++++++++++++++++++++------
 fs/xfs/xfs_aops.c      |  2 +-
 include/linux/iomap.h  |  2 +-
 3 files changed, 59 insertions(+), 11 deletions(-)

Comments

Christian Brauner Dec. 10, 2024, 10:15 a.m. UTC | #1
On Mon, 09 Dec 2024 19:42:38 +0800, Long Li wrote:
> This patch series fixes zero padding data issues in concurrent append write
> scenarios. A detailed problem description and solution can be found in patch 2.
> Patch 1 is introduced as preparation for the fix in patch 2, eliminating the
> need to resample inode size for io_size trimming and avoiding issues caused
> by inode size changes during concurrent writeback and truncate operations.
> Patch 3 is a minor cleanup.
> 
> [...]

Applied to the vfs.fixes branch of the vfs/vfs.git tree.
Patches in the vfs.fixes branch should appear in linux-next soon.

Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.

It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.

Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs.fixes

[1/3] iomap: pass byte granular end position to iomap_add_to_ioend
      https://git.kernel.org/vfs/vfs/c/f307c58239b5
[2/3] iomap: fix zero padding data issue in concurrent append writes
      https://git.kernel.org/vfs/vfs/c/33e72d56fb3a
[3/3] xfs: clean up xfs_end_ioend() to reuse local variables
      https://git.kernel.org/vfs/vfs/c/30e611890d89
Christoph Hellwig Dec. 10, 2024, 11:38 a.m. UTC | #2
Can you please drop the third patch?  We'll probably have something in
XFS that will conflict with it if not reabsed, so it's probably better
to merge it through the xfs tree so that everything can be properly
merged.
Christian Brauner Dec. 11, 2024, 10:09 a.m. UTC | #3
On Mon, 09 Dec 2024 19:42:38 +0800, Long Li wrote:
> This patch series fixes zero padding data issues in concurrent append write
> scenarios. A detailed problem description and solution can be found in patch 2.
> Patch 1 is introduced as preparation for the fix in patch 2, eliminating the
> need to resample inode size for io_size trimming and avoiding issues caused
> by inode size changes during concurrent writeback and truncate operations.
> Patch 3 is a minor cleanup.
> 
> [...]

Applied to the vfs.fixes branch of the vfs/vfs.git tree.
Patches in the vfs.fixes branch should appear in linux-next soon.

Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.

It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.

Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs.fixes

[1/3] iomap: pass byte granular end position to iomap_add_to_ioend
      https://git.kernel.org/vfs/vfs/c/b44679c63e4d
[2/3] iomap: fix zero padding data issue in concurrent append writes
      https://git.kernel.org/vfs/vfs/c/51d20d1dacbe
Christian Brauner Dec. 11, 2024, 10:34 a.m. UTC | #4
On Tue, Dec 10, 2024 at 03:38:48AM -0800, Christoph Hellwig wrote:
> Can you please drop the third patch?  We'll probably have something in
> XFS that will conflict with it if not reabsed, so it's probably better
> to merge it through the xfs tree so that everything can be properly
> merged.

Done.