On Sun, May 15, 2022 at 11:52:46PM -0700, Christoph Hellwig wrote: > I'm not against the sysfs file, but for applications this is a > horrible interface. We really need something that works on the fd. Yeah, sysfs is not very convenient for the intended use. > The XFS_IOC_DIOINFO ioctl from xfs is one, although ugly, option. > The other is to export the alignment requirements through statx. > We had that whole discussion with the inline crypto direct I/O support, > and we really need to tackle it rather sooner than later. I'll try out assigning one of the spares in 'struct statx' for the purpose. I like the interface for that, and looks easy enough to pass along the dma alignment requirement through it.