diff options
author | Jan Kara <jack@suse.cz> | 2009-07-22 07:17:21 -0400 |
---|---|---|
committer | Joel Becker <joel.becker@oracle.com> | 2009-07-23 13:59:31 -0400 |
commit | 0584974a77796581eb3a64b6c5005edac4a95128 (patch) | |
tree | 8ae9e0fb7fa73bcdd1efefe0ecf82da1b55ba66e /fs/ocfs2/journal.h | |
parent | 4539f1df25bcd0fdf0d8a5e2c92de6bece83c7a0 (diff) |
ocfs2: Define credit counts for quota operations
Numbers of needed credits for some quota operations were written
as raw numbers. Create appropriate defines instead.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Diffstat (limited to 'fs/ocfs2/journal.h')
-rw-r--r-- | fs/ocfs2/journal.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/fs/ocfs2/journal.h b/fs/ocfs2/journal.h index 81e8abcd246e..4a4d3b55fd22 100644 --- a/fs/ocfs2/journal.h +++ b/fs/ocfs2/journal.h | |||
@@ -330,20 +330,27 @@ int ocfs2_journal_dirty(handle_t *handle, | |||
330 | /* extended attribute block update */ | 330 | /* extended attribute block update */ |
331 | #define OCFS2_XATTR_BLOCK_UPDATE_CREDITS 1 | 331 | #define OCFS2_XATTR_BLOCK_UPDATE_CREDITS 1 |
332 | 332 | ||
333 | /* Update of a single quota block */ | ||
334 | #define OCFS2_QUOTA_BLOCK_UPDATE_CREDITS 1 | ||
335 | |||
333 | /* global quotafile inode update, data block */ | 336 | /* global quotafile inode update, data block */ |
334 | #define OCFS2_QINFO_WRITE_CREDITS (OCFS2_INODE_UPDATE_CREDITS + 1) | 337 | #define OCFS2_QINFO_WRITE_CREDITS (OCFS2_INODE_UPDATE_CREDITS + \ |
338 | OCFS2_QUOTA_BLOCK_UPDATE_CREDITS) | ||
335 | 339 | ||
340 | #define OCFS2_LOCAL_QINFO_WRITE_CREDITS OCFS2_QUOTA_BLOCK_UPDATE_CREDITS | ||
336 | /* | 341 | /* |
337 | * The two writes below can accidentally see global info dirty due | 342 | * The two writes below can accidentally see global info dirty due |
338 | * to set_info() quotactl so make them prepared for the writes. | 343 | * to set_info() quotactl so make them prepared for the writes. |
339 | */ | 344 | */ |
340 | /* quota data block, global info */ | 345 | /* quota data block, global info */ |
341 | /* Write to local quota file */ | 346 | /* Write to local quota file */ |
342 | #define OCFS2_QWRITE_CREDITS (OCFS2_QINFO_WRITE_CREDITS + 1) | 347 | #define OCFS2_QWRITE_CREDITS (OCFS2_QINFO_WRITE_CREDITS + \ |
348 | OCFS2_QUOTA_BLOCK_UPDATE_CREDITS) | ||
343 | 349 | ||
344 | /* global quota data block, local quota data block, global quota inode, | 350 | /* global quota data block, local quota data block, global quota inode, |
345 | * global quota info */ | 351 | * global quota info */ |
346 | #define OCFS2_QSYNC_CREDITS (OCFS2_INODE_UPDATE_CREDITS + 3) | 352 | #define OCFS2_QSYNC_CREDITS (OCFS2_QINFO_WRITE_CREDITS + \ |
353 | 2 * OCFS2_QUOTA_BLOCK_UPDATE_CREDITS) | ||
347 | 354 | ||
348 | static inline int ocfs2_quota_trans_credits(struct super_block *sb) | 355 | static inline int ocfs2_quota_trans_credits(struct super_block *sb) |
349 | { | 356 | { |