Whamcloud - gitweb
LU-3059 lod: shrink lod_object to 128 bytes
authorJohn L. Hammond <john.hammond@intel.com>
Thu, 28 Mar 2013 22:05:00 +0000 (17:05 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 9 Apr 2013 03:11:25 +0000 (23:11 -0400)
By packing ldo_stripes_allocated into the bitfield containing
ldo_striping_cached and ldo_def_striping_set we reduce the size of
struct lod_object from 136 to 128 bytes on x86_64.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: If419560f9187a98fcb034cd9fcd5c854ff467cec
Reviewed-on: http://review.whamcloud.com/5878
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/lod/lod_internal.h

index dcf7d6e..a2cb272 100644 (file)
@@ -154,10 +154,10 @@ struct lod_object {
        char              *ldo_pool;
        struct dt_object **ldo_stripe;
        /* to know how much memory to free, ldo_stripenr can be less */
        char              *ldo_pool;
        struct dt_object **ldo_stripe;
        /* to know how much memory to free, ldo_stripenr can be less */
-       int                ldo_stripes_allocated;
        /* default striping for directory represented by this object
         * is cached in stripenr/stripe_size */
        /* default striping for directory represented by this object
         * is cached in stripenr/stripe_size */
-       unsigned int       ldo_striping_cached:1,
+       unsigned int       ldo_stripes_allocated:16,
+                          ldo_striping_cached:1,
                           ldo_def_striping_set:1;
        __u32              ldo_def_stripe_size;
        __u16              ldo_def_stripenr;
                           ldo_def_striping_set:1;
        __u32              ldo_def_stripe_size;
        __u16              ldo_def_stripenr;