Re: [PATCH v2] xfs: implement XFS_IOC_DIOINFO in terms of vfs_getattr

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux