aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/ops_vm.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2006-05-05 16:59:11 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2006-05-05 16:59:11 -0400
commitfd88de569b802c4a04aaa6ee74667775f4aed8c6 (patch)
tree1766c45303798bf289059afc8f117cf8bc784086 /fs/gfs2/ops_vm.c
parent5bb76af1e089ac186c15c6aa792340d22b63d4b4 (diff)
[GFS2] Readpages support
This adds readpages support (and also corrects a small bug in the readpage error path at the same time). Hopefully this will improve performance by allowing GFS to submit larger lumps of I/O at a time. In order to simplify the setting of BH_Boundary, it currently gets set when we hit the end of a indirect pointer block. There is always a boundary at this point with the current allocation code. It doesn't get all the boundaries right though, so there is still room for improvement in this. See comments in fs/gfs2/ops_address.c for further information about readpages with GFS2. Signed-off-by: Steven Whitehouse
Diffstat (limited to 'fs/gfs2/ops_vm.c')
-rw-r--r--fs/gfs2/ops_vm.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/gfs2/ops_vm.c b/fs/gfs2/ops_vm.c
index dbc57071e7bb..d67248cae9b9 100644
--- a/fs/gfs2/ops_vm.c
+++ b/fs/gfs2/ops_vm.c
@@ -90,8 +90,7 @@ static int alloc_page_backing(struct gfs2_inode *ip, struct page *page)
90 if (error) 90 if (error)
91 goto out_gunlock_q; 91 goto out_gunlock_q;
92 92
93 gfs2_write_calc_reserv(ip, PAGE_CACHE_SIZE, 93 gfs2_write_calc_reserv(ip, PAGE_CACHE_SIZE, &data_blocks, &ind_blocks);
94 &data_blocks, &ind_blocks);
95 94
96 al->al_requested = data_blocks + ind_blocks; 95 al->al_requested = data_blocks + ind_blocks;
97 96
@@ -99,8 +98,7 @@ static int alloc_page_backing(struct gfs2_inode *ip, struct page *page)
99 if (error) 98 if (error)
100 goto out_gunlock_q; 99 goto out_gunlock_q;
101 100
102 error = gfs2_trans_begin(sdp, 101 error = gfs2_trans_begin(sdp, al->al_rgd->rd_ri.ri_length +
103 al->al_rgd->rd_ri.ri_length +
104 ind_blocks + RES_DINODE + 102 ind_blocks + RES_DINODE +
105 RES_STATFS + RES_QUOTA, 0); 103 RES_STATFS + RES_QUOTA, 0);
106 if (error) 104 if (error)
@@ -117,7 +115,7 @@ static int alloc_page_backing(struct gfs2_inode *ip, struct page *page)
117 unsigned int extlen; 115 unsigned int extlen;
118 int new = 1; 116 int new = 1;
119 117
120 error = gfs2_block_map(ip, lblock, &new, &dblock, &extlen); 118 error = gfs2_extent_map(ip->i_vnode, lblock, &new, &dblock, &extlen);
121 if (error) 119 if (error)
122 goto out_trans; 120 goto out_trans;
123 121