aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2008-05-25 12:59:19 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2008-07-09 12:08:46 -0400
commit7e5f6146609eb9134fac7d1b6bfee43df1732188 (patch)
tree46f5ea60fc86ebd39dbdb85e13c8cabd2da28ec0
parentefc91ed0191e3fc62bb1c556ac93fc4e661214d2 (diff)
NFS: Revert commit 44dd151d
Revert commit 44dd151d "NFS: Don't mark a written page as uptodate until it is on disk". While it is true that the write may fail, that is always the case. There is no reason why we should treat data on pages that are not already marked as PG_uptodate as being special. The only thing we gain is a noticeable slowdown when re-reading these pages. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
-rw-r--r--fs/nfs/write.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index eea2d2b5278c..ee6fcdecb871 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -188,6 +188,7 @@ static int nfs_writepage_setup(struct nfs_open_context *ctx, struct page *page,
188 } 188 }
189 /* Update file length */ 189 /* Update file length */
190 nfs_grow_file(page, offset, count); 190 nfs_grow_file(page, offset, count);
191 nfs_mark_uptodate(page, req->wb_pgbase, req->wb_bytes);
191 nfs_clear_page_tag_locked(req); 192 nfs_clear_page_tag_locked(req);
192 return 0; 193 return 0;
193} 194}
@@ -743,12 +744,7 @@ int nfs_updatepage(struct file *file, struct page *page,
743static void nfs_writepage_release(struct nfs_page *req) 744static void nfs_writepage_release(struct nfs_page *req)
744{ 745{
745 746
746 if (PageError(req->wb_page)) { 747 if (PageError(req->wb_page) || !nfs_reschedule_unstable_write(req)) {
747 nfs_end_page_writeback(req->wb_page);
748 nfs_inode_remove_request(req);
749 } else if (!nfs_reschedule_unstable_write(req)) {
750 /* Set the PG_uptodate flag */
751 nfs_mark_uptodate(req->wb_page, req->wb_pgbase, req->wb_bytes);
752 nfs_end_page_writeback(req->wb_page); 748 nfs_end_page_writeback(req->wb_page);
753 nfs_inode_remove_request(req); 749 nfs_inode_remove_request(req);
754 } else 750 } else
@@ -1069,8 +1065,6 @@ static void nfs_writeback_release_full(void *calldata)
1069 dprintk(" marked for commit\n"); 1065 dprintk(" marked for commit\n");
1070 goto next; 1066 goto next;
1071 } 1067 }
1072 /* Set the PG_uptodate flag? */
1073 nfs_mark_uptodate(page, req->wb_pgbase, req->wb_bytes);
1074 dprintk(" OK\n"); 1068 dprintk(" OK\n");
1075remove_request: 1069remove_request:
1076 nfs_end_page_writeback(page); 1070 nfs_end_page_writeback(page);
@@ -1309,9 +1303,6 @@ static void nfs_commit_release(void *calldata)
1309 * returned by the server against all stored verfs. */ 1303 * returned by the server against all stored verfs. */
1310 if (!memcmp(req->wb_verf.verifier, data->verf.verifier, sizeof(data->verf.verifier))) { 1304 if (!memcmp(req->wb_verf.verifier, data->verf.verifier, sizeof(data->verf.verifier))) {
1311 /* We have a match */ 1305 /* We have a match */
1312 /* Set the PG_uptodate flag */
1313 nfs_mark_uptodate(req->wb_page, req->wb_pgbase,
1314 req->wb_bytes);
1315 nfs_inode_remove_request(req); 1306 nfs_inode_remove_request(req);
1316 dprintk(" OK\n"); 1307 dprintk(" OK\n");
1317 goto next; 1308 goto next;