Commit 01cd98ff authored by John L. Hammond's avatar John L. Hammond Committed by Greg Kroah-Hartman

staging: lustre: lov: flatten struct lov_stripe_md

Flatten out the lsm_wire struct from the middle of struct
lov_stripe_md and remove the member name macros.
Signed-off-by: default avatarJohn L. Hammond <john.hammond@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5814
Reviewed-on: http://review.whamcloud.com/12581Reviewed-by: default avatarBobi Jam <bobijam@gmail.com>
Reviewed-by: default avatarJinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8b915c1e
...@@ -88,31 +88,17 @@ struct lov_stripe_md { ...@@ -88,31 +88,17 @@ struct lov_stripe_md {
/* maximum possible file size, might change as OSTs status changes, /* maximum possible file size, might change as OSTs status changes,
* e.g. disconnected, deactivated * e.g. disconnected, deactivated
*/ */
__u64 lsm_maxbytes; __u64 lsm_maxbytes;
struct { struct ost_id lsm_oi;
/* Public members. */ __u32 lsm_magic;
struct ost_id lw_object_oi; /* lov object id/seq */ __u32 lsm_stripe_size;
__u32 lsm_pattern; /* striping pattern (RAID0, RAID1) */
/* LOV-private members start here -- only for use in lov/. */ __u16 lsm_stripe_count;
__u32 lw_magic; __u16 lsm_layout_gen;
__u32 lw_stripe_size; /* size of the stripe */ char lsm_pool_name[LOV_MAXPOOLNAME + 1];
__u32 lw_pattern; /* striping pattern (RAID0, RAID1) */
__u16 lw_stripe_count; /* number of objects being striped over */
__u16 lw_layout_gen; /* generation of the layout */
char lw_pool_name[LOV_MAXPOOLNAME + 1]; /* pool name */
} lsm_wire;
struct lov_oinfo *lsm_oinfo[0]; struct lov_oinfo *lsm_oinfo[0];
}; };
#define lsm_oi lsm_wire.lw_object_oi
#define lsm_magic lsm_wire.lw_magic
#define lsm_layout_gen lsm_wire.lw_layout_gen
#define lsm_stripe_size lsm_wire.lw_stripe_size
#define lsm_pattern lsm_wire.lw_pattern
#define lsm_stripe_count lsm_wire.lw_stripe_count
#define lsm_pool_name lsm_wire.lw_pool_name
static inline bool lsm_is_released(struct lov_stripe_md *lsm) static inline bool lsm_is_released(struct lov_stripe_md *lsm)
{ {
return !!(lsm->lsm_pattern & LOV_PATTERN_F_RELEASED); return !!(lsm->lsm_pattern & LOV_PATTERN_F_RELEASED);
......
...@@ -744,8 +744,8 @@ static inline struct lov_thread_info *lov_env_info(const struct lu_env *env) ...@@ -744,8 +744,8 @@ static inline struct lov_thread_info *lov_env_info(const struct lu_env *env)
static inline struct lov_layout_raid0 *lov_r0(struct lov_object *lov) static inline struct lov_layout_raid0 *lov_r0(struct lov_object *lov)
{ {
LASSERT(lov->lo_type == LLT_RAID0); LASSERT(lov->lo_type == LLT_RAID0);
LASSERT(lov->lo_lsm->lsm_wire.lw_magic == LOV_MAGIC || LASSERT(lov->lo_lsm->lsm_magic == LOV_MAGIC ||
lov->lo_lsm->lsm_wire.lw_magic == LOV_MAGIC_V3); lov->lo_lsm->lsm_magic == LOV_MAGIC_V3);
return &lov->u.raid0; return &lov->u.raid0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment