diff options
author | Tiger Yang <tiger.yang@oracle.com> | 2008-08-18 05:11:00 -0400 |
---|---|---|
committer | Mark Fasheh <mfasheh@suse.com> | 2008-10-13 19:57:02 -0400 |
commit | cf1d6c763fbcb115263114302485ad17e7933d87 (patch) | |
tree | 85717dc9d20b7ac1e31b683653933f2d30099f44 /fs/ocfs2/journal.h | |
parent | fdd77704a8b4666a32120fcd1e4a9fedaf3263d8 (diff) |
ocfs2: Add extended attribute support
This patch implements storing extended attributes both in inode or a single
external block. We only store EA's in-inode when blocksize > 512 or that
inode block has free space for it. When an EA's value is larger than 80
bytes, we will store the value via b-tree outside inode or block.
Signed-off-by: Tiger Yang <tiger.yang@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Diffstat (limited to 'fs/ocfs2/journal.h')
-rw-r--r-- | fs/ocfs2/journal.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/ocfs2/journal.h b/fs/ocfs2/journal.h index 9485f8037d9b..08d1add14872 100644 --- a/fs/ocfs2/journal.h +++ b/fs/ocfs2/journal.h | |||
@@ -283,6 +283,9 @@ int ocfs2_journal_dirty_data(handle_t *handle, | |||
283 | /* simple file updates like chmod, etc. */ | 283 | /* simple file updates like chmod, etc. */ |
284 | #define OCFS2_INODE_UPDATE_CREDITS 1 | 284 | #define OCFS2_INODE_UPDATE_CREDITS 1 |
285 | 285 | ||
286 | /* extended attribute block update */ | ||
287 | #define OCFS2_XATTR_BLOCK_UPDATE_CREDITS 1 | ||
288 | |||
286 | /* group extend. inode update and last group update. */ | 289 | /* group extend. inode update and last group update. */ |
287 | #define OCFS2_GROUP_EXTEND_CREDITS (OCFS2_INODE_UPDATE_CREDITS + 1) | 290 | #define OCFS2_GROUP_EXTEND_CREDITS (OCFS2_INODE_UPDATE_CREDITS + 1) |
288 | 291 | ||
@@ -340,6 +343,13 @@ int ocfs2_journal_dirty_data(handle_t *handle, | |||
340 | #define OCFS2_RENAME_CREDITS (3 * OCFS2_INODE_UPDATE_CREDITS + 3 \ | 343 | #define OCFS2_RENAME_CREDITS (3 * OCFS2_INODE_UPDATE_CREDITS + 3 \ |
341 | + OCFS2_UNLINK_CREDITS) | 344 | + OCFS2_UNLINK_CREDITS) |
342 | 345 | ||
346 | /* global bitmap dinode, group desc., relinked group, | ||
347 | * suballocator dinode, group desc., relinked group, | ||
348 | * dinode, xattr block */ | ||
349 | #define OCFS2_XATTR_BLOCK_CREATE_CREDITS (OCFS2_SUBALLOC_ALLOC * 2 + \ | ||
350 | + OCFS2_INODE_UPDATE_CREDITS \ | ||
351 | + OCFS2_XATTR_BLOCK_UPDATE_CREDITS) | ||
352 | |||
343 | /* | 353 | /* |
344 | * Please note that the caller must make sure that root_el is the root | 354 | * Please note that the caller must make sure that root_el is the root |
345 | * of extent tree. So for an inode, it should be &fe->id2.i_list. Otherwise | 355 | * of extent tree. So for an inode, it should be &fe->id2.i_list. Otherwise |