[pnfs] [PATCH] delay asking for layout if no layout
Benny Halevy
bhalevy at panasas.com
Tue Sep 4 13:32:43 EDT 2007
ACK
Note to myself: closing the file clears this state.
On Tue, Sep 04 2007 at 19:23:54 +0300, Marc Eshel <eshel at almaden.ibm.com> wrote:
> 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;
> }
> _______________________________________________
> pNFS mailing list
> pNFS at linux-nfs.org
> http://linux-nfs.org/cgi-bin/mailman/listinfo/pnfs
More information about the pNFS
mailing list