On Wed, May 06, 2020 at 03:08:47PM +0200, Karel Zak wrote: > On Tue, May 05, 2020 at 04:31:45PM +0200, Anthony Iliopoulos wrote: > > The dax (direct access) blockdev capability is exposed via sysfs, add it > > to the list of topology values to be obtained while probing. > > > > Expose blkid_topology_get_dax() symbol that programs can link against > > for querying the capability. > > Do we have any use-case for this change? > > We maintain blkid_topology_* mostly for mkfs-like programs portability > (years ago we had only ioctls, etc..). You can see that libblkid export > only small subset topology stuff, so why we need DAX there? ;-) The use-case is indeed mkfs. I am planning to submit a patch to xfsprogs that warns if the blockdev is dax-capable but the default or specified fs blocksize isn't matching the platform page size (in which case the fs cannot be used/mounted with dax). This comes up with archs like ppc64 where the page size is larger than the default (usually 4K) fs blocksize. I wanted to avoid parsing sysfs from xfsprogs, especially given that libblkid is already leveraged there to obtain the topology, and I assume it may be handy for e2fsprogs too, as ext4 (and any other fs that may support dax in the future) is bound to the same restriction.