pnfs/blocklayout: Don't add zero-length pnfs_block_dev
authorBenjamin Coddington <bcodding@redhat.com>
Tue, 5 Dec 2023 15:05:02 +0000 (10:05 -0500)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Thu, 4 Jan 2024 15:47:56 +0000 (10:47 -0500)
commitd76c769c8db4c321aa4d697e810e0ed0b30bcc91
treee14ab4faa411b48ed5d70bbbce696decb59413f3
parent1530827b90025cdf80c9b0d07a166d045a0a7b81
pnfs/blocklayout: Don't add zero-length pnfs_block_dev

We noticed a SCSI device that refused to allow READ CAPACITY when the
device had a PR with exclusive access, registrants only.  The result of
this situation is that the blocklayout driver adds a pnfs_block_dev of zero
length which always fails the offset_in_map tests.  Instead of continuously
trying to do pNFS for this case, just mark the device as unavailable which
will allow the client to fallback to the MDS for the duration of
PNFS_DEVICE_RETRY_TIMEOUT.

Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/blocklayout/dev.c