Whamcloud - gitweb
LU-8998 pfl: enhance PFID EA for PFL
[fs/lustre-release.git] / lustre / ofd / ofd_internal.h
index db15b4f..ab477fb 100644 (file)
@@ -298,10 +298,7 @@ struct ofd_thread_info {
        struct lu_attr                   fti_attr;
        struct lu_attr                   fti_attr2;
        struct ldlm_res_id               fti_resid;
-       union {
-               struct filter_fid        fti_mds_fid;
-               struct filter_fid_old    fti_mds_fid_old;
-       };
+       struct filter_fid                fti_mds_fid;
        struct ost_id                    fti_ostid;
        struct ofd_object               *fti_obj;
        union {
@@ -573,6 +570,10 @@ static inline void ofd_prepare_fidea(struct filter_fid *ff,
        /* XXX: we are ignoring o_parent_ver here, since this should
         *      be the same for all objects in this fileset. */
        ff->ff_parent.f_ver = cpu_to_le32(oa->o_stripe_idx);
+       if (oa->o_valid & OBD_MD_FLOSTLAYOUT)
+               ost_layout_cpu_to_le(&ff->ff_layout, &oa->o_layout);
+       else
+               memset(&ff->ff_layout, 0, sizeof(ff->ff_layout));
 }
 
 static inline int ofd_validate_seq(struct obd_export *exp, __u64 seq)