Thread (19 messages) 19 messages, 4 authors, 2022-07-20

Re: [PATCH v3 1/8] statx: add direct I/O alignment information

From: Eric Biggers <ebiggers@kernel.org>
Date: 2022-06-23 19:29:31
Also in: linux-block, linux-ext4, linux-f2fs-devel, linux-fscrypt, linux-fsdevel, linux-xfs, lkml

On Thu, Jun 23, 2022 at 10:23:20AM -0700, Eric Biggers wrote:
On Thu, Jun 23, 2022 at 08:58:12AM -0700, Darrick J. Wong wrote:
quoted
quoted
diff --git a/include/linux/stat.h b/include/linux/stat.h
index 7df06931f25d8..ff277ced50e9f 100644
--- a/include/linux/stat.h
+++ b/include/linux/stat.h
@@ -50,6 +50,8 @@ struct kstat {
 	struct timespec64 btime;			/* File creation time */
 	u64		blocks;
 	u64		mnt_id;
+	u32		dio_mem_align;
+	u32		dio_offset_align;
Hmm.  Does the XFS port of XFS_IOC_DIOINFO to STATX_DIOALIGN look like
this?

	struct xfs_buftarg	*target = xfs_inode_buftarg(ip);

	kstat.dio_mem_align = target->bt_logical_sectorsize;
	kstat.dio_offset_align = target->bt_logical_sectorsize;
	kstat.result_mask |= STATX_DIOALIGN;
Yes, I think so.
By the way, the patchset "[PATCHv6 00/11] direct-io dma alignment"
(https://lore.kernel.org/linux-block/20220610195830.3574005-1-kbusch@fb.com/T/#u (local)),
which is currently queued in linux-block/for-next for 5.20, will relax the user
buffer alignment requirement to the dma alignment for all filesystems using the
iomap direct I/O implementation.  If that goes in, the XFS implementation of
STATX_DIOALIGN, as well as the ext4 and f2fs ones, will need to be changed
accordingly.  Also, the existing XFS_IOC_DIOINFO will need to be changed.

- Eric
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help