diff --git a/disk-utils/blockdev.8.adoc b/disk-utils/blockdev.8.adoc index 8e8c3326c..16f1562ee 100644 --- a/disk-utils/blockdev.8.adoc +++ b/disk-utils/blockdev.8.adoc @@ -57,6 +57,9 @@ Print the blocksize in bytes. This size does not describe device topology. It's *--getdiscardzeroes*:: Get discard zeroes support status. +*--getdiskseq*:: +Get disk sequence number. + *--getfra*:: Get filesystem readahead in 512-byte sectors. diff --git a/disk-utils/blockdev.c b/disk-utils/blockdev.c index 6721560f6..58ed4df8b 100644 --- a/disk-utils/blockdev.c +++ b/disk-utils/blockdev.c @@ -168,6 +168,12 @@ static const struct bdc bdcms[] = .argtype = ARG_LONG, .argval = -1, .help = N_("get filesystem readahead") + },{ + IOCTL_ENTRY(BLKGETDISKSEQ), + .name = "--getdiskseq", + .argtype = ARG_ULLONG, + .argval = -1, + .help = N_("get disk sequence number") },{ IOCTL_ENTRY(BLKFLSBUF), .name = "--flushbufs", diff --git a/include/blkdev.h b/include/blkdev.h index 43a5f5224..ffecdcba0 100644 --- a/include/blkdev.h +++ b/include/blkdev.h @@ -64,6 +64,11 @@ # define BLKDISCARDZEROES _IO(0x12,124) # endif +/* disk sequence number, introduced in 5.15 (commit 7957d93b) */ +# ifndef BLKGETDISKSEQ +# define BLKGETDISKSEQ _IOR(0x12, 128, uint64_t) +# endif + /* filesystem freeze, introduced in 2.6.29 (commit fcccf502) */ # ifndef FIFREEZE # define FIFREEZE _IOWR('X', 119, int) /* Freeze */