aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/ext4.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext4/ext4.h')
-rw-r--r--fs/ext4/ext4.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index b364b9df09b3..0fe078d368d0 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -890,6 +890,7 @@ struct ext4_inode_info {
890#define EXT4_MOUNT_DATA_ERR_ABORT 0x10000000 /* Abort on file data write */ 890#define EXT4_MOUNT_DATA_ERR_ABORT 0x10000000 /* Abort on file data write */
891#define EXT4_MOUNT_BLOCK_VALIDITY 0x20000000 /* Block validity checking */ 891#define EXT4_MOUNT_BLOCK_VALIDITY 0x20000000 /* Block validity checking */
892#define EXT4_MOUNT_DISCARD 0x40000000 /* Issue DISCARD requests */ 892#define EXT4_MOUNT_DISCARD 0x40000000 /* Issue DISCARD requests */
893#define EXT4_MOUNT_INIT_INODE_TABLE 0x80000000 /* Initialize uninitialized itables */
893 894
894#define clear_opt(o, opt) o &= ~EXT4_MOUNT_##opt 895#define clear_opt(o, opt) o &= ~EXT4_MOUNT_##opt
895#define set_opt(o, opt) o |= EXT4_MOUNT_##opt 896#define set_opt(o, opt) o |= EXT4_MOUNT_##opt
@@ -1173,6 +1174,11 @@ struct ext4_sb_info {
1173 1174
1174 /* timer for periodic error stats printing */ 1175 /* timer for periodic error stats printing */
1175 struct timer_list s_err_report; 1176 struct timer_list s_err_report;
1177
1178 /* Lazy inode table initialization info */
1179 struct ext4_li_request *s_li_request;
1180 /* Wait multiplier for lazy initialization thread */
1181 unsigned int s_li_wait_mult;
1176}; 1182};
1177 1183
1178static inline struct ext4_sb_info *EXT4_SB(struct super_block *sb) 1184static inline struct ext4_sb_info *EXT4_SB(struct super_block *sb)
@@ -1537,6 +1543,38 @@ void ext4_get_group_no_and_offset(struct super_block *sb, ext4_fsblk_t blocknr,
1537extern struct proc_dir_entry *ext4_proc_root; 1543extern struct proc_dir_entry *ext4_proc_root;
1538 1544
1539/* 1545/*
1546 * Timeout and state flag for lazy initialization inode thread.
1547 */
1548#define EXT4_DEF_LI_WAIT_MULT 10
1549#define EXT4_DEF_LI_MAX_START_DELAY 5
1550#define EXT4_LAZYINIT_QUIT 0x0001
1551#define EXT4_LAZYINIT_RUNNING 0x0002
1552
1553/*
1554 * Lazy inode table initialization info
1555 */
1556struct ext4_lazy_init {
1557 unsigned long li_state;
1558
1559 wait_queue_head_t li_wait_daemon;
1560 wait_queue_head_t li_wait_task;
1561 struct timer_list li_timer;
1562 struct task_struct *li_task;
1563
1564 struct list_head li_request_list;
1565 struct mutex li_list_mtx;
1566};
1567
1568struct ext4_li_request {
1569 struct super_block *lr_super;
1570 struct ext4_sb_info *lr_sbi;
1571 ext4_group_t lr_next_group;
1572 struct list_head lr_request;
1573 unsigned long lr_next_sched;
1574 unsigned long lr_timeout;
1575};
1576
1577/*
1540 * Function prototypes 1578 * Function prototypes
1541 */ 1579 */
1542 1580
@@ -1611,6 +1649,8 @@ extern unsigned ext4_init_inode_bitmap(struct super_block *sb,
1611 ext4_group_t group, 1649 ext4_group_t group,
1612 struct ext4_group_desc *desc); 1650 struct ext4_group_desc *desc);
1613extern void mark_bitmap_end(int start_bit, int end_bit, char *bitmap); 1651extern void mark_bitmap_end(int start_bit, int end_bit, char *bitmap);
1652extern int ext4_init_inode_table(struct super_block *sb,
1653 ext4_group_t group, int barrier);
1614 1654
1615/* mballoc.c */ 1655/* mballoc.c */
1616extern long ext4_mb_stats; 1656extern long ext4_mb_stats;