Skip to contentSkip to conversation

ocfs2: Reserve 1 more cluster in expanding_inline_dir for indexed dir.

PATCH New Tao Ma 2 participants 2 messages Apr 6, 2009 – Apr 7, 2009 OCFS2

lore
Share & tools
lore

Tao Ma

author
#0 lore raw

PATCH 1/1 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.

---
 fs/ocfs2/dir.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/ocfs2/dir.c +1 -1
index e71160c..07d8920 100644
@@ -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;
Signature · 1 line
1.6.1.40.g8ea6a
#1 lore raw

PATCH 1/1 ocfs2: Reserve 1 more cluster in expanding_inline_dir for indexed dir.

Quoted 5 lines · Tao Ma

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.

Good catch Tao, thanks!

	--Mark

--
Mark Fasheh