OSDN Git Service

nfsd/blocklayout: use ->get_unique_id instead of sending SCSI commands
authorChristoph Hellwig <hch@lst.de>
Thu, 21 Oct 2021 06:06:03 +0000 (08:06 +0200)
committerJens Axboe <axboe@kernel.dk>
Fri, 22 Oct 2021 14:33:57 +0000 (08:33 -0600)
commit8c6aabd1c72bc241c55f5b71a86cea5ef28bceca
tree8a466aafe1c4ab3c068a316ba57b99b5da0100f7
parentb83ce214af3885437ff223b3a0c8ec6072a84167
nfsd/blocklayout: use ->get_unique_id instead of sending SCSI commands

Call the ->get_unique_id method to query the SCSI identifiers.  This can
use the cached VPD page in the sd driver instead of sending a command
on every LAYOUTGET.  It will also allow to support NVMe based volumes
if the draft for that ever takes off.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: J. Bruce Fields <bfields@redhat.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Link: https://lore.kernel.org/r/20211021060607.264371-4-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/nfsd/Kconfig
fs/nfsd/blocklayout.c
fs/nfsd/nfs4layouts.c