]> git.ipfire.org Git - thirdparty/util-linux.git/commit - libblkid/src/superblocks/xfs.c
blkid: retport block size of a filesystem
authorMikulas Patocka <mpatocka@redhat.com>
Mon, 2 Sep 2019 10:28:39 +0000 (12:28 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 2 Sep 2019 10:55:53 +0000 (12:55 +0200)
commitcd129b7d2fecd5f2013512936de2db1bf244aa75
tree760036f82ede4348bf4f4276f9a64f2a7ef22a4f
parent530220b6bf35f5e7bb7d8558155512106b111a5a
blkid: retport block size of a filesystem

This patch extends libblkid, so that it reports filesystem block size.

When blkid returns a specific number in the BLOCK_SIZE attribute, it
guarantees that all the bios submitted by the filesystem are aligned on
this boundary.

We need this because when we want to enable dm-integrity or dm-writecache
on an existing filesystem, we need to know filesystem block size, so that
dm-integrity or dm-writecache is initialized with matching block size.

We could always use block size 512 for dm-integrity and dm-writecache, but
that would cause metadata overhead and performance degradation. On the
other hand, if we used block size 4096, it would fail if the filesystem
has smaller blocksize.

[kzak@redhat.com: - move vfat BLOCK_SIZE to probing function
  - remove unwanted debug fprintf from ZFS prober]

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
27 files changed:
libblkid/src/superblocks/apfs.c
libblkid/src/superblocks/befs.c
libblkid/src/superblocks/btrfs.c
libblkid/src/superblocks/exfat.c
libblkid/src/superblocks/exfs.c
libblkid/src/superblocks/ext.c
libblkid/src/superblocks/f2fs.c
libblkid/src/superblocks/gfs.c
libblkid/src/superblocks/hfs.c
libblkid/src/superblocks/hpfs.c
libblkid/src/superblocks/iso9660.c
libblkid/src/superblocks/jfs.c
libblkid/src/superblocks/minix.c
libblkid/src/superblocks/nilfs.c
libblkid/src/superblocks/ntfs.c
libblkid/src/superblocks/ocfs.c
libblkid/src/superblocks/reiserfs.c
libblkid/src/superblocks/romfs.c
libblkid/src/superblocks/squashfs.c
libblkid/src/superblocks/superblocks.c
libblkid/src/superblocks/superblocks.h
libblkid/src/superblocks/udf.c
libblkid/src/superblocks/ufs.c
libblkid/src/superblocks/vfat.c
libblkid/src/superblocks/vxfs.c
libblkid/src/superblocks/xfs.c
libblkid/src/superblocks/zfs.c