* libblkid filesystem block size
@ 2018-10-03 21:41 Mikulas Patocka
2018-10-04 9:43 ` Karel Zak
0 siblings, 1 reply; 2+ messages in thread
From: Mikulas Patocka @ 2018-10-03 21:41 UTC (permalink / raw)
To: Vojtech Trefny, Karel Zak; +Cc: Mike Snitzer, dm-devel, lvm-devel, util-linux
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: libblkid filesystem block size
2018-10-03 21:41 libblkid filesystem block size Mikulas Patocka
@ 2018-10-04 9:43 ` Karel Zak
0 siblings, 0 replies; 2+ messages in thread
From: Karel Zak @ 2018-10-04 9:43 UTC (permalink / raw)
To: Mikulas Patocka
Cc: Vojtech Trefny, Mike Snitzer, dm-devel, lvm-devel, util-linux
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@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-10-04 16:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-03 21:41 libblkid filesystem block size Mikulas Patocka
2018-10-04 9:43 ` Karel Zak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).