The following patches update the pNFS/flexfiles layout driver. The main feature enhancements revolve around adding support for the NFSv4.2 LAYOUTERROR operation. This was seen as necessary in order to fix a livelock issue that can occur if the client has lots of outstanding I/O, but the DS is down. In that case, we currently file an error that is supposed to get sent to the server as part of LAYOUTRETURN. However if the I/O retries are occurring quickly enough so that we keep renewing the layout, then we end up never being able to send the layoutreturn, the server ends up never getting notified about the error condition, and just keeps handing out the same layout over and over again in response to new LAYOUTGETs. By sending the LAYOUTERROR without needing to return the layout, we can break the cycle. Trond Myklebust (19): NFSv4/flexfiles: Fix invalid deref in FF_LAYOUT_DEVID_NODE() NFS/flexfiles: Fix up sparse RCU annotations NFSv4/pnfs: Fix barriers in nfs4_mark_deviceid_unavailable() NFSv4/flexfiles: Abort I/O early if the layout segment was invalidated NFSv4.2: Add client support for the generic 'layouterror' RPC call NFS/flexfiles: Send LAYOUTERROR when failing over mirrored reads NFSv4: Handle early exit in layoutget by returning an error NFS/flexfiles: refactor calls to fs4_ff_layout_prepare_ds() NFS/flexfiles: Avoid unnecessary layout invalidations NFS/flexfiles: Remove bogus checks for invalid deviceids NFS/flexfiles: Don't invalidate DS deviceids for being unresponsive NFS/flexfiles: Speed up read failover when DSes are down NFS/flexfiles: Simplify nfs4_ff_layout_select_ds_fh() NFS/flexfiles: Simplify nfs4_ff_find_or_create_ds_client() NFS/flexfiles: Simplify ff_layout_get_ds_cred() NFS/flexfile: Simplify nfs4_ff_layout_ds_version() NFS/flexfile: Simplify nfs4_ff_layout_select_ds_stateid() NFS/flexfiles: Remove dead code in ff_layout_mirror_valid() NFS/flexfiles: Clean up mirror DS initialisation fs/nfs/flexfilelayout/flexfilelayout.c | 216 ++++++++++++++++------ fs/nfs/flexfilelayout/flexfilelayout.h | 75 ++++---- fs/nfs/flexfilelayout/flexfilelayoutdev.c | 150 +++++---------- fs/nfs/nfs42.h | 3 + fs/nfs/nfs42proc.c | 164 ++++++++++++++++ fs/nfs/nfs42xdr.c | 99 ++++++++++ fs/nfs/nfs4proc.c | 9 +- fs/nfs/nfs4xdr.c | 1 + fs/nfs/pnfs.h | 1 + fs/nfs/pnfs_dev.c | 13 ++ include/linux/nfs4.h | 1 + include/linux/nfs_fs_sb.h | 1 + include/linux/nfs_xdr.h | 35 ++++ include/linux/sunrpc/sched.h | 1 + net/sunrpc/xprt.c | 7 + 15 files changed, 571 insertions(+), 205 deletions(-) -- 2.20.1