Whamcloud - gitweb
Branch b1_8
[fs/lustre-release.git] / ldiskfs / kernel_patches / patches / ext4-add-ext4_itable_unused_count.patch
1 RHEL5 still does not use bg_itable_unused_lo/hi. This patch
2 can be removed from the series once ext4_itable_unused_count()
3 is introduced in the RHEL5 mainline.
4
5 Index: linux-2.6.18-128.1.6/fs/ext4/ext4.h
6 ===================================================================
7 --- linux-2.6.18-128.1.6.orig/fs/ext4/ext4.h
8 +++ linux-2.6.18-128.1.6/fs/ext4/ext4.h
9 @@ -1275,6 +1275,11 @@ static inline unsigned int ext4_flex_bg_
10         return 1 << sbi->s_log_groups_per_flex;
11  }
12  
13 +static inline __u32 ext4_itable_unused_count(struct super_block *sb,
14 +                                             struct ext4_group_desc *bg) {
15 +              return le16_to_cpu(bg->bg_itable_unused);
16 +}
17 +
18  #define ext4_std_error(sb, errno)                              \
19  do {                                                           \
20         if ((errno))                                            \