Skip to content

Add FL_WRITE_ZEROES to XFS, fix krealloc on xfs_uuid_table

Lukas Herbolt linux-xfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest1 of 2 patches 4 repliesIn review

Changes in v1 from the cover letter

1 of 2 patches is in this archive. The cover letter announces 2.

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
2/2xfs: Remove WARN_ONCE if xfs_uuid_table grows over 2x PAGE_SIZE.fs/xfs/xfs_mount.c+1 -14 replies

Reviews trailers per patch

The patch has no Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchChristoph Hellwig
SeriesR-b R-b R-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] Add FL_WRITE_ZEROES to XFS, fix krealloc on xfs_uuid_table

[PATCH 1/2] xfs: add FALLOC_FL_WRITE_ZEROES to XFS code base Add support for FALLOC_FL_WRITE_ZEROES if the underlying device enable the unmap write zeroes operation.

Inspired by the Ext4 implementation of the FALLOC_FL_WRITE_ZEROES. It can speed up some patterns on specific hardware.

time ( ./fallocate -l 360M /mnt/test.file; dd if=/dev/zero of=/mnt/test \
bs=1M count=360 conv=notrunc,nocreat oflag=direct,dsync)

360+0 records in
360+0 records out
377487360 bytes (377 MB, 360 MiB) copied, 22.0027 s, 17.2 MB/s

real    0m22.114s
user    0m0.006s
sys     0m3.085s

time (./fallocate -wl 360M /mnt/test.file; dd if=/dev/zero of=/mnt/test \
bs=1M count=360 conv=notrunc,nocreat oflag=direct,dsync ); 360+0 records in
360+0 records out
377487360 bytes (377 MB, 360 MiB) copied, 2.02512 s, 186 MB/s

real    0m6.384s
user    0m0.002s
sys     0m5.823s

v2 changes:
use xfs_inode_buftarg to determine if the underlying device supports unmap write zeroes
v1 patch:
https://lore.kernel.org/linux-xfs/[email protected]/

[PATCH 2/2] xfs: Remove WARN_ONCE if xfs_uuid_table grows over 2x PAGE_SIZE. Currently using krealloc prints warning if the order is 2x PAGE_SIZE on x86_64 it's being trigered when we mount 511 XFS. Use kvrealloc instead.

Lukas Herbolt (2):
xfs: add FALLOC_FL_WRITE_ZEROES to XFS code base
xfs: Remove WARN_ONCE if xfs_uuid_table grows over 2x PAGE_SIZE.

 fs/xfs/xfs_bmap_util.c |  6 +++---
 fs/xfs/xfs_bmap_util.h |  4 ++--
 fs/xfs/xfs_file.c      | 25 ++++++++++++++++++-------
 fs/xfs/xfs_mount.c     |  2 +-
 4 files changed, 24 insertions(+), 13 deletions(-)
Signature · 1 line
2.51.0