From: Keith Busch <kbusch@kernel.org>
To: Christoph Hellwig <hch@lst.de>
Cc: "Darrick J. Wong" <djwong@kernel.org>,
cem@kernel.org, linux-xfs@vger.kernel.org
Subject: Re: [PATCH v2] xfs: implement XFS_IOC_DIOINFO in terms of vfs_getattr
Date: Tue, 26 Aug 2025 10:57:28 -0600 [thread overview]
Message-ID: <aK3neNcY1vA9lubz@kbusch-mbp> (raw)
In-Reply-To: <20250826131447.GA527@lst.de>
On Tue, Aug 26, 2025 at 03:14:47PM +0200, Christoph Hellwig wrote:
> On Mon, Aug 25, 2025 at 08:29:36AM -0700, Darrick J. Wong wrote:
> > > - if (xfs_is_cow_inode(ip))
> > > - da.d_miniosz = xfs_inode_alloc_unitsize(ip);
> > > - else
> > > - da.d_miniosz = target->bt_logical_sectorsize;
> > > + da.d_mem = roundup(st.dio_mem_align, sizeof(void *));
> >
> > ...though one thing I /do/ wonder is whether this roundup() should be in
> > the vfs statx code? Do people need to be able to initiate directio with
> > buffers that are not aligned even to pointer size?
>
> I've added Keith to Cc who is on a quest to reduce alignment requirement
> as much as possible to add some input. But as the new statx interface
> never had it, adding it now seems off. Also dword (4 byte) alignment
> is pretty common in all kinds of storage specifications, so being able
> to support this for things running on top of file systems seems like
> a good idea in general.
Yeah, dword dma support is so common in part because that's the
granularity of PCIe TLP lengths.
Not sure what to say about this patch right now, but it triggered
a thought: if I can successfully get filesystem and block layers to
tolerate the hardware's minimum alignments, how is user space to know
it's allowed to send IO aligned to it? The existing statx dio fields
just refer to address alignments, but lengths are still assumed to be
block sized.
next prev parent reply other threads:[~2025-08-26 16:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cG84V92R_rvXt_xDUKDRAZU_E6E69atqXw04uiv_deBLGkFtMFj_XYvumw4sZh6EOFZpn33yItQ55aPJs5hNNw==@protonmail.internalid>
2025-08-25 11:15 ` [PATCH v2] xfs: implement XFS_IOC_DIOINFO in terms of vfs_getattr Christoph Hellwig
2025-08-25 11:32 ` Carlos Maiolino
2025-08-25 11:33 ` Christoph Hellwig
2025-08-25 15:29 ` Darrick J. Wong
2025-08-26 13:14 ` Christoph Hellwig
2025-08-26 16:57 ` Keith Busch [this message]
2025-08-27 7:36 ` Christoph Hellwig
2025-08-28 13:19 ` Carlos Maiolino
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aK3neNcY1vA9lubz@kbusch-mbp \
--to=kbusch@kernel.org \
--cc=cem@kernel.org \
--cc=djwong@kernel.org \
--cc=hch@lst.de \
--cc=linux-xfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox