Skip to content

Commit fe44fb2

Browse files
Trond Myklebustamschuma-ntap
authored andcommitted
pNFS: Don't keep retrying if the server replied NFS4ERR_LAYOUTUNAVAILABLE
If the server tells us that a pNFS layout is not available for a specific file, then we should not keep pounding it with further layoutget requests. Fixes: 183d9e7 ("pnfs: rework LAYOUTGET retry handling") Signed-off-by: Trond Myklebust <[email protected]> Signed-off-by: Anna Schumaker <[email protected]>
1 parent f2906aa commit fe44fb2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

fs/nfs/pnfs.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2152,6 +2152,12 @@ pnfs_update_layout(struct inode *ino,
21522152
case -ERECALLCONFLICT:
21532153
case -EAGAIN:
21542154
break;
2155+
case -ENODATA:
2156+
/* The server returned NFS4ERR_LAYOUTUNAVAILABLE */
2157+
pnfs_layout_set_fail_bit(
2158+
lo, pnfs_iomode_to_fail_bit(iomode));
2159+
lseg = NULL;
2160+
goto out_put_layout_hdr;
21552161
default:
21562162
if (!nfs_error_is_fatal(PTR_ERR(lseg))) {
21572163
pnfs_layout_clear_fail_bit(lo, pnfs_iomode_to_fail_bit(iomode));

0 commit comments

Comments
 (0)