On Tue, Jul 02, 2024 at 07:29:14PM -0700, Darrick J. Wong wrote: > Oooh, that's a good idea. Let me fiddle with that & tack it on the end? > > Hmm. How do we query the discard granularity from a userspace program? > I can try to guess the /sys/block/XXX root from the devices passed in, > or maybe libblkid will tell me? And then I'd have to go open > queue/discard_granularity underneath that to read that. Good question. As far as I can tell there is no simply ioctl for it. I really wonder if we need an extensible block topology ioctl that we can keep adding files for new queue limits, to make it easy to query them from userspace without all that sysfs mess.. > That's going to take a day or so, I suspect. :/ No rush, just noticed it. Note that for the discard granularity we should also look at the alignment and not just the size.