From: Andy Adamson <andros@xxxxxxxxxx> When I/O sent to a file layout data server has a connection error,the I/O is resent to the MDS. As with all mulipath I/O, we want to fence one path, the DS I/O path, ASAP to prevent data corruption. PNFS provides the LAYOUTREURN call to fence file layout data servers. The current implementation of _pnfs_return_layout does not take a layout range but returns all layouts. It also does not wait for all layout segments to be marked invalid prior to sending a LAYOUTRETURN. This works well for the file layout driver. Other drives can address these issues if needed. The first patch calls LAYOUTRETURN for each failed data server I/O. The second patch blocks sending a LAYOUTCOMMIT on the returned layouts. Because LAYOUTRETURN is called on each failed data server request, it can be called multiple times. The third patch addresses this by setting a flag. The flag is cleared on subsequent LAYOUTGETs. The DS connection error also causes the deviceid using the DS to be marked invalid. This prevents any new layouts from subsequent LAYOUTGETs that use the invalid deviceid from being cached - but the layout hdr is not reaped, resulting in a pnfs_layout_hdr with an empty plh_segs list. New LAYOUTGETs are allowed because they can use a new valid deviceid, and in fact, this is currently the only way an MDS can use pNFS again for files with layouts referring to an invalid deviceid. pnfs_layout_hdrs with empty plh_segs lists are prevented from sending a LAYOUTRETURN (on evict inode) by the last patch. Testing: Against the pynfs file layout server and network partioning the client from the DS. Andy Adamson (4): NFSv4.1 return the LAYOUT for each file with failed DS connection I/O NFSv4.1 don't send LAYOUTCOMMIT if data resent through MDS NFSv4.1 mark layout when already returned NFSv4.1 do not send LAYOUTRETURN on emtpy plh_segs list fs/nfs/nfs4filelayout.c | 4 ++-- fs/nfs/pnfs.c | 33 +++++++++++++++++++++++++++------ fs/nfs/pnfs.h | 19 +++++++++++++++++++ 3 files changed, 48 insertions(+), 8 deletions(-) -- 1.7.6.4 -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html