[pnfs] [PATCH 18/20] 2.6-latest pnfs client remove PNFS_USE_DS flag

andros at umich.edu andros at umich.edu
Wed Nov 28 16:33:19 EST 2007


From: Andy Adamson <andros at umich.edu>

In 2.6.18.3, there are several read I/O paths through the nfs client code.
The PNFS_USE_DS flag was set to have an easy way to check if
I/O was to be performed to the storage device.

In 2.6.24, there is only one read I/O path through the client code. The
interface to the nfs page cache has been re-written. It is now shared between
the read and write code paths, and moved entirely to fs/nfs/pagelist.c.

There is no need for the PNFS_USE_DS flag.

Signed-off by: Andy Adamson<andros at umich.edu>
---
 fs/nfs/nfs4proc.c       |    2 +-
 fs/nfs/pnfs.c           |    3 ---
 include/linux/nfs_xdr.h |    7 ++++---
 3 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index c710cc2..aa40ab2 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -5014,7 +5014,7 @@ static int pnfs_proc_layoutcommit(struct pnfs_layoutcommit_data *data)
 	return -1;
 }
 
-static int nfs4_proc_pnfs_layoutreturn(struct nfs4_pnfs_layoutreturn* layout)
+static int pnfs4_proc_layoutreturn(struct nfs4_pnfs_layoutreturn* layout)
 {
 	struct inode* ino = layout->args->inode;
 	struct rpc_message msg = {
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index c837fca..b072ec0 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -1014,7 +1014,6 @@ int pnfs_try_to_read_data(struct nfs_read_data *data,
 	} else {
 		dprintk("%s Utilizing pNFS I/O\n",__FUNCTION__);
 		data->call_ops = call_ops;
-		data->pnfsflags |= PNFS_USE_DS;
 		if((status = pnfs_readpages(data)))
 			return status;
 		return 0;
@@ -1094,7 +1093,6 @@ int pnfs_try_to_write_data(struct nfs_write_data *data,
 	} else {
 		dprintk("%s Utilizing pNFS I/O\n",__FUNCTION__);
 		data->call_ops = call_ops;
-		data->pnfsflags |= PNFS_USE_DS;
 		data->how = how; /* XXX do we really need this? */
                 if((status = pnfs_writepages(data, how)))
 			return status;
@@ -1526,7 +1524,6 @@ pnfs_wsize(struct inode *inode, unsigned int count, struct nfs_write_data *wdata
 	if (count >= 0 && below_threshold(inode, count, 1))
 		return NFS_SERVER(inode)->wsize;
 
-	wdata->pnfsflags |= PNFS_USE_DS;
 	return NFS_SERVER(inode)->ds_wsize;
 }
 
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index 36b719c..a6f429b 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -1066,10 +1066,11 @@ struct nfs_read_data {
 	struct page		*page_array[NFS_PAGEVEC_SIZE];
 };
 
+#ifdef CONFIG_PNFS
 /* pnfsflag values */
-#define PNFS_ISSYNC            0x0001   /* sync I/O request */
-#define PNFS_USE_DS            0x0002   /* use data server I/O */
-#define PNFS_USE_FULL_CB       0x0004   /* non rpc result callback switch */
+#define PNFS_ISSYNC		0x0001   /* sync I/O request */
+#define PNFS_USE_FULL_CB	0x0002   /* non rpc result callback switch */
+#endif /* CONFIG_PNFS */
 
 struct nfs_write_data {
 	int			flags;
-- 
1.5.0.2



More information about the pNFS mailing list