[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YrS322LwMpQwiMT2@sol.localdomain>
Date: Thu, 23 Jun 2022 11:58:35 -0700
From: Eric Biggers <ebiggers@...nel.org>
To: "Darrick J. Wong" <djwong@...nel.org>
Cc: linux-block@...r.kernel.org, linux-api@...r.kernel.org,
linux-kernel@...r.kernel.org,
linux-f2fs-devel@...ts.sourceforge.net, linux-xfs@...r.kernel.org,
Keith Busch <kbusch@...nel.org>, linux-fscrypt@...r.kernel.org,
linux-fsdevel@...r.kernel.org, linux-ext4@...r.kernel.org
Subject: Re: [PATCH v3 1/8] statx: add direct I/O alignment information
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:
> > > 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),
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
Powered by blists - more mailing lists