X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Flod%2Flod_object.c;h=070b2b6ca86a6c073c25847cfedb55269bf6d554;hb=0607e01af74a81d0fe12ceec79bd22810a5dfe92;hp=7ec9a9362cdaf8a5e595062e42e6ce5cb50c9efd;hpb=11b08d4ee69a242b763e5f4a34c511cb857f7868;p=fs%2Flustre-release.git diff --git a/lustre/lod/lod_object.c b/lustre/lod/lod_object.c index 7ec9a93..070b2b6 100644 --- a/lustre/lod/lod_object.c +++ b/lustre/lod/lod_object.c @@ -124,8 +124,6 @@ static struct dt_it *lod_it_init(const struct lu_env *env, #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) @@ -382,7 +380,7 @@ static int lod_xattr_get(const struct lu_env *env, struct dt_object *dt, 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; @@ -435,7 +433,7 @@ static int lod_declare_xattr_set(const struct lu_env *env, 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; } @@ -916,8 +914,8 @@ static int lod_declare_object_create(const struct lu_env *env, 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); @@ -947,7 +945,7 @@ int lod_striping_create(const struct lu_env *env, struct dt_object *dt, 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 */