From: Thomas Weißschuh Date: Wed, 26 Apr 2023 06:53:28 +0000 (+0200) Subject: blockdev: add support for BLKGETZONESZ X-Git-Tag: v2.40-rc1~468^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4832fd9f36fbb7a12771b8e8df1e749ff14cc462;p=thirdparty%2Futil-linux.git blockdev: add support for BLKGETZONESZ Signed-off-by: Thomas Weißschuh --- diff --git a/bash-completion/blockdev b/bash-completion/blockdev index 48ba8c7326..30eeff5299 100644 --- a/bash-completion/blockdev +++ b/bash-completion/blockdev @@ -13,6 +13,7 @@ _blockdev_module() --getro --getdiscardzeroes --getdiskseq + --getzonesz --getss --getpbsz --getiomin diff --git a/disk-utils/blockdev.8.adoc b/disk-utils/blockdev.8.adoc index 16f1562ee7..4eb3b32145 100644 --- a/disk-utils/blockdev.8.adoc +++ b/disk-utils/blockdev.8.adoc @@ -60,6 +60,9 @@ Get discard zeroes support status. *--getdiskseq*:: Get disk sequence number. +*--getzonesz*:: +Get zone size in 512-byte sectors. + *--getfra*:: Get filesystem readahead in 512-byte sectors. diff --git a/disk-utils/blockdev.c b/disk-utils/blockdev.c index 58ed4df8b8..646043eaae 100644 --- a/disk-utils/blockdev.c +++ b/disk-utils/blockdev.c @@ -10,6 +10,9 @@ #include #include #include +#ifdef HAVE_LINUX_BLKZONED_H +#include +#endif #include "c.h" #include "nls.h" @@ -175,6 +178,14 @@ static const struct bdc bdcms[] = .argval = -1, .help = N_("get disk sequence number") },{ +#ifdef HAVE_LINUX_BLKZONED_H + IOCTL_ENTRY(BLKGETZONESZ), + .name = "--getzonesz", + .argtype = ARG_UINT, + .argval = -1, + .help = N_("get zone size") + },{ +#endif IOCTL_ENTRY(BLKFLSBUF), .name = "--flushbufs", .help = N_("flush buffers")