From 692bc2586a05d4df95ef3f28b5d3bb45fbde2522 Mon Sep 17 00:00:00 2001 From: johann Date: Tue, 13 Oct 2009 21:01:57 +0000 Subject: [PATCH] Branch b1_8 b=19763 i=adilger i=girish speed up quotacheck. take into account itable_unused_count. --- .../patches/export-ext4-2.6-sles11.patch | 22 +++++++++++++++------- .../ext4-add-ext4_itable_unused_count.patch | 20 ++++++++++++++++++++ .../series/ldiskfs-2.6-rhel5-ext4.series | 1 + 3 files changed, 36 insertions(+), 7 deletions(-) create mode 100644 ldiskfs/kernel_patches/patches/ext4-add-ext4_itable_unused_count.patch diff --git a/ldiskfs/kernel_patches/patches/export-ext4-2.6-sles11.patch b/ldiskfs/kernel_patches/patches/export-ext4-2.6-sles11.patch index 0d151fc..9d70f31 100644 --- a/ldiskfs/kernel_patches/patches/export-ext4-2.6-sles11.patch +++ b/ldiskfs/kernel_patches/patches/export-ext4-2.6-sles11.patch @@ -1,8 +1,16 @@ -Index: linux-2.6.18.i386/fs/ext4/super.c +Index: linux-stage/fs/ext4/super.c =================================================================== ---- linux-2.6.18.i386.orig/fs/ext4/super.c -+++ linux-2.6.18.i386/fs/ext4/super.c -@@ -185,6 +185,8 @@ void ext4_journal_abort_handle(const cha +--- linux-stage.orig/fs/ext4/super.c ++++ linux-stage/fs/ext4/super.c +@@ -124,6 +124,7 @@ __u32 ext4_itable_unused_count(struct su + (EXT4_DESC_SIZE(sb) >= EXT4_MIN_DESC_SIZE_64BIT ? + (__u32)le16_to_cpu(bg->bg_itable_unused_hi) << 16 : 0); + } ++EXPORT_SYMBOL(ext4_itable_unused_count); + + void ext4_block_bitmap_set(struct super_block *sb, + struct ext4_group_desc *bg, ext4_fsblk_t blk) +@@ -253,6 +254,8 @@ void ext4_journal_abort_handle(const cha jbd2_journal_abort_handle(handle); } @@ -11,7 +19,7 @@ Index: linux-2.6.18.i386/fs/ext4/super.c /* Deal with the reporting of failure conditions on a filesystem such as * inconsistencies detected or read IO failures. * -@@ -2459,6 +2461,8 @@ out_fail: +@@ -2590,6 +2593,8 @@ out_fail: return ret; } @@ -20,7 +28,7 @@ Index: linux-2.6.18.i386/fs/ext4/super.c /* * Setup any per-fs journal parameters now. We'll do this both on * initial mount, once the journal has been initialised but before we've -@@ -3502,6 +3506,12 @@ int ext4_map_inode_page(struct inode *in +@@ -3728,6 +3733,12 @@ int ext4_map_inode_page(struct inode *in unsigned long *blocks, int *created, int create); EXPORT_SYMBOL(ext4_map_inode_page); @@ -37,7 +45,7 @@ Index: linux-stage/fs/ext4/ext4.h =================================================================== --- linux-stage.orig/fs/ext4/ext4.h +++ linux-stage/fs/ext4/ext4.h -@@ -1097,6 +1097,8 @@ extern struct inode * ext4_orphan_get(st +@@ -1047,6 +1047,8 @@ extern struct inode * ext4_orphan_get(st extern unsigned long ext4_count_free_inodes(struct super_block *); extern unsigned long ext4_count_dirs(struct super_block *); extern void ext4_check_inodes_bitmap(struct super_block *); diff --git a/ldiskfs/kernel_patches/patches/ext4-add-ext4_itable_unused_count.patch b/ldiskfs/kernel_patches/patches/ext4-add-ext4_itable_unused_count.patch new file mode 100644 index 0000000..69aea80 --- /dev/null +++ b/ldiskfs/kernel_patches/patches/ext4-add-ext4_itable_unused_count.patch @@ -0,0 +1,20 @@ +RHEL5 still does not use bg_itable_unused_lo/hi. This patch +can be removed from the series once ext4_itable_unused_count() +is introduced in the RHEL5 mainline. + +Index: linux-2.6.18-128.1.6/fs/ext4/ext4.h +=================================================================== +--- linux-2.6.18-128.1.6.orig/fs/ext4/ext4.h ++++ linux-2.6.18-128.1.6/fs/ext4/ext4.h +@@ -1275,6 +1275,11 @@ static inline unsigned int ext4_flex_bg_ + return 1 << sbi->s_log_groups_per_flex; + } + ++static inline __u32 ext4_itable_unused_count(struct super_block *sb, ++ struct ext4_group_desc *bg) { ++ return le16_to_cpu(bg->bg_itable_unused); ++} ++ + #define ext4_std_error(sb, errno) \ + do { \ + if ((errno)) \ diff --git a/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel5-ext4.series b/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel5-ext4.series index 06b5e3e..aa560d2 100644 --- a/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel5-ext4.series +++ b/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel5-ext4.series @@ -31,3 +31,4 @@ ext4-dynlocks-2.6-rhel5.patch ext4-hash-indexed-dir-dotdot-update.patch ext4-kill-dx_root.patch ext4_data_in_dirent.patch +ext4-add-ext4_itable_unused_count.patch -- 1.8.3.1