diff options
author | Mark Fasheh <mfasheh@suse.com> | 2010-04-05 21:17:16 -0400 |
---|---|---|
committer | Joel Becker <joel.becker@oracle.com> | 2010-05-05 21:18:07 -0400 |
commit | 83f92318fa33cc084e14e64dc903e605f75884c1 (patch) | |
tree | c7466c64019fb050c69cab27b4388e3a86d58b1a /fs/ocfs2/dir.c | |
parent | b07f8f24dfe54da0f074b78949044842e8df881f (diff) |
ocfs2: Add dir_resv_level mount option
The default behavior for directory reservations stays the same, but we add a
mount option so people can tweak the size of directory reservations
according to their workloads.
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Diffstat (limited to 'fs/ocfs2/dir.c')
-rw-r--r-- | fs/ocfs2/dir.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/ocfs2/dir.c b/fs/ocfs2/dir.c index 8563f97c58af..6c9a28a2d3ae 100644 --- a/fs/ocfs2/dir.c +++ b/fs/ocfs2/dir.c | |||
@@ -2977,7 +2977,8 @@ 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 | if (ocfs2_dir_resv_allowed(osb)) |
2981 | data_ac->ac_resv = &oi->ip_la_data_resv; | ||
2981 | ret = ocfs2_claim_clusters(osb, handle, data_ac, 1, &bit_off, &len); | 2982 | ret = ocfs2_claim_clusters(osb, handle, data_ac, 1, &bit_off, &len); |
2982 | if (ret) { | 2983 | if (ret) { |
2983 | mlog_errno(ret); | 2984 | mlog_errno(ret); |
@@ -3348,7 +3349,8 @@ static int ocfs2_extend_dir(struct ocfs2_super *osb, | |||
3348 | goto bail; | 3349 | goto bail; |
3349 | } | 3350 | } |
3350 | 3351 | ||
3351 | data_ac->ac_resv = &OCFS2_I(dir)->ip_la_data_resv; | 3352 | if (ocfs2_dir_resv_allowed(osb)) |
3353 | data_ac->ac_resv = &OCFS2_I(dir)->ip_la_data_resv; | ||
3352 | 3354 | ||
3353 | credits = ocfs2_calc_extend_credits(sb, el, 1); | 3355 | credits = ocfs2_calc_extend_credits(sb, el, 1); |
3354 | } else { | 3356 | } else { |