public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Add FL_WRITE_ZEROES to XFS, fix krealloc on xfs_uuid_table
@ 2025-10-21 14:17 Lukas Herbolt
  2025-10-21 14:17 ` [PATCH] xfs: add FALLOC_FL_WRITE_ZEROES to XFS code base Lukas Herbolt
  2025-10-21 14:17 ` [PATCH 2/2] xfs: Remove WARN_ONCE if xfs_uuid_table grows over 2x PAGE_SIZE Lukas Herbolt
  0 siblings, 2 replies; 25+ messages in thread
From: Lukas Herbolt @ 2025-10-21 14:17 UTC (permalink / raw)
  To: djwong; +Cc: linux-xfs, Lukas Herbolt

[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/20251002122823.1875398-2-lukas@herbolt.com/

[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(-)

-- 
2.51.0


^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2025-12-15 14:28 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-21 14:17 [PATCH 0/2] Add FL_WRITE_ZEROES to XFS, fix krealloc on xfs_uuid_table Lukas Herbolt
2025-10-21 14:17 ` [PATCH] xfs: add FALLOC_FL_WRITE_ZEROES to XFS code base Lukas Herbolt
2025-10-21 15:55   ` Darrick J. Wong
2025-10-22  5:00   ` Christoph Hellwig
2025-10-22  7:13     ` Zhang Yi
2025-10-22  7:15       ` Christoph Hellwig
2025-10-22  7:27         ` Zhang Yi
2025-10-29 17:53           ` [PATCH v3] " Lukas Herbolt
2025-10-29 18:22             ` Darrick J. Wong
2025-10-30  7:27               ` Christoph Hellwig
2025-11-12 21:02                 ` [PATCH v4] " Lukas Herbolt
2025-11-13  6:59                   ` Christoph Hellwig
2025-11-14  8:55                     ` [PATCH v5] " Lukas Herbolt
2025-11-14  8:57                       ` Christoph Hellwig
2025-11-14 16:44                       ` Darrick J. Wong
2025-11-14 16:45                         ` Christoph Hellwig
2025-11-18  9:05                           ` lukas
2025-12-15 11:48                           ` [PATCH v6] " Lukas Herbolt
2025-12-15 14:28                             ` Christoph Hellwig
2025-10-30  7:29             ` [PATCH v3] " Christoph Hellwig
2025-10-21 14:17 ` [PATCH 2/2] xfs: Remove WARN_ONCE if xfs_uuid_table grows over 2x PAGE_SIZE Lukas Herbolt
2025-10-21 15:56   ` Darrick J. Wong
2025-10-21 22:02   ` Dave Chinner
2025-10-26 17:49     ` lukas
2025-10-22  4:53   ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox