Whamcloud - gitweb
LU-1548 ldiskfs: repostion some items in ldiskfs_inode_info
authorwangdi <di.wang@whamcloud.com>
Tue, 7 Aug 2012 21:55:28 +0000 (14:55 -0700)
committerOleg Drokin <green@whamcloud.com>
Thu, 16 Aug 2012 13:15:10 +0000 (09:15 -0400)
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 <di.wang@whamcloud.com>
Change-Id: I2a4ff44cd98366029dfbee7c4f750e13df8bf7c3
Reviewed-on: http://review.whamcloud.com/3562
Tested-by: Hudson
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
ldiskfs/kernel_patches/patches/ext4-inode_info_reorganize.patch [new file with mode: 0644]
ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel6.series

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 (file)
index 0000000..f72ea92
--- /dev/null
@@ -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
index 88d8000..1d90c78 100644 (file)
@@ -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-quota-force-block-alloc-quotaoff.patch
 ext4-quota-dont-update-cmtime.patch
 ext4-quota-first-class.patch
+ext4-inode_info_reorganize.patch