aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/reiserfs_fs.h
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2005-06-24 01:01:06 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-24 03:05:20 -0400
commit556a2a45bce1740f035befaa7201e4ad836c7257 (patch)
treed4a85b6f2bd02ab5c7c194e351508b80035f07c5 /include/linux/reiserfs_fs.h
parent1f54587bea84a35125c95e19b98c2f464c50871b (diff)
[PATCH] quota: reiserfs: improve quota credit estimates
Use improved credits estimates for quota operations. Also reserve space for a quota operation in a transaction only if filesystem was mounted with some quota option. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/reiserfs_fs.h')
-rw-r--r--include/linux/reiserfs_fs.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h
index 32148625fc2f..4c7c5689ad93 100644
--- a/include/linux/reiserfs_fs.h
+++ b/include/linux/reiserfs_fs.h
@@ -1644,11 +1644,18 @@ struct reiserfs_journal_header {
1644#define JOURNAL_MAX_TRANS_AGE 30 1644#define JOURNAL_MAX_TRANS_AGE 30
1645#define JOURNAL_PER_BALANCE_CNT (3 * (MAX_HEIGHT-2) + 9) 1645#define JOURNAL_PER_BALANCE_CNT (3 * (MAX_HEIGHT-2) + 9)
1646#ifdef CONFIG_QUOTA 1646#ifdef CONFIG_QUOTA
1647#define REISERFS_QUOTA_TRANS_BLOCKS 2 /* We need to update data and inode (atime) */ 1647/* We need to update data and inode (atime) */
1648#define REISERFS_QUOTA_INIT_BLOCKS (DQUOT_MAX_WRITES*(JOURNAL_PER_BALANCE_CNT+2)+1) /* 1 balancing, 1 bitmap, 1 data per write + stat data update */ 1648#define REISERFS_QUOTA_TRANS_BLOCKS(s) (REISERFS_SB(s)->s_mount_opt & (1<<REISERFS_QUOTA) ? 2 : 0)
1649/* 1 balancing, 1 bitmap, 1 data per write + stat data update */
1650#define REISERFS_QUOTA_INIT_BLOCKS(s) (REISERFS_SB(s)->s_mount_opt & (1<<REISERFS_QUOTA) ? \
1651(DQUOT_INIT_ALLOC*(JOURNAL_PER_BALANCE_CNT+2)+DQUOT_INIT_REWRITE+1) : 0)
1652/* same as with INIT */
1653#define REISERFS_QUOTA_DEL_BLOCKS(s) (REISERFS_SB(s)->s_mount_opt & (1<<REISERFS_QUOTA) ? \
1654(DQUOT_DEL_ALLOC*(JOURNAL_PER_BALANCE_CNT+2)+DQUOT_DEL_REWRITE+1) : 0)
1649#else 1655#else
1650#define REISERFS_QUOTA_TRANS_BLOCKS 0 1656#define REISERFS_QUOTA_TRANS_BLOCKS(s) 0
1651#define REISERFS_QUOTA_INIT_BLOCKS 0 1657#define REISERFS_QUOTA_INIT_BLOCKS(s) 0
1658#define REISERFS_QUOTA_DEL_BLOCKS(s) 0
1652#endif 1659#endif
1653 1660
1654/* both of these can be as low as 1, or as high as you want. The min is the 1661/* both of these can be as low as 1, or as high as you want. The min is the