I'm not against the sysfs file, but for applications this is a horrible interface. We really need something that works on the fd. 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.