ext4_jbd2.h (4ba24fef3eb3b142197135223b90ced2f319cd53) | ext4_jbd2.h (e2b911c53584a92266943f3b7f2cdbc19c1a4e80) |
---|---|
1/* 2 * ext4_jbd2.h 3 * 4 * Written by Stephen C. Tweedie <sct@redhat.com>, 1999 5 * 6 * Copyright 1998--1999 Red Hat corp --- All Rights Reserved 7 * 8 * This file is part of the Linux kernel and is made available under --- 20 unchanged lines hidden (view full) --- 29 * block to complete the transaction. 30 * 31 * For extents-enabled fs we may have to allocate and modify up to 32 * 5 levels of tree, data block (for each of these we need bitmap + group 33 * summaries), root which is stored in the inode, sb 34 */ 35 36#define EXT4_SINGLEDATA_TRANS_BLOCKS(sb) \ | 1/* 2 * ext4_jbd2.h 3 * 4 * Written by Stephen C. Tweedie <sct@redhat.com>, 1999 5 * 6 * Copyright 1998--1999 Red Hat corp --- All Rights Reserved 7 * 8 * This file is part of the Linux kernel and is made available under --- 20 unchanged lines hidden (view full) --- 29 * block to complete the transaction. 30 * 31 * For extents-enabled fs we may have to allocate and modify up to 32 * 5 levels of tree, data block (for each of these we need bitmap + group 33 * summaries), root which is stored in the inode, sb 34 */ 35 36#define EXT4_SINGLEDATA_TRANS_BLOCKS(sb) \ |
37 (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_EXTENTS) \ 38 ? 20U : 8U) | 37 (ext4_has_feature_extents(sb) ? 20U : 8U) |
39 40/* Extended attribute operations touch at most two data buffers, 41 * two bitmap buffers, and two group summaries, in addition to the inode 42 * and the superblock, which are already accounted for. */ 43 44#define EXT4_XATTR_TRANS_BLOCKS 6U 45 46/* Define the minimum size for a transaction which modifies data. This --- 32 unchanged lines hidden (view full) --- 79#define EXT4_RESERVE_TRANS_BLOCKS 12U 80 81#define EXT4_INDEX_EXTRA_TRANS_BLOCKS 8 82 83#ifdef CONFIG_QUOTA 84/* Amount of blocks needed for quota update - we know that the structure was 85 * allocated so we need to update only data block */ 86#define EXT4_QUOTA_TRANS_BLOCKS(sb) ((test_opt(sb, QUOTA) ||\ | 38 39/* Extended attribute operations touch at most two data buffers, 40 * two bitmap buffers, and two group summaries, in addition to the inode 41 * and the superblock, which are already accounted for. */ 42 43#define EXT4_XATTR_TRANS_BLOCKS 6U 44 45/* Define the minimum size for a transaction which modifies data. This --- 32 unchanged lines hidden (view full) --- 78#define EXT4_RESERVE_TRANS_BLOCKS 12U 79 80#define EXT4_INDEX_EXTRA_TRANS_BLOCKS 8 81 82#ifdef CONFIG_QUOTA 83/* Amount of blocks needed for quota update - we know that the structure was 84 * allocated so we need to update only data block */ 85#define EXT4_QUOTA_TRANS_BLOCKS(sb) ((test_opt(sb, QUOTA) ||\ |
87 EXT4_HAS_RO_COMPAT_FEATURE(sb, EXT4_FEATURE_RO_COMPAT_QUOTA)) ?\ 88 1 : 0) | 86 ext4_has_feature_quota(sb)) ? 1 : 0) |
89/* Amount of blocks needed for quota insert/delete - we do some block writes 90 * but inode, sb and group updates are done only once */ 91#define EXT4_QUOTA_INIT_BLOCKS(sb) ((test_opt(sb, QUOTA) ||\ | 87/* Amount of blocks needed for quota insert/delete - we do some block writes 88 * but inode, sb and group updates are done only once */ 89#define EXT4_QUOTA_INIT_BLOCKS(sb) ((test_opt(sb, QUOTA) ||\ |
92 EXT4_HAS_RO_COMPAT_FEATURE(sb, EXT4_FEATURE_RO_COMPAT_QUOTA)) ?\ | 90 ext4_has_feature_quota(sb)) ?\ |
93 (DQUOT_INIT_ALLOC*(EXT4_SINGLEDATA_TRANS_BLOCKS(sb)-3)\ 94 +3+DQUOT_INIT_REWRITE) : 0) 95 96#define EXT4_QUOTA_DEL_BLOCKS(sb) ((test_opt(sb, QUOTA) ||\ | 91 (DQUOT_INIT_ALLOC*(EXT4_SINGLEDATA_TRANS_BLOCKS(sb)-3)\ 92 +3+DQUOT_INIT_REWRITE) : 0) 93 94#define EXT4_QUOTA_DEL_BLOCKS(sb) ((test_opt(sb, QUOTA) ||\ |
97 EXT4_HAS_RO_COMPAT_FEATURE(sb, EXT4_FEATURE_RO_COMPAT_QUOTA)) ?\ | 95 ext4_has_feature_quota(sb)) ?\ |
98 (DQUOT_DEL_ALLOC*(EXT4_SINGLEDATA_TRANS_BLOCKS(sb)-3)\ 99 +3+DQUOT_DEL_REWRITE) : 0) 100#else 101#define EXT4_QUOTA_TRANS_BLOCKS(sb) 0 102#define EXT4_QUOTA_INIT_BLOCKS(sb) 0 103#define EXT4_QUOTA_DEL_BLOCKS(sb) 0 104#endif 105#define EXT4_MAXQUOTAS_TRANS_BLOCKS(sb) (EXT4_MAXQUOTAS*EXT4_QUOTA_TRANS_BLOCKS(sb)) --- 345 unchanged lines hidden --- | 96 (DQUOT_DEL_ALLOC*(EXT4_SINGLEDATA_TRANS_BLOCKS(sb)-3)\ 97 +3+DQUOT_DEL_REWRITE) : 0) 98#else 99#define EXT4_QUOTA_TRANS_BLOCKS(sb) 0 100#define EXT4_QUOTA_INIT_BLOCKS(sb) 0 101#define EXT4_QUOTA_DEL_BLOCKS(sb) 0 102#endif 103#define EXT4_MAXQUOTAS_TRANS_BLOCKS(sb) (EXT4_MAXQUOTAS*EXT4_QUOTA_TRANS_BLOCKS(sb)) --- 345 unchanged lines hidden --- |