Whamcloud - gitweb
LU-3409 llite: silence lockdep warning in ll_md_blocking_ast
[fs/lustre-release.git] / lustre / lod / lod_object.c
index 8fa06a6..787e461 100644 (file)
@@ -23,7 +23,7 @@
  * Copyright  2009 Sun Microsystems, Inc. All rights reserved
  * Use is subject to license terms.
  *
- * Copyright (c) 2012, Intel Corporation.
+ * Copyright (c) 2012, 2013, Intel Corporation.
  */
 /*
  * lustre/lod/lod_object.c
@@ -393,7 +393,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;
-                       ostid_set_seq(&lum->lmm_oi, FID_SEQ_LOV_DEFAULT);
+                       lmm_oi_set_seq(&lum->lmm_oi, 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;
@@ -570,6 +570,8 @@ static int lod_xattr_del(const struct lu_env *env, struct dt_object *dt,
                         const char *name, struct thandle *th,
                         struct lustre_capa *capa)
 {
+       if (!strcmp(name, XATTR_NAME_LOV))
+               lod_object_free_striping(env, lod_dt_obj(dt));
        return dt_xattr_del(env, dt_object_child(dt), name, th, capa);
 }
 
@@ -930,8 +932,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);
-               fid_to_ostid(lu_object_fid(&dt->do_lu), &v3->lmm_oi);
-               ostid_cpu_to_le(&v3->lmm_oi, &v3->lmm_oi);
+               fid_to_lmm_oi(lu_object_fid(&dt->do_lu), &v3->lmm_oi);
+               lmm_oi_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);