Skip to content
Commit 7957d93b authored by Matteo Croce's avatar Matteo Croce Committed by Jens Axboe
Browse files

block: add ioctl to read the disk sequence number



Add a new BLKGETDISKSEQ ioctl which retrieves the disk sequence number
from the genhd structure.

    # ./getdiskseq /dev/loop*
    /dev/loop0:     13
    /dev/loop0p1:   13
    /dev/loop0p2:   13
    /dev/loop0p3:   13
    /dev/loop1:     14
    /dev/loop1p1:   14
    /dev/loop1p2:   14
    /dev/loop2:     5
    /dev/loop3:     6

Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarMatteo Croce <mcroce@microsoft.com>
Tested-by: default avatarLuca Boccassi <bluca@debian.org>
Link: https://lore.kernel.org/r/20210712230530.29323-4-mcroce@linux.microsoft.com


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 87eb7107
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment