]> git.baikalelectronics.ru Git - kernel.git/commit
block: add a ->get_unique_id method
authorChristoph Hellwig <hch@lst.de>
Thu, 21 Oct 2021 06:06:01 +0000 (08:06 +0200)
committerJens Axboe <axboe@kernel.dk>
Fri, 22 Oct 2021 14:33:57 +0000 (08:33 -0600)
commitd87d948eb9485a003bb3b7262d7c1183d861ac10
tree9c2211e0d197b56670c14ad2267d9c4a8bbcf750
parent45acf9b009426798d7dd082a32d2d3b2fc3d8320
block: add a ->get_unique_id method

Add a method to query unique IDs from block devices.  It will be used to
remove code that deeply pokes into SCSI internals in the NFS server.
The implementation in the sd driver itself is also much nicer as it can
use the cached VPD page instead of always sending a command as the
current NFS code does.

For now the interface is kept very minimal but could be easily
extended when other users like a block-layer sysfs interface for
uniquue IDs shows up.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Link: https://lore.kernel.org/r/20211021060607.264371-2-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/linux/blkdev.h