]> git.baikalelectronics.ru Git - kernel.git/commit
block: add ioctl to read the disk sequence number
authorMatteo Croce <mcroce@microsoft.com>
Mon, 12 Jul 2021 23:05:27 +0000 (01:05 +0200)
committerJens Axboe <axboe@kernel.dk>
Mon, 2 Aug 2021 19:37:28 +0000 (13:37 -0600)
commit826ee0cf5f47c922db8c1316b996d342b66f2f27
tree55e520657bdabf51a0a8428c2ab379bb640e576b
parent6c34a238cf2739b3f5294149efba33c0f655a328
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: Christoph Hellwig <hch@lst.de>
Signed-off-by: Matteo Croce <mcroce@microsoft.com>
Tested-by: Luca Boccassi <bluca@debian.org>
Link: https://lore.kernel.org/r/20210712230530.29323-4-mcroce@linux.microsoft.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/ioctl.c
include/uapi/linux/fs.h