]> git.baikalelectronics.ru Git - kernel.git/commit
nfsd: make nfsd4_scsi_identify_device retry with a larger buffer
authorScott Mayhew <smayhew@redhat.com>
Fri, 11 May 2018 15:19:00 +0000 (11:19 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Fri, 11 May 2018 16:20:29 +0000 (12:20 -0400)
commit33509553f09e0879896e7c604488de38904e6b96
tree45ce51cc059b74d7000988391a7f6384550a33d4
parent2d76895908bf407925f59e9af9ecac3ffe95c4ce
nfsd: make nfsd4_scsi_identify_device retry with a larger buffer

nfsd4_scsi_identify_device() performs a single IDENTIFY command for the
device identification VPD page using a small buffer.  If the reply is
too large to fit in this buffer then the GETDEVICEINFO reply will not
contain any info for the SCSI volume aside from the registration key.
This can happen for example if the device has descriptors using long
SCSI name strings.

When the initial reply from the device indicates a larger buffer is
needed, retry once using the page length from that reply.

Signed-off-by: Scott Mayhew <smayhew@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/blocklayout.c