aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/write.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2007-06-17 15:27:42 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2007-07-10 23:40:26 -0400
commit5c36968343fcd013a3f7ae93f246c2e75596780b (patch)
tree96a3f2867e4631d84179952b1af170f3e48eae4b /fs/nfs/write.c
parent9fd367f0f376ccfb2592eed9be0eece70429894f (diff)
NFS cleanup: speed up nfs_scan_commit using radix tree tags
Add a tag for requests that are waiting for a COMMIT Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/write.c')
-rw-r--r--fs/nfs/write.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index 754066cc9146..0f779ca12ec3 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -462,6 +462,9 @@ nfs_mark_request_commit(struct nfs_page *req)
462 nfs_list_add_request(req, &nfsi->commit); 462 nfs_list_add_request(req, &nfsi->commit);
463 nfsi->ncommit++; 463 nfsi->ncommit++;
464 set_bit(PG_NEED_COMMIT, &(req)->wb_flags); 464 set_bit(PG_NEED_COMMIT, &(req)->wb_flags);
465 radix_tree_tag_set(&nfsi->nfs_page_tree,
466 req->wb_index,
467 NFS_PAGE_TAG_COMMIT);
465 spin_unlock(&nfsi->req_lock); 468 spin_unlock(&nfsi->req_lock);
466 inc_zone_page_state(req->wb_page, NR_UNSTABLE_NFS); 469 inc_zone_page_state(req->wb_page, NR_UNSTABLE_NFS);
467 __mark_inode_dirty(inode, I_DIRTY_DATASYNC); 470 __mark_inode_dirty(inode, I_DIRTY_DATASYNC);
@@ -575,7 +578,8 @@ nfs_scan_commit(struct inode *inode, struct list_head *dst, pgoff_t idx_start, u
575 int res = 0; 578 int res = 0;
576 579
577 if (nfsi->ncommit != 0) { 580 if (nfsi->ncommit != 0) {
578 res = nfs_scan_list(nfsi, &nfsi->commit, dst, idx_start, npages); 581 res = nfs_scan_list(nfsi, dst, idx_start, npages,
582 NFS_PAGE_TAG_COMMIT);
579 nfsi->ncommit -= res; 583 nfsi->ncommit -= res;
580 if ((nfsi->ncommit == 0) != list_empty(&nfsi->commit)) 584 if ((nfsi->ncommit == 0) != list_empty(&nfsi->commit))
581 printk(KERN_ERR "NFS: desynchronized value of nfs_i.ncommit.\n"); 585 printk(KERN_ERR "NFS: desynchronized value of nfs_i.ncommit.\n");