Tao Ma
2009-Apr-06 23:40 UTC
[Ocfs2-devel] [PATCH] ocfs2: Reserve 1 more cluster in expanding_inline_dir for indexed dir.
In ocfs2_expand_inline_dir, we calculate whether we need 1 extra cluster if we can't store the dx inline the root and save it in dx_alloc. So add it when we call ocfs2_reserve_clusters. Signed-off-by: Tao Ma <tao.ma at oracle.com> --- fs/ocfs2/dir.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/ocfs2/dir.c b/fs/ocfs2/dir.c index e71160c..07d8920 100644 --- a/fs/ocfs2/dir.c +++ b/fs/ocfs2/dir.c @@ -2934,7 +2934,7 @@ static int ocfs2_expand_inline_dir(struct inode *dir, struct buffer_head *di_bh, */ BUG_ON(alloc > 2); - ret = ocfs2_reserve_clusters(osb, alloc, &data_ac); + ret = ocfs2_reserve_clusters(osb, alloc + dx_alloc, &data_ac); if (ret) { mlog_errno(ret); goto out; -- 1.6.1.40.g8ea6a
Mark Fasheh
2009-Apr-07 16:32 UTC
[Ocfs2-devel] [PATCH] ocfs2: Reserve 1 more cluster in expanding_inline_dir for indexed dir.
On Tue, Apr 07, 2009 at 07:40:57AM +0800, Tao Ma wrote:> In ocfs2_expand_inline_dir, we calculate whether we need 1 extra > cluster if we can't store the dx inline the root and save it in > dx_alloc. So add it when we call ocfs2_reserve_clusters. > > Signed-off-by: Tao Ma <tao.ma at oracle.com>Good catch Tao, thanks! --Mark -- Mark Fasheh