aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/dir.c
diff options
context:
space:
mode:
authorMark Fasheh <mfasheh@suse.com>2009-12-07 16:16:07 -0500
committerJoel Becker <joel.becker@oracle.com>2010-05-05 21:17:30 -0400
commite3b4a97dbe9741a3227c3ed857a0632532fcd386 (patch)
tree31da8dd09ad6ef8959b287e36e98ead30472a284 /fs/ocfs2/dir.c
parent4fe370afaae49c57619bb0bedb75de7e7c168308 (diff)
ocfs2: use allocation reservations for directory data
Use the reservations system for unindexed dir tree allocations. We don't bother with the indexed tree as reads from it are mostly random anyway. Directory reservations are marked seperately, to allow the reservations code a chance to optimize their window sizes. This patch allocates only 8 bits for directory windows as they generally are not expected to grow as quickly as file data. Future improvements to dir window sizing can trivially be made. Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Diffstat (limited to 'fs/ocfs2/dir.c')
-rw-r--r--fs/ocfs2/dir.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ocfs2/dir.c b/fs/ocfs2/dir.c
index 6d832487c187..8563f97c58af 100644
--- a/fs/ocfs2/dir.c
+++ b/fs/ocfs2/dir.c
@@ -2977,6 +2977,7 @@ static int ocfs2_expand_inline_dir(struct inode *dir, struct buffer_head *di_bh,
2977 * if we only get one now, that's enough to continue. The rest 2977 * if we only get one now, that's enough to continue. The rest
2978 * will be claimed after the conversion to extents. 2978 * will be claimed after the conversion to extents.
2979 */ 2979 */
2980 data_ac->ac_resv = &oi->ip_la_data_resv;
2980 ret = ocfs2_claim_clusters(osb, handle, data_ac, 1, &bit_off, &len); 2981 ret = ocfs2_claim_clusters(osb, handle, data_ac, 1, &bit_off, &len);
2981 if (ret) { 2982 if (ret) {
2982 mlog_errno(ret); 2983 mlog_errno(ret);
@@ -3347,6 +3348,8 @@ static int ocfs2_extend_dir(struct ocfs2_super *osb,
3347 goto bail; 3348 goto bail;
3348 } 3349 }
3349 3350
3351 data_ac->ac_resv = &OCFS2_I(dir)->ip_la_data_resv;
3352
3350 credits = ocfs2_calc_extend_credits(sb, el, 1); 3353 credits = ocfs2_calc_extend_credits(sb, el, 1);
3351 } else { 3354 } else {
3352 spin_unlock(&OCFS2_I(dir)->ip_lock); 3355 spin_unlock(&OCFS2_I(dir)->ip_lock);