[pnfs] [PATCH 04/11] pnfs: nfs_redirty_request

Fred Isaman iisaman at citi.umich.edu
Thu Apr 10 10:05:04 EDT 2008


If a request fails to flush and needs to be redirtied, make sure
we retry using straight NFS.

Note that some drivers may prefer to have better control over whether
a retry goes to mds or data server...will a policy op be needed here?

Signed-off-by: Fred Isaman <iisaman at citi.umich.edu>
Signed-off-by: Benny Halevy <bhalevy at panasas.com>
---
 fs/nfs/write.c           |    3 +++
 include/linux/nfs_page.h |    3 +++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index 5616f48..2779fcb 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -881,6 +881,9 @@ static int nfs_write_rpcsetup(struct nfs_page *req,
  */
 static void nfs_redirty_request(struct nfs_page *req)
 {
+#ifdef CONFIG_PNFS
+	clear_bit(PG_USE_PNFS, &req->wb_flags);
+#endif
 	nfs_mark_request_dirty(req);
 	nfs_end_page_writeback(req->wb_page);
 	nfs_clear_page_tag_locked(req);
diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h
index fa769ef..a3adb35 100644
--- a/include/linux/nfs_page.h
+++ b/include/linux/nfs_page.h
@@ -30,6 +30,9 @@
 #define PG_BUSY			0
 #define PG_NEED_COMMIT		1
 #define PG_NEED_RESCHED		2
+#ifdef CONFIG_PNFS
+#define PG_USE_PNFS		3
+#endif
 
 struct nfs_inode;
 struct nfs_page {
-- 
1.5.3.3



More information about the pNFS mailing list