repbody->oa.o_valid |= OBD_MD_FLDATAVERSION;
repbody->oa.o_data_version = curr_version;
}
+
+ if (fo->ofo_ff.ff_layout_version > 0) {
+ repbody->oa.o_valid |= OBD_MD_LAYOUT_VERSION;
+ repbody->oa.o_layout_version =
+ fo->ofo_ff.ff_layout_version + fo->ofo_ff.ff_range;
+
+ CDEBUG(D_INODE, DFID": get layout version: %u\n",
+ PFID(&tsi->tsi_fid),
+ repbody->oa.o_layout_version);
+ }
}
ofd_object_put(tsi->tsi_env, fo);
struct ost_body *repbody;
struct ldlm_resource *res;
struct ofd_object *fo;
- struct filter_fid *ff = NULL;
int rc = 0;
ENTRY;
la_from_obdo(&fti->fti_attr, &body->oa, body->oa.o_valid);
fti->fti_attr.la_valid &= ~LA_TYPE;
- if (body->oa.o_valid & OBD_MD_FLFID) {
- ff = &fti->fti_mds_fid;
- ofd_prepare_fidea(ff, &body->oa);
- }
-
/* setting objects attributes (including owner/group) */
- rc = ofd_attr_set(tsi->tsi_env, fo, &fti->fti_attr, ff);
+ rc = ofd_attr_set(tsi->tsi_env, fo, &fti->fti_attr, &body->oa);
if (rc != 0)
GOTO(out_put, rc);
ENTRY;
+ OBD_FAIL_TIMEOUT(OBD_FAIL_OST_STATFS_DELAY, 10);
+
osfs = req_capsule_server_get(tsi->tsi_pill, &RMF_OBD_STATFS);
rc = ofd_statfs(tsi->tsi_env, tsi->tsi_exp, osfs,
struct ldlm_namespace *ns = tsi->tsi_tgt->lut_obd->obd_namespace;
struct ldlm_resource *res;
struct ofd_object *fo;
- struct filter_fid *ff = NULL;
__u64 flags = 0;
struct lustre_handle lh = { 0, };
int rc;
info->fti_attr.la_size = start;
info->fti_attr.la_valid |= LA_SIZE;
- if (oa->o_valid & OBD_MD_FLFID) {
- ff = &info->fti_mds_fid;
- ofd_prepare_fidea(ff, oa);
- }
-
rc = ofd_object_punch(tsi->tsi_env, fo, start, end, &info->fti_attr,
- ff, (struct obdo *)oa);
+ (struct obdo *)oa);
if (rc)
GOTO(out_put, rc);
LASSERT(lock->l_export == data->lpa_export);
ldlm_lock_prolong_one(lock, data);
LDLM_LOCK_PUT(lock);
- RETURN_EXIT;
+ if (data->lpa_locks_cnt > 0)
+ RETURN_EXIT;
+ /* The lock was destroyed probably lets try
+ * resource tree. */
+ } else {
+ lock->l_last_used = ktime_get();
+ LDLM_LOCK_PUT(lock);
}
- lock->l_last_used = ktime_get();
- LDLM_LOCK_PUT(lock);
}
}