diff options
Diffstat (limited to 'fs/ext4/ext4.h')
-rw-r--r-- | fs/ext4/ext4.h | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index 8825515eeddd..ab31e65d46d0 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h | |||
@@ -376,6 +376,12 @@ struct ext4_new_group_data { | |||
376 | EXT4_GET_BLOCKS_DIO_CREATE_EXT) | 376 | EXT4_GET_BLOCKS_DIO_CREATE_EXT) |
377 | 377 | ||
378 | /* | 378 | /* |
379 | * Flags used by ext4_free_blocks | ||
380 | */ | ||
381 | #define EXT4_FREE_BLOCKS_METADATA 0x0001 | ||
382 | #define EXT4_FREE_BLOCKS_FORGET 0x0002 | ||
383 | |||
384 | /* | ||
379 | * ioctl commands | 385 | * ioctl commands |
380 | */ | 386 | */ |
381 | #define EXT4_IOC_GETFLAGS FS_IOC_GETFLAGS | 387 | #define EXT4_IOC_GETFLAGS FS_IOC_GETFLAGS |
@@ -703,6 +709,13 @@ struct ext4_inode_info { | |||
703 | struct list_head i_aio_dio_complete_list; | 709 | struct list_head i_aio_dio_complete_list; |
704 | /* current io_end structure for async DIO write*/ | 710 | /* current io_end structure for async DIO write*/ |
705 | ext4_io_end_t *cur_aio_dio; | 711 | ext4_io_end_t *cur_aio_dio; |
712 | |||
713 | /* | ||
714 | * Transactions that contain inode's metadata needed to complete | ||
715 | * fsync and fdatasync, respectively. | ||
716 | */ | ||
717 | tid_t i_sync_tid; | ||
718 | tid_t i_datasync_tid; | ||
706 | }; | 719 | }; |
707 | 720 | ||
708 | /* | 721 | /* |
@@ -750,6 +763,7 @@ struct ext4_inode_info { | |||
750 | #define EXT4_MOUNT_DELALLOC 0x8000000 /* Delalloc support */ | 763 | #define EXT4_MOUNT_DELALLOC 0x8000000 /* Delalloc support */ |
751 | #define EXT4_MOUNT_DATA_ERR_ABORT 0x10000000 /* Abort on file data write */ | 764 | #define EXT4_MOUNT_DATA_ERR_ABORT 0x10000000 /* Abort on file data write */ |
752 | #define EXT4_MOUNT_BLOCK_VALIDITY 0x20000000 /* Block validity checking */ | 765 | #define EXT4_MOUNT_BLOCK_VALIDITY 0x20000000 /* Block validity checking */ |
766 | #define EXT4_MOUNT_DISCARD 0x40000000 /* Issue DISCARD requests */ | ||
753 | 767 | ||
754 | #define clear_opt(o, opt) o &= ~EXT4_MOUNT_##opt | 768 | #define clear_opt(o, opt) o &= ~EXT4_MOUNT_##opt |
755 | #define set_opt(o, opt) o |= EXT4_MOUNT_##opt | 769 | #define set_opt(o, opt) o |= EXT4_MOUNT_##opt |
@@ -1324,8 +1338,6 @@ extern ext4_fsblk_t ext4_new_meta_blocks(handle_t *handle, struct inode *inode, | |||
1324 | ext4_fsblk_t goal, unsigned long *count, int *errp); | 1338 | ext4_fsblk_t goal, unsigned long *count, int *errp); |
1325 | extern int ext4_claim_free_blocks(struct ext4_sb_info *sbi, s64 nblocks); | 1339 | extern int ext4_claim_free_blocks(struct ext4_sb_info *sbi, s64 nblocks); |
1326 | extern int ext4_has_free_blocks(struct ext4_sb_info *sbi, s64 nblocks); | 1340 | extern int ext4_has_free_blocks(struct ext4_sb_info *sbi, s64 nblocks); |
1327 | extern void ext4_free_blocks(handle_t *handle, struct inode *inode, | ||
1328 | ext4_fsblk_t block, unsigned long count, int metadata); | ||
1329 | extern void ext4_add_groupblocks(handle_t *handle, struct super_block *sb, | 1341 | extern void ext4_add_groupblocks(handle_t *handle, struct super_block *sb, |
1330 | ext4_fsblk_t block, unsigned long count); | 1342 | ext4_fsblk_t block, unsigned long count); |
1331 | extern ext4_fsblk_t ext4_count_free_blocks(struct super_block *); | 1343 | extern ext4_fsblk_t ext4_count_free_blocks(struct super_block *); |
@@ -1384,16 +1396,15 @@ extern int ext4_mb_reserve_blocks(struct super_block *, int); | |||
1384 | extern void ext4_discard_preallocations(struct inode *); | 1396 | extern void ext4_discard_preallocations(struct inode *); |
1385 | extern int __init init_ext4_mballoc(void); | 1397 | extern int __init init_ext4_mballoc(void); |
1386 | extern void exit_ext4_mballoc(void); | 1398 | extern void exit_ext4_mballoc(void); |
1387 | extern void ext4_mb_free_blocks(handle_t *, struct inode *, | 1399 | extern void ext4_free_blocks(handle_t *handle, struct inode *inode, |
1388 | ext4_fsblk_t, unsigned long, int, unsigned long *); | 1400 | struct buffer_head *bh, ext4_fsblk_t block, |
1401 | unsigned long count, int flags); | ||
1389 | extern int ext4_mb_add_groupinfo(struct super_block *sb, | 1402 | extern int ext4_mb_add_groupinfo(struct super_block *sb, |
1390 | ext4_group_t i, struct ext4_group_desc *desc); | 1403 | ext4_group_t i, struct ext4_group_desc *desc); |
1391 | extern int ext4_mb_get_buddy_cache_lock(struct super_block *, ext4_group_t); | 1404 | extern int ext4_mb_get_buddy_cache_lock(struct super_block *, ext4_group_t); |
1392 | extern void ext4_mb_put_buddy_cache_lock(struct super_block *, | 1405 | extern void ext4_mb_put_buddy_cache_lock(struct super_block *, |
1393 | ext4_group_t, int); | 1406 | ext4_group_t, int); |
1394 | /* inode.c */ | 1407 | /* inode.c */ |
1395 | int ext4_forget(handle_t *handle, int is_metadata, struct inode *inode, | ||
1396 | struct buffer_head *bh, ext4_fsblk_t blocknr); | ||
1397 | struct buffer_head *ext4_getblk(handle_t *, struct inode *, | 1408 | struct buffer_head *ext4_getblk(handle_t *, struct inode *, |
1398 | ext4_lblk_t, int, int *); | 1409 | ext4_lblk_t, int, int *); |
1399 | struct buffer_head *ext4_bread(handle_t *, struct inode *, | 1410 | struct buffer_head *ext4_bread(handle_t *, struct inode *, |