#define LOD_CHECK_IT(env, it) \
{ \
- /* IT is supposed to be in thread info always */ \
- LASSERT((it) == &lod_env_info(env)->lti_it); \
LASSERT((it)->lit_obj != NULL); \
LASSERT((it)->lit_it != NULL); \
} while(0)
rc = sizeof(struct lov_user_md_v1);
} else if (buf->lb_len >= sizeof(struct lov_user_md_v1)) {
lum->lmm_magic = LOV_USER_MAGIC_V1;
- lum->lmm_object_seq = FID_SEQ_LOV_DEFAULT;
+ lum->lmm_oi.oi_seq = FID_SEQ_LOV_DEFAULT;
lum->lmm_pattern = desc->ld_pattern;
lum->lmm_stripe_size = desc->ld_default_stripe_size;
lum->lmm_stripe_count = desc->ld_default_stripe_count;
if (rc)
RETURN(rc);
} else {
- memset(attr, 0, sizeof(attr));
+ memset(attr, 0, sizeof(*attr));
attr->la_valid = LA_TYPE | LA_MODE;
attr->la_mode = S_IFREG;
}
v3->lmm_magic = cpu_to_le32(LOV_MAGIC_V3);
v3->lmm_pattern = cpu_to_le32(LOV_PATTERN_RAID0);
- v3->lmm_object_id = fid_oid(lu_object_fid(&dt->do_lu));
- v3->lmm_object_seq = fid_seq(lu_object_fid(&dt->do_lu));
+ fid_ostid_pack(lu_object_fid(&dt->do_lu), &v3->lmm_oi);
+ ostid_cpu_to_le(&v3->lmm_oi, &v3->lmm_oi);
v3->lmm_stripe_size = cpu_to_le32(lo->ldo_def_stripe_size);
v3->lmm_stripe_count = cpu_to_le32(lo->ldo_def_stripenr);
v3->lmm_stripe_offset = cpu_to_le16(lo->ldo_def_stripe_offset);
ENTRY;
LASSERT(lo->ldo_stripe);
- LASSERT(lo->ldo_stripe > 0);
+ LASSERT(lo->ldo_stripenr > 0);
LASSERT(lo->ldo_striping_cached == 0);
/* create all underlying objects */