提交 705773a6 编写于 作者: J Jan Kara 提交者: Joel Becker

ocfs2: Fix estimate of necessary credits for mkdir

In the rare case that INLINE_DATA, INDEX_DIR, QUOTA, XATTR features are
disabled and both the allocation of the directory inode and the allocation
of the first directory block need to relink allocation group, there need
not be enough credits reserved in a transaction. Fix the estimate.

CC: Mark Fasheh <mfasheh@suse.de>
Signed-off-by: NJan Kara <jack@suse.cz>
Signed-off-by: NJoel Becker <jlbec@evilplan.org>
上级 0cc9d525
...@@ -405,9 +405,9 @@ static inline int ocfs2_remove_extent_credits(struct super_block *sb) ...@@ -405,9 +405,9 @@ static inline int ocfs2_remove_extent_credits(struct super_block *sb)
ocfs2_quota_trans_credits(sb); ocfs2_quota_trans_credits(sb);
} }
/* data block for new dir/symlink, 2 for bitmap updates (bitmap fe + /* data block for new dir/symlink, allocation of directory block, dx_root
* bitmap block for the new bit) dx_root update for free list */ * update for free list */
#define OCFS2_DIR_LINK_ADDITIONAL_CREDITS (1 + 2 + 1) #define OCFS2_DIR_LINK_ADDITIONAL_CREDITS (1 + OCFS2_SUBALLOC_ALLOC + 1)
static inline int ocfs2_add_dir_index_credits(struct super_block *sb) static inline int ocfs2_add_dir_index_credits(struct super_block *sb)
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册