From: Alex Zhuravlev Date: Wed, 31 Jan 2018 06:08:02 +0000 (+0300) Subject: LU-10604 osd: define couple fields as bitfield X-Git-Tag: 2.10.59~44 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=6a07b73d5cdc8b688eebdbf15fa5002a680e3e34 LU-10604 osd: define couple fields as bitfield redefine oo_compat_dot_created and oo_compat_dotdot_created to save 8 bytes per object. Change-Id: I92dafc693f1d118debc251d7d064b206e36624f0 Signed-off-by: Alex Zhuravlev Reviewed-on: https://review.whamcloud.com/31097 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Mike Pershin Reviewed-by: Lai Siyao Reviewed-by: Oleg Drokin --- diff --git a/lustre/osd-ldiskfs/osd_internal.h b/lustre/osd-ldiskfs/osd_internal.h index 4514a36..3d25d78 100644 --- a/lustre/osd-ldiskfs/osd_internal.h +++ b/lustre/osd-ldiskfs/osd_internal.h @@ -135,23 +135,20 @@ struct osd_object { /** protects inode attributes. */ spinlock_t oo_guard; + /** + * Following two members *compat_dot* are used to indicate + * the presence of dot and dotdot in the given directory. + * This is required for interop mode (b11826). + */ __u32 oo_destroyed:1, - oo_pfid_in_lma:1; + oo_pfid_in_lma:1, + oo_compat_dot_created:1, + oo_compat_dotdot_created:1; /* the i_flags in LMA */ - __u32 oo_lma_flags; - /** - * Following two members are used to indicate the presence of dot and - * dotdot in the given directory. This is required for interop mode - * (b11826). - */ - int oo_compat_dot_created; - int oo_compat_dotdot_created; + __u32 oo_lma_flags; const struct lu_env *oo_owner; -#ifdef CONFIG_LOCKDEP - struct lockdep_map oo_dep_map; -#endif struct list_head oo_xattr_list; struct lu_object_header *oo_header;