From e2092a056a125cbd10d77dd2912b63a2016c0c1c Mon Sep 17 00:00:00 2001 From: Andreas Dilger Date: Fri, 7 Feb 2014 20:33:02 -0700 Subject: [PATCH] LU-3059 lu: shrink lu_object_header by 8 bytes on x86_64 Locate the loh_flags and loh_ref fields together in lu_object_header to avoid holes and shrink the structure by 8 bytes. Signed-off-by: Andreas Dilger Change-Id: I36b6132a819b6557d6d1688adb3e1f7d282d22b5 Reviewed-on: http://review.whamcloud.com/9185 Reviewed-by: Alex Zhuravlev Reviewed-by: Liang Zhen Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/include/lu_object.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lustre/include/lu_object.h b/lustre/include/lu_object.h index efffc61..989e0f9 100644 --- a/lustre/include/lu_object.h +++ b/lustre/include/lu_object.h @@ -516,6 +516,10 @@ enum lu_object_header_attr { */ struct lu_object_header { /** + * Fid, uniquely identifying this object. + */ + struct lu_fid loh_fid; + /** * Object flags from enum lu_object_header_flags. Set and checked * atomically. */ @@ -525,10 +529,6 @@ struct lu_object_header { */ atomic_t loh_ref; /** - * Fid, uniquely identifying this object. - */ - struct lu_fid loh_fid; - /** * Common object attributes, cached for efficiency. From enum * lu_object_header_attr. */ @@ -536,16 +536,16 @@ struct lu_object_header { /** * Linkage into per-site hash table. Protected by lu_site::ls_guard. */ - cfs_hlist_node_t loh_hash; + struct hlist_node loh_hash; /** * Linkage into per-site LRU list. Protected by lu_site::ls_guard. */ - cfs_list_t loh_lru; + struct list_head loh_lru; /** * Linkage into list of layers. Never modified once set (except lately * during object destruction). No locking is necessary. */ - cfs_list_t loh_layers; + struct list_head loh_layers; /** * A list of references to this object, for debugging. */ -- 1.8.3.1