[pnfs] [PATCH 06/32] pnfs: allow io error to propagate up.
Fred Isaman
iisaman at citi.umich.edu
Fri Mar 21 16:52:57 EDT 2008
This allows the panlayout driver to propagate error codes up as before.
Signed-off-by: Fred Isaman <iisaman at citi.umich.edu>
---
fs/nfs/read.c | 4 ++--
fs/nfs/write.c | 4 ++--
include/linux/nfs_xdr.h | 2 ++
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/fs/nfs/read.c b/fs/nfs/read.c
index 1548531..7c9f143 100644
--- a/fs/nfs/read.c
+++ b/fs/nfs/read.c
@@ -228,8 +228,8 @@ static int nfs_read_rpcsetup(struct nfs_page *req, struct nfs_read_data *data,
#ifdef CONFIG_PNFS
ret = pnfs_try_to_read_data(data, call_ops);
- if (ret <= 0)
- return ret;
+ if (ret == 0)
+ return data->pnfs_error;
#endif /* CONFIG_PNFS*/
nfs_initiate_read(data, NFS_CLIENT(inode), call_ops);
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index bbca2f9..d6cd10b 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -808,8 +808,8 @@ static int nfs_write_rpcsetup(struct nfs_page *req,
#ifdef CONFIG_PNFS
ret = pnfs_try_to_write_data(data, call_ops, how);
- if (ret <= 0)
- return ret;
+ if (ret == 0)
+ return data->pnfs_error;
#endif /* CONFIG_PNFS */
nfs_initiate_write(data, NFS_CLIENT(inode), call_ops, how);
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index d991743..285db54 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -1047,6 +1047,7 @@ struct nfs_read_data {
const struct rpc_call_ops *call_ops;
struct rpc_clnt *pnfs_client; /* Holds pNFS device across async calls */
int pnfsflags;
+ int pnfs_error;
__u64 orig_offset;
struct nfs_client *ds_nfs_client;
#endif /* CONFIG_PNFS */
@@ -1081,6 +1082,7 @@ struct nfs_write_data {
struct rpc_clnt *pnfs_client; /* Holds pNFS device across
async calls */
int pnfsflags;
+ int pnfs_error;
__u64 orig_offset;
int how; /* for FLUSH_STABLE */
struct nfs_client *ds_nfs_client;
--
1.5.3.3
More information about the pNFS
mailing list