[pnfs] [PATCH 20/29] pnfs: remove PNFS_USE_DS flag

Benny Halevy bhalevy at panasas.com
Fri Dec 28 03:45:44 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>
Signed-off-by: Benny Halevy <bhalevy at panasas.com>
---
 fs/nfs/pnfs.c           |    3 ---
 include/linux/nfs_xdr.h |    5 ++---
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index c269cf6..eaff34c 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -1021,7 +1021,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;
 		return pnfs_readpages(data);
 	}
 }
@@ -1098,7 +1097,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;
 		return pnfs_writepages(data, how);
 	}
@@ -1532,7 +1530,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 3f9cc16..2130d9e 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -1055,9 +1055,8 @@ struct nfs_read_data {
 
 #if defined(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 {
-- 
1.5.3.3



More information about the pNFS mailing list