diff options
Diffstat (limited to 'fs/ext4/ext4.h')
-rw-r--r-- | fs/ext4/ext4.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index 8c701318844d..0154c2d0b242 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h | |||
@@ -983,6 +983,8 @@ extern ext4_fsblk_t ext4_new_blocks(handle_t *handle, struct inode *inode, | |||
983 | unsigned long *count, int *errp); | 983 | unsigned long *count, int *errp); |
984 | extern ext4_fsblk_t ext4_old_new_blocks(handle_t *handle, struct inode *inode, | 984 | extern ext4_fsblk_t ext4_old_new_blocks(handle_t *handle, struct inode *inode, |
985 | ext4_fsblk_t goal, unsigned long *count, int *errp); | 985 | ext4_fsblk_t goal, unsigned long *count, int *errp); |
986 | extern int ext4_claim_free_blocks(struct ext4_sb_info *sbi, | ||
987 | ext4_fsblk_t nblocks); | ||
986 | extern ext4_fsblk_t ext4_has_free_blocks(struct ext4_sb_info *sbi, | 988 | extern ext4_fsblk_t ext4_has_free_blocks(struct ext4_sb_info *sbi, |
987 | ext4_fsblk_t nblocks); | 989 | ext4_fsblk_t nblocks); |
988 | extern void ext4_free_blocks(handle_t *handle, struct inode *inode, | 990 | extern void ext4_free_blocks(handle_t *handle, struct inode *inode, |
@@ -1207,6 +1209,17 @@ do { \ | |||
1207 | __ext4_std_error((sb), __func__, (errno)); \ | 1209 | __ext4_std_error((sb), __func__, (errno)); \ |
1208 | } while (0) | 1210 | } while (0) |
1209 | 1211 | ||
1212 | #ifdef CONFIG_SMP | ||
1213 | /* Each CPU can accumulate FBC_BATCH blocks in their local | ||
1214 | * counters. So we need to make sure we have free blocks more | ||
1215 | * than FBC_BATCH * nr_cpu_ids. Also add a window of 4 times. | ||
1216 | */ | ||
1217 | #define EXT4_FREEBLOCKS_WATERMARK (4 * (FBC_BATCH * nr_cpu_ids)) | ||
1218 | #else | ||
1219 | #define EXT4_FREEBLOCKS_WATERMARK 0 | ||
1220 | #endif | ||
1221 | |||
1222 | |||
1210 | /* | 1223 | /* |
1211 | * Inodes and files operations | 1224 | * Inodes and files operations |
1212 | */ | 1225 | */ |