[pnfs] [PATCH] delay asking for layout if no layout

Marc Eshel eshel at almaden.ibm.com
Tue Sep 4 12:23:54 EDT 2007


From: Marc Eshel <eshel at almaden.ibm.com>


---

 fs/nfs/pnfs.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index feb3c80..80761b4 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -502,11 +502,15 @@ virtual_update_layout(struct inode* ino,
 			nfsi->pnfs_layout_suspend = get_seconds() + 1;
 			dprintk("%s: layout_get suspended until %ld\n",
 			        __FUNCTION__, nfsi->pnfs_layout_suspend);
-			/* FALLTHROUGH */
+			break;
 		case -EINVAL:	/* NFS4ERR_INVAL, NFSERR_BADIOMODE, NFS4ERR_UNKNOWN_LAYOUTTYPE */
 		case -ENOTSUPP:	/* NFS4ERR_LAYOUTUNAVAILABLE */
 		case -ETOOSMALL:/* NFS4ERR_TOOSMALL */
 		default:
+			/* suspend layout get for ever for this file */
+			nfsi->pnfs_layout_suspend = 0;
+			dprintk("%s: no layout_get until %ld\n",
+			        __FUNCTION__, nfsi->pnfs_layout_suspend);
 			/* mark with NFS_INO_LAYOUT_FAILED */
 			break;
 		}


More information about the pNFS mailing list