From 681701c36cd5848acd1dc345e9f0dafa6f5c5e76 Mon Sep 17 00:00:00 2001 From: yangsheng Date: Fri, 20 Feb 2009 15:47:03 +0000 Subject: [PATCH] Branch HEAD b=18289 Back the changes and get another inspection. --- .../patches/ext3-extents-2.6.18-vanilla.patch | 24 +++++++++++----------- .../kernel_patches/patches/ext3-nlinks-2.6.9.patch | 17 ++++++++++----- .../patches/ext3-uninit-2.6.18.patch | 6 +++--- .../kernel_patches/series/ldiskfs-2.6-rhel5.series | 2 +- 4 files changed, 28 insertions(+), 21 deletions(-) diff --git a/ldiskfs/kernel_patches/patches/ext3-extents-2.6.18-vanilla.patch b/ldiskfs/kernel_patches/patches/ext3-extents-2.6.18-vanilla.patch index 4e900bf..f19b76e 100644 --- a/ldiskfs/kernel_patches/patches/ext3-extents-2.6.18-vanilla.patch +++ b/ldiskfs/kernel_patches/patches/ext3-extents-2.6.18-vanilla.patch @@ -2337,20 +2337,20 @@ Index: linux-2.6.18.8/fs/ext3/inode.c depth = ext3_block_to_path(inode,iblock,offsets,&blocks_to_boundary); @@ -984,12 +983,10 @@ static int ext3_get_block(struct inode * - started = 1; - } -- ret = ext3_get_blocks_handle(handle, inode, iblock, -+ ret = ext3_get_blocks_wrap(handle, inode, iblock, + get_block: + if (ret == 0) { +- ret = ext3_get_blocks_handle(handle, inode, iblock, ++ ret = ext3_get_blocks_wrap(handle, inode, iblock, max_blocks, bh_result, create, 0); -- if (ret > 0) { -- bh_result->b_size = (ret << inode->i_blkbits); -+ if (ret > 0) - ret = 0; -- } - if (started) - ext3_journal_stop(handle); - out: +- if (ret > 0) { +- bh_result->b_size = (ret << inode->i_blkbits); ++ if (ret > 0) + ret = 0; +- } + } + return ret; + } @@ -1008,7 +1005,7 @@ struct buffer_head *ext3_getblk(handle_t dummy.b_state = 0; dummy.b_blocknr = -1000; diff --git a/ldiskfs/kernel_patches/patches/ext3-nlinks-2.6.9.patch b/ldiskfs/kernel_patches/patches/ext3-nlinks-2.6.9.patch index e2dac7b..310b645 100644 --- a/ldiskfs/kernel_patches/patches/ext3-nlinks-2.6.9.patch +++ b/ldiskfs/kernel_patches/patches/ext3-nlinks-2.6.9.patch @@ -2,7 +2,7 @@ Index: linux-2.6.18-53.1.14/fs/ext3/namei.c =================================================================== --- linux-2.6.18-53.1.14/fs/ext3/namei.c 2008-12-02 13:21:14.000000000 +0530 +++ linux-2.6.18-53.1.14_new/fs/ext3/namei.c 2008-12-02 15:11:09.000000000 +0530 -@@ -1656,11 +1656,17 @@ static int ext3_delete_entry (handle_t * +@@ -1656,13 +1656,24 @@ static int ext3_delete_entry (handle_t * static inline void ext3_inc_count(handle_t *handle, struct inode *inode) { inode->i_nlink++; @@ -13,14 +13,21 @@ Index: linux-2.6.18-53.1.14/fs/ext3/namei.c + } } - static inline void ext3_dec_count(handle_t *handle, struct inode *inode) +-static inline void ext3_dec_count(handle_t *handle, struct inode *inode) ++static inline void drop_nlink(struct inode *inode) { -- inode->i_nlink--; -+ if (!S_ISDIR(inode->i_mode) || inode->i_nlink > 2) -+ drop_nlink(inode); + inode->i_nlink--; } ++static inline void ext3_dec_count(handle_t *handle, struct inode *inode) ++{ ++ if (!S_ISDIR(inode->i_mode) || inode->i_nlink > 2) ++ drop_nlink(inode); ++} ++ static int ext3_add_nondir(handle_t *handle, + struct dentry *dentry, struct inode *inode) + { @@ -1759,7 +1770,7 @@ static int ext3_mkdir(struct inode * dir struct ext3_dir_entry_2 * de; int err, retries = 0; diff --git a/ldiskfs/kernel_patches/patches/ext3-uninit-2.6.18.patch b/ldiskfs/kernel_patches/patches/ext3-uninit-2.6.18.patch index d2aad2a..0a463dc 100644 --- a/ldiskfs/kernel_patches/patches/ext3-uninit-2.6.18.patch +++ b/ldiskfs/kernel_patches/patches/ext3-uninit-2.6.18.patch @@ -88,9 +88,9 @@ Index: linux-2.6.18-53.1.19/fs/ext3/resize.c -} - -/* - * If we have fewer than thresh credits, extend by EXT3_MAX_TRANS_DATA. - * If that fails, restart the transaction & regain write access for the - * buffer head which is used for block_bitmap modifications. + * Set up the block and inode bitmaps, and the inode table for the new group. + * This doesn't need to be part of the main transaction, since we are only + * changing blocks outside the actual filesystem. We still do journaling to @@ -834,6 +816,7 @@ int ext3_group_add(struct super_block *s gdp->bg_inode_table = cpu_to_le32(input->inode_table); gdp->bg_free_blocks_count = cpu_to_le16(input->free_blocks_count); diff --git a/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel5.series b/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel5.series index 5a6ab49..9b61679 100644 --- a/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel5.series +++ b/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel5.series @@ -6,7 +6,7 @@ ext3-include-fixes-2.6-rhel4.patch ext3-extents-2.6.18-vanilla.patch ext3-mballoc3-core.patch ext3-mballoc3-2.6.18.patch -ext3-nlinks-2.6.9.patch +ext3-nlinks-2.6-rhel5.patch ext3-ialloc-2.6.patch ext3-remove-cond_resched-calls-2.6.12.patch ext3-filterdata-sles10.patch -- 1.8.3.1