diff options
author | Jan Kara <jack@suse.cz> | 2009-07-22 13:17:21 +0200 |
---|---|---|
committer | Joel Becker <joel.becker@oracle.com> | 2009-07-23 10:59:31 -0700 |
commit | 0584974a77796581eb3a64b6c5005edac4a95128 (patch) | |
tree | 8ae9e0fb7fa73bcdd1efefe0ecf82da1b55ba66e /fs/ocfs2/journal.h | |
parent | 4539f1df25bcd0fdf0d8a5e2c92de6bece83c7a0 (diff) | |
download | linux-0584974a77796581eb3a64b6c5005edac4a95128.tar.bz2 |
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, /* extended attribute block update */ #define OCFS2_XATTR_BLOCK_UPDATE_CREDITS 1 +/* Update of a single quota block */ +#define OCFS2_QUOTA_BLOCK_UPDATE_CREDITS 1 + /* global quotafile inode update, data block */ -#define OCFS2_QINFO_WRITE_CREDITS (OCFS2_INODE_UPDATE_CREDITS + 1) +#define OCFS2_QINFO_WRITE_CREDITS (OCFS2_INODE_UPDATE_CREDITS + \ + OCFS2_QUOTA_BLOCK_UPDATE_CREDITS) +#define OCFS2_LOCAL_QINFO_WRITE_CREDITS OCFS2_QUOTA_BLOCK_UPDATE_CREDITS /* * The two writes below can accidentally see global info dirty due * to set_info() quotactl so make them prepared for the writes. */ /* quota data block, global info */ /* Write to local quota file */ -#define OCFS2_QWRITE_CREDITS (OCFS2_QINFO_WRITE_CREDITS + 1) +#define OCFS2_QWRITE_CREDITS (OCFS2_QINFO_WRITE_CREDITS + \ + OCFS2_QUOTA_BLOCK_UPDATE_CREDITS) /* global quota data block, local quota data block, global quota inode, * global quota info */ -#define OCFS2_QSYNC_CREDITS (OCFS2_INODE_UPDATE_CREDITS + 3) +#define OCFS2_QSYNC_CREDITS (OCFS2_QINFO_WRITE_CREDITS + \ + 2 * OCFS2_QUOTA_BLOCK_UPDATE_CREDITS) static inline int ocfs2_quota_trans_credits(struct super_block *sb) { |