|
@@ -49,7 +49,7 @@
|
|
|
|
|
|
#define EXT4_DATA_TRANS_BLOCKS(sb) (EXT4_SINGLEDATA_TRANS_BLOCKS(sb) + \
|
|
#define EXT4_DATA_TRANS_BLOCKS(sb) (EXT4_SINGLEDATA_TRANS_BLOCKS(sb) + \
|
|
EXT4_XATTR_TRANS_BLOCKS - 2 + \
|
|
EXT4_XATTR_TRANS_BLOCKS - 2 + \
|
|
- 2*EXT4_QUOTA_TRANS_BLOCKS(sb))
|
|
|
|
|
|
+ EXT4_MAXQUOTAS_TRANS_BLOCKS(sb))
|
|
|
|
|
|
/*
|
|
/*
|
|
* Define the number of metadata blocks we need to account to modify data.
|
|
* Define the number of metadata blocks we need to account to modify data.
|
|
@@ -57,7 +57,7 @@
|
|
* This include super block, inode block, quota blocks and xattr blocks
|
|
* This include super block, inode block, quota blocks and xattr blocks
|
|
*/
|
|
*/
|
|
#define EXT4_META_TRANS_BLOCKS(sb) (EXT4_XATTR_TRANS_BLOCKS + \
|
|
#define EXT4_META_TRANS_BLOCKS(sb) (EXT4_XATTR_TRANS_BLOCKS + \
|
|
- 2*EXT4_QUOTA_TRANS_BLOCKS(sb))
|
|
|
|
|
|
+ EXT4_MAXQUOTAS_TRANS_BLOCKS(sb))
|
|
|
|
|
|
/* Delete operations potentially hit one directory's namespace plus an
|
|
/* Delete operations potentially hit one directory's namespace plus an
|
|
* entire inode, plus arbitrary amounts of bitmap/indirection data. Be
|
|
* entire inode, plus arbitrary amounts of bitmap/indirection data. Be
|
|
@@ -92,6 +92,7 @@
|
|
* but inode, sb and group updates are done only once */
|
|
* but inode, sb and group updates are done only once */
|
|
#define EXT4_QUOTA_INIT_BLOCKS(sb) (test_opt(sb, QUOTA) ? (DQUOT_INIT_ALLOC*\
|
|
#define EXT4_QUOTA_INIT_BLOCKS(sb) (test_opt(sb, QUOTA) ? (DQUOT_INIT_ALLOC*\
|
|
(EXT4_SINGLEDATA_TRANS_BLOCKS(sb)-3)+3+DQUOT_INIT_REWRITE) : 0)
|
|
(EXT4_SINGLEDATA_TRANS_BLOCKS(sb)-3)+3+DQUOT_INIT_REWRITE) : 0)
|
|
|
|
+
|
|
#define EXT4_QUOTA_DEL_BLOCKS(sb) (test_opt(sb, QUOTA) ? (DQUOT_DEL_ALLOC*\
|
|
#define EXT4_QUOTA_DEL_BLOCKS(sb) (test_opt(sb, QUOTA) ? (DQUOT_DEL_ALLOC*\
|
|
(EXT4_SINGLEDATA_TRANS_BLOCKS(sb)-3)+3+DQUOT_DEL_REWRITE) : 0)
|
|
(EXT4_SINGLEDATA_TRANS_BLOCKS(sb)-3)+3+DQUOT_DEL_REWRITE) : 0)
|
|
#else
|
|
#else
|
|
@@ -99,6 +100,9 @@
|
|
#define EXT4_QUOTA_INIT_BLOCKS(sb) 0
|
|
#define EXT4_QUOTA_INIT_BLOCKS(sb) 0
|
|
#define EXT4_QUOTA_DEL_BLOCKS(sb) 0
|
|
#define EXT4_QUOTA_DEL_BLOCKS(sb) 0
|
|
#endif
|
|
#endif
|
|
|
|
+#define EXT4_MAXQUOTAS_TRANS_BLOCKS(sb) (MAXQUOTAS*EXT4_QUOTA_TRANS_BLOCKS(sb))
|
|
|
|
+#define EXT4_MAXQUOTAS_INIT_BLOCKS(sb) (MAXQUOTAS*EXT4_QUOTA_INIT_BLOCKS(sb))
|
|
|
|
+#define EXT4_MAXQUOTAS_DEL_BLOCKS(sb) (MAXQUOTAS*EXT4_QUOTA_DEL_BLOCKS(sb))
|
|
|
|
|
|
int
|
|
int
|
|
ext4_mark_iloc_dirty(handle_t *handle,
|
|
ext4_mark_iloc_dirty(handle_t *handle,
|