]> asedeno.scripts.mit.edu Git - linux.git/commit
pnfs/blocklayout: handle transient devices
authorBenjamin Coddington <bcodding@redhat.com>
Fri, 8 Dec 2017 17:52:59 +0000 (12:52 -0500)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Mon, 15 Jan 2018 04:06:29 +0000 (23:06 -0500)
commitb3dce6a2f0601be9b6781b394fdf6ceb63009a44
tree29a6db7a31e900e301a4cb26a7cb0b1c557c5aa1
parentd78471d32bb60837930026e11828af596fb4bdac
pnfs/blocklayout: handle transient devices

PNFS block/SCSI layouts should gracefully handle cases where block devices
are not available when a layout is retrieved, or the block devices are
removed while the client holds a layout.

While setting up a layout segment, keep a record of an unavailable or
un-parsable block device in cache with a flag so that subsequent layouts do
not spam the server with GETDEVINFO.  We can reuse the current
NFS_DEVICEID_UNAVAILABLE handling with one variation: instead of reusing
the device, we will discard it and send a fresh GETDEVINFO after the
timeout, since the lookup and validation of the device occurs within the
GETDEVINFO response handling.

A lookup of a layout segment that references an unavailable device will
return a segment with the NFS_LSEG_UNAVAILABLE flag set.  This will allow
the pgio layer to mark the layout with the appropriate fail bit, which
forces subsequent IO to the MDS, and prevents spamming the server with
LAYOUTGET, LAYOUTRETURN.

Finally, when IO to a block device fails, look up the block device(s)
referenced by the pgio header, and mark them as unavailable.

Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
fs/nfs/blocklayout/blocklayout.c
fs/nfs/blocklayout/dev.c
fs/nfs/pnfs.c
fs/nfs/pnfs.h
fs/nfs/pnfs_dev.c