[dm-devel] libblkid filesystem block size

Mikulas Patocka mpatocka at redhat.com
Wed Oct 3 21:41:59 UTC 2018


Hi

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.

LVM needs to know the block size because when it enables caching for a 
logical volume using the dm-writecache target or integrity protection 
using the dm-integrity target, the block size of the device mapper target 
should match the block size of the underlying filesystem (if the cache has 
smaller block size than the filesystem, it is inefficient, if the cache 
has larger block size than the filesystem, the filesystem won't mount).

Caching or integrity protection can be enabled on the fly for existing 
logical volumes (mounted or not mounted). XFS creates filesystems with 
512-byte block size even on some modern SSDs, so the problem with small 
block size exists even today.

Mikulas




More information about the dm-devel mailing list