* in case of late striping creation, ->ah_init()
* can be called with local object existing
*/
- if (!dt_object_exists(nextc))
+ if (!dt_object_exists(nextc) || dt_object_remote(nextc))
nextc->do_ops->do_ah_init(env, ah, nextp, nextc, child_mode);
if (S_ISDIR(child_mode)) {
LASSERT(dof);
LASSERT(attr);
LASSERT(th);
- LASSERT(!dt_object_exists(next));
/*
* first of all, we declare creation of local object
.do_object_sync = lod_object_sync,
};
+static int lod_object_lock(const struct lu_env *env,
+ struct dt_object *dt, struct lustre_handle *lh,
+ struct ldlm_enqueue_info *einfo,
+ void *policy)
+{
+ struct dt_object *next = dt_object_child(dt);
+ int rc;
+ ENTRY;
+
+ /*
+ * declare setattr on the local object
+ */
+ rc = dt_object_lock(env, next, lh, einfo, policy);
+
+ RETURN(rc);
+}
+
+struct dt_lock_operations lod_lock_ops = {
+ .do_object_lock = lod_object_lock,
+};
static ssize_t lod_read(const struct lu_env *env, struct dt_object *dt,
struct lu_buf *buf, loff_t *pos,
struct lustre_capa *capa)