]> git.ipfire.org Git - thirdparty/util-linux.git/commit
blkzone: Add --force option
authorShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Fri, 5 Jun 2020 05:06:18 +0000 (14:06 +0900)
committerKarel Zak <kzak@redhat.com>
Fri, 5 Jun 2020 07:15:32 +0000 (09:15 +0200)
commit6e103c7690fe4c07ea9dfe45c52c4c22e0281d0b
treecf428f951ef813638e30da4d069dfc96e68e7ca2
parent9bf622dad9650e8bcc02d17b9e627d6aa061d163
blkzone: Add --force option

Commit 7a2602f629fe ("blkzone: deny destructive ioctls on busy blockdev")
introduced exclusive mode to open block devices to submit zone management
ioctls. This avoids unintended status change of block devices used by the
system. However, it makes blkzone less usable for testing. For example,
the test case zbd/007 of blktests utilizes blkzone to reset zones of
block devices mapped to dm-linear devices. After the commit, the test
case fails with EBUSY error at blkzone reset, since the system uses the
reset target block device to map to the dm-linear device.

To allow blkzone to change status of zoned block devices used by the
system with intention, introduce --force option. With this option, block
devices are opened without exclusive mode.

Also fix too many periods in man page of --verbose option.

[kzak@redhat.com: - tiny cosmetic changes]

Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/blkzone.8
sys-utils/blkzone.c