From 9c328e425770cbc778e3c32f1409ae93e9fb27fe Mon Sep 17 00:00:00 2001 From: johann Date: Thu, 4 Jun 2009 21:35:11 +0000 Subject: [PATCH] Branch b_release_1_8_1 b=19725 i=adilger i=girish use ext4_read_inode_bitmap() in fsfilt code. --- .../patches/export-ext4-2.6-rhel5.patch | 40 ++++++++++++++++++++-- .../patches/export-ext4-2.6-sles11.patch | 34 ++++++++++++++++++ lustre/lvfs/fsfilt_ext3.c | 8 +++-- 3 files changed, 76 insertions(+), 6 deletions(-) diff --git a/ldiskfs/kernel_patches/patches/export-ext4-2.6-rhel5.patch b/ldiskfs/kernel_patches/patches/export-ext4-2.6-rhel5.patch index 3930843..9f33c4f 100644 --- a/ldiskfs/kernel_patches/patches/export-ext4-2.6-rhel5.patch +++ b/ldiskfs/kernel_patches/patches/export-ext4-2.6-rhel5.patch @@ -1,7 +1,7 @@ -Index: linux-2.6.18.i386/fs/ext4/super.c +Index: linux-2.6.18-128.1.6/fs/ext4/super.c =================================================================== ---- linux-2.6.18.i386.orig/fs/ext4/super.c -+++ linux-2.6.18.i386/fs/ext4/super.c +--- linux-2.6.18-128.1.6.orig/fs/ext4/super.c ++++ linux-2.6.18-128.1.6/fs/ext4/super.c @@ -185,6 +185,8 @@ void ext4_journal_abort_handle(const cha jbd2_journal_abort_handle(handle); } @@ -33,3 +33,37 @@ Index: linux-2.6.18.i386/fs/ext4/super.c MODULE_AUTHOR("Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others"); MODULE_DESCRIPTION("Fourth Extended Filesystem with extents"); MODULE_LICENSE("GPL"); +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 +@@ -1024,6 +1024,8 @@ extern unsigned long ext4_count_free_ino + extern unsigned long ext4_count_dirs (struct super_block *); + extern void ext4_check_inodes_bitmap (struct super_block *); + extern unsigned long ext4_count_free (struct buffer_head *, unsigned); ++extern struct buffer_head *ext4_read_inode_bitmap(struct super_block *sb, ++ ext4_group_t block_group); + + /* mballoc.c */ + extern long ext4_mb_stats; +Index: linux-2.6.18-128.1.6/fs/ext4/ialloc.c +=================================================================== +--- linux-2.6.18-128.1.6.orig/fs/ext4/ialloc.c ++++ linux-2.6.18-128.1.6/fs/ext4/ialloc.c +@@ -96,7 +96,7 @@ unsigned ext4_init_inode_bitmap(struct s + * + * Return buffer_head of bitmap on success or NULL. + */ +-static struct buffer_head * ++struct buffer_head * + ext4_read_inode_bitmap(struct super_block *sb, ext4_group_t block_group) + { + struct ext4_group_desc *desc; +@@ -137,6 +137,7 @@ ext4_read_inode_bitmap(struct super_bloc + } + return bh; + } ++EXPORT_SYMBOL(ext4_read_inode_bitmap); + + /* + * NOTE! When we get the inode, we're the only people 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 3930843..0d151fc 100644 --- a/ldiskfs/kernel_patches/patches/export-ext4-2.6-sles11.patch +++ b/ldiskfs/kernel_patches/patches/export-ext4-2.6-sles11.patch @@ -33,3 +33,37 @@ Index: linux-2.6.18.i386/fs/ext4/super.c MODULE_AUTHOR("Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others"); MODULE_DESCRIPTION("Fourth Extended Filesystem with extents"); MODULE_LICENSE("GPL"); +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 + 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 *); ++extern struct buffer_head *ext4_read_inode_bitmap(struct super_block *sb, ++ ext4_group_t block_group); + + /* mballoc.c */ + extern long ext4_mb_stats; +Index: linux-stage/fs/ext4/ialloc.c +=================================================================== +--- linux-stage.orig/fs/ext4/ialloc.c ++++ linux-stage/fs/ext4/ialloc.c +@@ -96,7 +96,7 @@ unsigned ext4_init_inode_bitmap(struct s + * + * Return buffer_head of bitmap on success or NULL. + */ +-static struct buffer_head * ++struct buffer_head * + ext4_read_inode_bitmap(struct super_block *sb, ext4_group_t block_group) + { + struct ext4_group_desc *desc; +@@ -159,6 +159,7 @@ ext4_read_inode_bitmap(struct super_bloc + } + return bh; + } ++EXPORT_SYMBOL(ext4_read_inode_bitmap); + + /* + * NOTE! When we get the inode, we're the only people diff --git a/lustre/lvfs/fsfilt_ext3.c b/lustre/lvfs/fsfilt_ext3.c index f6a9092..0339733 100644 --- a/lustre/lvfs/fsfilt_ext3.c +++ b/lustre/lvfs/fsfilt_ext3.c @@ -1705,8 +1705,9 @@ get_group_desc(struct super_block *sb, int group) return gdp + desc; } +#ifndef HAVE_EXT4_LDISKFS static inline struct buffer_head * -read_inode_bitmap(struct super_block *sb, unsigned long group) +ext3_read_inode_bitmap(struct super_block *sb, unsigned long group) { struct ext3_group_desc *desc; struct buffer_head *bh; @@ -1715,6 +1716,7 @@ read_inode_bitmap(struct super_block *sb, unsigned long group) bh = sb_bread(sb, ext3_inode_bitmap(sb, desc)); return bh; } +#endif static inline struct inode *ext3_iget_inuse(struct super_block *sb, struct buffer_head *bitmap_bh, @@ -2018,9 +2020,9 @@ static int fsfilt_ext3_quotacheck(struct super_block *sb, /* check quota and update in hash */ for (group = 0; group < sbi->s_groups_count; group++) { ino = group * sbi->s_inodes_per_group + 1; - bitmap_bh = read_inode_bitmap(sb, group); + bitmap_bh = ext3_read_inode_bitmap(sb, group); if (!bitmap_bh) { - CERROR("read_inode_bitmap group %d failed", group); + CERROR("ext3_read_inode_bitmap group %d failed", group); GOTO(out, -EIO); } -- 1.8.3.1