ext4: Simplify delalloc implementation by removing mpd.get_block
[safe/jmp/linux-2.6] / fs / ext4 / ext4_sb.h
index 6300226..4e4d9cc 100644 (file)
@@ -40,8 +40,8 @@ struct ext4_sb_info {
        unsigned long s_blocks_last;    /* Last seen block count */
        loff_t s_bitmap_maxbytes;       /* max bytes for bitmap files */
        struct buffer_head * s_sbh;     /* Buffer containing the super block */
-       struct ext4_super_block * s_es; /* Pointer to the super block in the buffer */
-       struct buffer_head ** s_group_desc;
+       struct ext4_super_block *s_es;  /* Pointer to the super block in the buffer */
+       struct buffer_head **s_group_desc;
        unsigned long  s_mount_opt;
        ext4_fsblk_t s_sb_block;
        uid_t s_resuid;
@@ -52,25 +52,26 @@ struct ext4_sb_info {
        int s_desc_per_block_bits;
        int s_inode_size;
        int s_first_ino;
+       unsigned int s_inode_readahead_blks;
        spinlock_t s_next_gen_lock;
        u32 s_next_generation;
        u32 s_hash_seed[4];
        int s_def_hash_version;
+       int s_hash_unsigned;    /* 3 if hash should be signed, 0 if not */
        struct percpu_counter s_freeblocks_counter;
        struct percpu_counter s_freeinodes_counter;
        struct percpu_counter s_dirs_counter;
-       struct blockgroup_lock s_blockgroup_lock;
-
-       /* root of the per fs reservation window tree */
-       spinlock_t s_rsv_window_lock;
-       struct rb_root s_rsv_window_root;
-       struct ext4_reserve_window_node s_rsv_window_head;
+       struct percpu_counter s_dirtyblocks_counter;
+       struct blockgroup_lock *s_blockgroup_lock;
+       struct proc_dir_entry *s_proc;
 
        /* Journaling */
-       struct inode * s_journal_inode;
-       struct journal_s * s_journal;
+       struct inode *s_journal_inode;
+       struct journal_s *s_journal;
        struct list_head s_orphan;
        unsigned long s_commit_interval;
+       u32 s_max_batch_time;
+       u32 s_min_batch_time;
        struct block_device *journal_bdev;
 #ifdef CONFIG_JBD2_DEBUG
        struct timer_list turn_ro_timer;        /* For turning read-only (crash simulation) */
@@ -97,21 +98,19 @@ struct ext4_sb_info {
        struct inode *s_buddy_cache;
        long s_blocks_reserved;
        spinlock_t s_reserve_lock;
-       struct list_head s_active_transaction;
-       struct list_head s_closed_transaction;
-       struct list_head s_committed_transaction;
        spinlock_t s_md_lock;
        tid_t s_last_transaction;
-       unsigned short *s_mb_offsets, *s_mb_maxs;
+       unsigned short *s_mb_offsets;
+       unsigned int *s_mb_maxs;
 
        /* tunables */
        unsigned long s_stripe;
-       unsigned long s_mb_stream_request;
-       unsigned long s_mb_max_to_scan;
-       unsigned long s_mb_min_to_scan;
-       unsigned long s_mb_stats;
-       unsigned long s_mb_order2_reqs;
-       unsigned long s_mb_group_prealloc;
+       unsigned int s_mb_stream_request;
+       unsigned int s_mb_max_to_scan;
+       unsigned int s_mb_min_to_scan;
+       unsigned int s_mb_stats;
+       unsigned int s_mb_order2_reqs;
+       unsigned int s_mb_group_prealloc;
        /* where last allocation was done - for stream allocation */
        unsigned long s_mb_last_group;
        unsigned long s_mb_last_start;
@@ -121,7 +120,6 @@ struct ext4_sb_info {
        int s_mb_history_cur;
        int s_mb_history_max;
        int s_mb_history_num;
-       struct proc_dir_entry *s_mb_proc;
        spinlock_t s_mb_history_lock;
        int s_mb_history_filter;
 
@@ -148,4 +146,10 @@ struct ext4_sb_info {
        struct flex_groups *s_flex_groups;
 };
 
+static inline spinlock_t *
+sb_bgl_lock(struct ext4_sb_info *sbi, unsigned int block_group)
+{
+       return bgl_lock_ptr(sbi->s_blockgroup_lock, block_group);
+}
+
 #endif /* _EXT4_SB */