diff --git a/ldiskfs/kernel_patches/patches/ext3-block-bitmap-validation-2.6-SLES10.patch b/ldiskfs/kernel_patches/patches/ext3-block-bitmap-validation-2.6-SLES10.patch deleted file mode 100644 index 8e258d2ea513904334547f775aaf365c3818688b..0000000000000000000000000000000000000000 --- a/ldiskfs/kernel_patches/patches/ext3-block-bitmap-validation-2.6-SLES10.patch +++ /dev/null @@ -1,108 +0,0 @@ -Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> -Signed-off-by: Andreas Dilger <adilger@clusterfs.com> -Index: linux-2.6.16.46-0.14/fs/ext3/balloc.c -=================================================================== ---- linux-2.6.16.46-0.14.orig/fs/ext3/balloc.c -+++ linux-2.6.16.46-0.14/fs/ext3/balloc.c -@@ -144,6 +144,14 @@ unsigned ext3_init_block_bitmap(struct s - return free_blocks - sbi->s_itb_per_group - 2; - } - -+static inline int -+block_in_use(unsigned long block, struct super_block *sb, unsigned char *map) -+{ -+ return ext3_test_bit ((block - -+ le32_to_cpu(EXT3_SB(sb)->s_es->s_first_data_block)) % -+ EXT3_BLOCKS_PER_GROUP(sb), map); -+} -+ - /* - * Read the bitmap for a given block_group, reading into the specified - * slot in the superblock's bitmap cache. -@@ -153,33 +161,52 @@ unsigned ext3_init_block_bitmap(struct s - struct buffer_head * - read_block_bitmap(struct super_block *sb, unsigned int block_group) - { -+ int i; - struct ext3_group_desc * desc; - struct buffer_head * bh = NULL; -+ unsigned long bitmap_blk; - - desc = ext3_get_group_desc (sb, block_group, NULL); - if (!desc) -- goto error_out; -- if (desc->bg_flags & cpu_to_le16(EXT3_BG_BLOCK_UNINIT)) { -- bh = sb_getblk(sb, le32_to_cpu(desc->bg_block_bitmap)); -- if (!buffer_uptodate(bh)) { -- lock_buffer(bh); -- if (!buffer_uptodate(bh)) { -- ext3_init_block_bitmap(sb, bh,block_group,desc); -- set_buffer_uptodate(bh); -- } -- unlock_buffer(bh); -- } -- } else { -- bh = sb_bread(sb, le32_to_cpu(desc->bg_block_bitmap)); -- } -+ return NULL; -+ bitmap_blk = le32_to_cpu(desc->bg_block_bitmap); -+ bh = sb_bread(sb, le32_to_cpu(desc->bg_block_bitmap)); - if (!bh) -- ext3_error (sb, "read_block_bitmap", -- "Cannot read block bitmap - " -- "block_group = %d, block_bitmap = %u", -- block_group, le32_to_cpu(desc->bg_block_bitmap)); -+ ext3_error (sb, __FUNCTION__, -+ "Cannot read block bitmap - " -+ "block_group = %d, block_bitmap = %lu", -+ block_group, bitmap_blk); -+ /* check whether block bitmap block number is set */ -+ if (!block_in_use(bitmap_blk, sb, bh->b_data)) { -+ /* bad block bitmap */ -+ goto error_out; -+ } -+ -+ /* check whether the inode bitmap block number is set */ -+ bitmap_blk = le32_to_cpu(desc->bg_inode_bitmap); -+ if (!block_in_use(bitmap_blk, sb, bh->b_data)) { -+ /* bad block bitmap */ -+ goto error_out; -+ } -+ /* check whether the inode table block number is set */ -+ bitmap_blk = le32_to_cpu(desc->bg_inode_table); -+ for (i = 0; i < EXT3_SB(sb)->s_itb_per_group; i++, bitmap_blk++) { -+ if (!block_in_use(bitmap_blk, sb, bh->b_data)) { -+ /* bad block bitmap */ -+ goto error_out; -+ } -+ } -+ return bh; -+ - error_out: -- return bh; -+ brelse(bh); -+ ext3_error(sb, __FUNCTION__, -+ "Invalid block bitmap - " -+ "block_group = %d, block = %lu", -+ block_group, bitmap_blk); -+ return NULL; - } -+ - /* - * The reservation window structure operations - * -------------------------------------------- -@@ -1548,14 +1575,6 @@ unsigned long ext3_count_free_blocks(str - #endif - } - --static inline int --block_in_use(unsigned long block, struct super_block *sb, unsigned char *map) --{ -- return ext3_test_bit ((block - -- le32_to_cpu(EXT3_SB(sb)->s_es->s_first_data_block)) % -- EXT3_BLOCKS_PER_GROUP(sb), map); --} -- - static inline int test_root(int a, int b) - { - int num = b; diff --git a/ldiskfs/kernel_patches/patches/ext3-block-bitmap-validation-2.6-rhel5.patch b/ldiskfs/kernel_patches/patches/ext3-block-bitmap-validation-2.6-rhel5.patch deleted file mode 100644 index f76289e93163e8fcaa32a875d98c33c1d2a25e0a..0000000000000000000000000000000000000000 --- a/ldiskfs/kernel_patches/patches/ext3-block-bitmap-validation-2.6-rhel5.patch +++ /dev/null @@ -1,107 +0,0 @@ -Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> -Signed-off-by: Andreas Dilger <adilger@clusterfs.com> -Index: linux-2.6.18-8.1.8/fs/ext3/balloc.c -=================================================================== ---- linux-2.6.18-8.1.8.orig/fs/ext3/balloc.c -+++ linux-2.6.18-8.1.8/fs/ext3/balloc.c -@@ -143,6 +143,14 @@ unsigned ext3_init_block_bitmap(struct s - return free_blocks - sbi->s_itb_per_group - 2; - } - -+static inline int -+block_in_use(unsigned long block, struct super_block *sb, unsigned char *map) -+{ -+ return ext3_test_bit ((block - -+ le32_to_cpu(EXT3_SB(sb)->s_es->s_first_data_block)) % -+ EXT3_BLOCKS_PER_GROUP(sb), map); -+} -+ - /* - * Read the bitmap for a given block_group, reading into the specified - * slot in the superblock's bitmap cache. -@@ -152,14 +160,18 @@ unsigned ext3_init_block_bitmap(struct s - struct buffer_head * - read_block_bitmap(struct super_block *sb, unsigned int block_group) - { -+ int i; - struct ext3_group_desc * desc; - struct buffer_head * bh = NULL; -+ unsigned long bitmap_blk; - - desc = ext3_get_group_desc (sb, block_group, NULL); - if (!desc) -- goto error_out; -+ return NULL; -+ -+ bitmap_blk = le32_to_cpu(desc->bg_block_bitmap); - if (desc->bg_flags & cpu_to_le16(EXT3_BG_BLOCK_UNINIT)) { -- bh = sb_getblk(sb, le32_to_cpu(desc->bg_block_bitmap)); -+ bh = sb_getblk(sb, bitmap_blk); - if (!buffer_uptodate(bh)) { - lock_buffer(bh); - if (!buffer_uptodate(bh)) { -@@ -169,15 +181,44 @@ read_block_bitmap(struct super_block *sb - unlock_buffer(bh); - } - } else { -- bh = sb_bread(sb, le32_to_cpu(desc->bg_block_bitmap)); -+ bh = sb_bread(sb, bitmap_blk); - } - if (!bh) -- ext3_error (sb, "read_block_bitmap", -+ ext3_error (sb, __FUNCTION__, - "Cannot read block bitmap - " -- "block_group = %d, block_bitmap = %u", -- block_group, le32_to_cpu(desc->bg_block_bitmap)); --error_out: -+ "block_group = %d, block_bitmap = %lu", -+ block_group, bitmap_blk); -+ -+ /* check whether block bitmap block number is set */ -+ if (!block_in_use(bitmap_blk, sb, bh->b_data)) { -+ /* bad block bitmap */ -+ goto error_out; -+ } -+ -+ /* check whether the inode bitmap block number is set */ -+ bitmap_blk = le32_to_cpu(desc->bg_inode_bitmap); -+ if (!block_in_use(bitmap_blk, sb, bh->b_data)) { -+ /* bad block bitmap */ -+ goto error_out; -+ } -+ /* check whether the inode table block number is set */ -+ bitmap_blk = le32_to_cpu(desc->bg_inode_table); -+ for (i = 0; i < EXT3_SB(sb)->s_itb_per_group; i++, bitmap_blk++) { -+ if (!block_in_use(bitmap_blk, sb, bh->b_data)) { -+ /* bad block bitmap */ -+ goto error_out; -+ } -+ } - return bh; -+ -+error_out: -+ brelse(bh); -+ ext3_error(sb, __FUNCTION__, -+ "Invalid block bitmap - " -+ "block_group = %d, block = %lu", -+ block_group, bitmap_blk); -+ return NULL; -+ - } - /* - * The reservation window structure operations -@@ -1617,14 +1658,6 @@ ext3_fsblk_t ext3_count_free_blocks(stru - #endif - } - --static inline int --block_in_use(ext3_fsblk_t block, struct super_block *sb, unsigned char *map) --{ -- return ext3_test_bit ((block - -- le32_to_cpu(EXT3_SB(sb)->s_es->s_first_data_block)) % -- EXT3_BLOCKS_PER_GROUP(sb), map); --} -- - static inline int test_root(int a, int b) - { - int num = b; diff --git a/ldiskfs/kernel_patches/patches/ext3-blockmap-validation-2.6-rhel4.patch b/ldiskfs/kernel_patches/patches/ext3-blockmap-validation-2.6-rhel4.patch deleted file mode 100644 index e41c85a804eb0559cdd9188d83d7c8ad1fc8f176..0000000000000000000000000000000000000000 --- a/ldiskfs/kernel_patches/patches/ext3-blockmap-validation-2.6-rhel4.patch +++ /dev/null @@ -1,108 +0,0 @@ -Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> -Signed-off-by: Andreas Dilger <adilger@clusterfs.com> -Index: linux-2.6.9/fs/ext3/balloc.c -=================================================================== ---- linux-2.6.9.orig/fs/ext3/balloc.c -+++ linux-2.6.9/fs/ext3/balloc.c -@@ -143,6 +143,14 @@ unsigned ext3_init_block_bitmap(struct s - return free_blocks - sbi->s_itb_per_group - 2; - } - -+static inline int -+block_in_use(unsigned long block, struct super_block *sb, unsigned char *map) -+{ -+ return ext3_test_bit ((block - -+ le32_to_cpu(EXT3_SB(sb)->s_es->s_first_data_block)) % -+ EXT3_BLOCKS_PER_GROUP(sb), map); -+} -+ - /* - * Read the bitmap for a given block_group, reading into the specified - * slot in the superblock's bitmap cache. -@@ -152,14 +160,18 @@ unsigned ext3_init_block_bitmap(struct s - struct buffer_head * - read_block_bitmap(struct super_block *sb, unsigned int block_group) - { -+ int i; - struct ext3_group_desc * desc; - struct buffer_head * bh = NULL; -+ unsigned long bitmap_blk; - - desc = ext3_get_group_desc (sb, block_group, NULL); - if (!desc) -- goto error_out; -+ return NULL; -+ -+ bitmap_blk = le32_to_cpu(desc->bg_block_bitmap); - if (desc->bg_flags & cpu_to_le16(EXT3_BG_BLOCK_UNINIT)) { -- bh = sb_getblk(sb, le32_to_cpu(desc->bg_block_bitmap)); -+ bh = sb_getblk(sb, bitmap_blk); - if (!buffer_uptodate(bh)) { - lock_buffer(bh); - if (!buffer_uptodate(bh)) { -@@ -169,15 +181,44 @@ read_block_bitmap(struct super_block *sb - unlock_buffer(bh); - } - } else { -- bh = sb_bread(sb, le32_to_cpu(desc->bg_block_bitmap)); -+ bh = sb_bread(sb, bitmap_blk); - } - if (!bh) -- ext3_error (sb, "read_block_bitmap", -+ ext3_error (sb, __FUNCTION__, - "Cannot read block bitmap - " -- "block_group = %d, block_bitmap = %u", -- block_group, le32_to_cpu(desc->bg_block_bitmap)); --error_out: -+ "block_group = %d, block_bitmap = %lu", -+ block_group, bitmap_blk); -+ -+ /* check whether block bitmap block number is set */ -+ if (!block_in_use(bitmap_blk, sb, bh->b_data)) { -+ /* bad block bitmap */ -+ goto error_out; -+ } -+ -+ /* check whether the inode bitmap block number is set */ -+ bitmap_blk = le32_to_cpu(desc->bg_inode_bitmap); -+ if (!block_in_use(bitmap_blk, sb, bh->b_data)) { -+ /* bad block bitmap */ -+ goto error_out; -+ } -+ /* check whether the inode table block number is set */ -+ bitmap_blk = le32_to_cpu(desc->bg_inode_table); -+ for (i = 0; i < EXT3_SB(sb)->s_itb_per_group; i++, bitmap_blk++) { -+ if (!block_in_use(bitmap_blk, sb, bh->b_data)) { -+ /* bad block bitmap */ -+ goto error_out; -+ } -+ } - return bh; -+ -+error_out: -+ brelse(bh); -+ ext3_error(sb, __FUNCTION__, -+ "Invalid block bitmap - " -+ "block_group = %d, block = %lu", -+ block_group, bitmap_blk); -+ return NULL; -+ - } - /* - * The reservation window structure operations -@@ -1501,15 +1542,6 @@ unsigned long ext3_count_free_blocks(str - #endif - } - --static inline int block_in_use(unsigned long block, -- struct super_block * sb, -- unsigned char * map) --{ -- return ext3_test_bit ((block - -- le32_to_cpu(EXT3_SB(sb)->s_es->s_first_data_block)) % -- EXT3_BLOCKS_PER_GROUP(sb), map); --} -- - static inline int test_root(int a, int b) - { - if (a == 0) diff --git a/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel4.series b/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel4.series index dd11d0146fd5f7d4e91b80660639ad31848018fa..3be9760e0881fc9ab22de050e93212d642f8c536 100644 --- a/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel4.series +++ b/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel4.series @@ -21,5 +21,4 @@ ext3-uninit-2.6.9.patch ext3-nanosecond-2.6-rhel4.patch ext3-unlink-race.patch ext3-mmp-2.6-rhel4.patch -ext3-blockmap-validation-2.6-rhel4.patch ext3-fiemap-2.6-sles10.patch diff --git a/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel5.series b/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel5.series index efa74ed66016d9e9d35c99c83d8e1b0f08a5230a..b899b8fb1f69633f724ac1ad9e6602b570639bd5 100644 --- a/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel5.series +++ b/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel5.series @@ -16,5 +16,4 @@ ext3-inode-version-2.6.18-vanilla.patch ext3-mmp-2.6.18-vanilla.patch ext3-unlink-race.patch ext3-fiemap-2.6.18-vanilla.patch -ext3-block-bitmap-validation-2.6-rhel5.patch ext3-statfs-2.6-rhel5.patch diff --git a/ldiskfs/kernel_patches/series/ldiskfs-2.6-sles10.series b/ldiskfs/kernel_patches/series/ldiskfs-2.6-sles10.series index 6e09977724f33ddac19ff6daf3338a90d17df0ab..d7ee3b0e84358a6d727b29020d51de52e1cf5d51 100644 --- a/ldiskfs/kernel_patches/series/ldiskfs-2.6-sles10.series +++ b/ldiskfs/kernel_patches/series/ldiskfs-2.6-sles10.series @@ -20,5 +20,4 @@ ext3-nanosecond-2.6-sles10.patch ext3-inode-version-2.6-sles10.patch ext3-mmp-2.6-sles10.patch ext3-fiemap-2.6-sles10.patch -ext3-block-bitmap-validation-2.6-SLES10.patch ext3-statfs-2.6-sles10.patch