[dm-devel] libblkid filesystem block size
Karel Zak
kzak at redhat.com
Thu Oct 4 09:43:29 UTC 2018
Ahoj,
On Wed, Oct 03, 2018 at 05:41:59PM -0400, Mikulas Patocka wrote:
> As you maintain libblkid, I'd like to ask - would it be possible to add
> detection of filesystem block size to it? libblkid already has description
> of various filesystem superblocks, so it shouldn't be too hard.
we had something like this (and also FS size) in our TODO for years.
So, I don't see problem to add it now. Send patch ;-)
All you need is to add
libblkid/src/superblocks/superblocks.c: blkid_probe_set_fs_blocksize()
to add "BLKSZ" variable to the probing result (use for example
blkid_probe_set_version() as a template).
And then use this function in FS specific probers. The variable will
automatically visible for udev as ID_FS_BLKSZ=.
Karel
--
Karel Zak <kzak at redhat.com>
http://karelzak.blogspot.com
More information about the dm-devel
mailing list