[pnfs] [PATCH 4/9] layoutrecall: prepare for NFS4ERR_NOMATCHING_LAYOUT
Benny Halevy
bhalevy at panasas.com
Thu Aug 30 09:31:52 EDT 2007
just a placeholder for handling the NFS4ERR_NOMATCHING_LAYOUT condition
in the future
Signed-off-by: Benny Halevy <bhalevy at panasas.com>
---
fs/nfs/callback_proc.c | 3 ++-
fs/nfs/delegation.c | 4 ++++
2 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c
index c1a7b04..4929784 100644
--- a/fs/nfs/callback_proc.c
+++ b/fs/nfs/callback_proc.c
@@ -129,13 +129,14 @@ unsigned nfs4_callback_pnfs_layoutrecall(struct cb_pnfs_layoutrecallargs *args,
if (inode == NULL)
goto out_putclient;
}
+
/* Set up a helper thread to actually return the delegation */
switch(nfs_async_return_layout(clp, inode, args)) {
case 0:
res = 0;
break;
case -ENOENT:
- res = htonl(NFS4ERR_NOENT);
+ res = htonl(NFS4ERR_NOMATCHING_LAYOUT);
break;
default:
res = htonl(NFS4ERR_RESOURCE);
diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c
index a046287..014f5d6 100644
--- a/fs/nfs/delegation.c
+++ b/fs/nfs/delegation.c
@@ -471,6 +471,10 @@ int nfs_async_return_layout(struct nfs4_client *clp, struct inode *inode, void *
};
int status;
+ /* FIXME: check first if there are any layouts to returns,
+ * otherwise return -ENOENT (for NFS4ERR_NOMATCHING_LAYOUT)
+ */
+
data.rl = *rl;
init_completion(&data.started);
--
1.5.2.5
More information about the pNFS
mailing list