From 86b047f2316d4b952ebaa2c9b67ce9494d0e9fb8 Mon Sep 17 00:00:00 2001 From: wangdi Date: Tue, 7 Aug 2012 14:55:28 -0700 Subject: [PATCH] LU-1548 ldiskfs: repostion some items in ldiskfs_inode_info Reposition a few items of ldiskfs_inode_info to remove the alignment hole in the structure, i.e. reduce the size of this structure, then each slab page can hold more objects(ldiskfs_inode_info). Signed-off-by: Wang di Change-Id: I2a4ff44cd98366029dfbee7c4f750e13df8bf7c3 Reviewed-on: http://review.whamcloud.com/3562 Tested-by: Hudson Reviewed-by: Fan Yong Reviewed-by: Andreas Dilger --- .../patches/ext4-inode_info_reorganize.patch | 59 ++++++++++++++++++++++ .../kernel_patches/series/ldiskfs-2.6-rhel6.series | 1 + 2 files changed, 60 insertions(+) create mode 100644 ldiskfs/kernel_patches/patches/ext4-inode_info_reorganize.patch diff --git a/ldiskfs/kernel_patches/patches/ext4-inode_info_reorganize.patch b/ldiskfs/kernel_patches/patches/ext4-inode_info_reorganize.patch new file mode 100644 index 0000000..f72ea92 --- /dev/null +++ b/ldiskfs/kernel_patches/patches/ext4-inode_info_reorganize.patch @@ -0,0 +1,59 @@ +Index: linux-stage/fs/ext4/ext4.h +=================================================================== +--- linux-stage.orig/fs/ext4/ext4.h 2012-08-07 14:16:06.331203480 -0700 ++++ linux-stage/fs/ext4/ext4.h 2012-08-10 10:08:47.854206335 -0700 +@@ -713,6 +713,7 @@ + /* following fields for parallel directory operations -bzzz */ + struct semaphore i_append_sem; + ++ ext4_lblk_t i_dir_start_lookup; + /* + * i_block_group is the number of the block group which contains + * this file's inode. Constant across the lifetime of the inode, +@@ -724,7 +725,6 @@ + unsigned long i_state_flags; /* Dynamic state flags */ + unsigned long i_flags; + +- ext4_lblk_t i_dir_start_lookup; + #ifdef CONFIG_EXT4_FS_XATTR + /* + * Extended attributes can be read independently of the main file +@@ -788,10 +788,12 @@ + unsigned int i_reserved_data_blocks; + unsigned int i_reserved_meta_blocks; + unsigned int i_allocated_meta_blocks; +- unsigned short i_delalloc_reserved_flag; + sector_t i_da_metadata_calc_last_lblock; + int i_da_metadata_calc_len; + ++ /* allocation reservation info for delalloc */ ++ unsigned short i_delalloc_reserved_flag; ++ + /* on-disk additional length */ + __u16 i_extra_isize; + +@@ -807,16 +809,22 @@ + /* current io_end structure for async DIO write*/ + ext4_io_end_t *cur_aio_dio; + atomic_t i_aiodio_unwritten; /* Number of inflight conversions pending */ +- struct mutex i_aio_mutex; /* big hammer for unaligned AIO */ + + /* + * Transactions that contain inode's metadata needed to complete + * fsync and fdatasync, respectively. + */ ++ + tid_t i_sync_tid; +- tid_t i_datasync_tid; ++ ++ struct mutex i_aio_mutex; /* big hammer for unaligned AIO */ + + __u64 i_fs_version; ++ /* ++ * Transactions that contain inode's metadata needed to complete ++ * fsync and fdatasync, respectively. ++ */ ++ tid_t i_datasync_tid; + }; + + #define HAVE_DISK_INODE_VERSION diff --git a/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel6.series b/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel6.series index 88d8000..1d90c78 100644 --- a/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel6.series +++ b/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel6.series @@ -37,3 +37,4 @@ ext4_pdirop-rhel6.patch ext4-quota-force-block-alloc-quotaoff.patch ext4-quota-dont-update-cmtime.patch ext4-quota-first-class.patch +ext4-inode_info_reorganize.patch -- 1.8.3.1