]> git.ipfire.org Git - thirdparty/util-linux.git/commit
blkzone: fix whole device detection
authorKarel Zak <kzak@redhat.com>
Fri, 8 Jun 2018 09:37:55 +0000 (11:37 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 11 Jul 2018 14:09:12 +0000 (16:09 +0200)
commit8f6f3257e19b70eeb70b959217dc31b99c94116c
treee8cb0f77c0d7095df8852d2026f3a5ab6a4ca5e6
parentd38eb373a687a14b09fc9db8ad94bcc9a30a71a2
blkzone: fix whole device detection

Matias Bjørling wrote:
  The current detection code for chunk size assumes that the
  underlying device is a device that uses the minor device id
  as the partition id, and that the whole device has minor id 0.
  This is not true for example null_blk and nvme device drivers.

Let's use sysfs_devno_to_wholedisk() to get whole-disk devno.

Addresses: https://github.com/karelzak/util-linux/pull/646
Reported-by: Matias Bjørling matias.bjorling@wdc.com
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/blkzone.c