From 8bf396de984e68491569b49770e4fd7aca40ba65 Mon Sep 17 00:00:00 2001 From: Tao Ma Date: Mon, 24 Aug 2009 11:12:02 +0800 Subject: ocfs2: Basic tree root operation. Add basic refcount tree root operation. Signed-off-by: Tao Ma --- fs/ocfs2/journal.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'fs/ocfs2/journal.h') diff --git a/fs/ocfs2/journal.h b/fs/ocfs2/journal.h index b2dc125c6e9..bd88c8b9f2f 100644 --- a/fs/ocfs2/journal.h +++ b/fs/ocfs2/journal.h @@ -490,6 +490,20 @@ static inline int ocfs2_calc_dxi_expand_credits(struct super_block *sb) return credits; } +/* inode update, new refcount block and its allocation credits. */ +#define OCFS2_REFCOUNT_TREE_CREATE_CREDITS (OCFS2_INODE_UPDATE_CREDITS + 1 \ + + OCFS2_SUBALLOC_ALLOC) + +/* inode and the refcount block update. */ +#define OCFS2_REFCOUNT_TREE_SET_CREDITS (OCFS2_INODE_UPDATE_CREDITS + 1) + +/* + * inode and the refcount block update. + * It doesn't include the credits for sub alloc change. + * So if we need to free the bit, OCFS2_SUBALLOC_FREE needs to be added. + */ +#define OCFS2_REFCOUNT_TREE_REMOVE_CREDITS (OCFS2_INODE_UPDATE_CREDITS + 1) + /* * Please note that the caller must make sure that root_el is the root * of extent tree. So for an inode, it should be &fe->id2.i_list. Otherwise -- cgit v1.2.3