X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Flod%2Flod_object.c;h=fd36da571a77153b170162ffbd5413444a290cbf;hp=f082c9198244526fd924a06524f88fed79f0930b;hb=e5a6d30afa60105a924f236a953b9c3c51510539;hpb=e39a2a90f9f3a4c12bbfdb00bad59841909ef2a5 diff --git a/lustre/lod/lod_object.c b/lustre/lod/lod_object.c index f082c91..fd36da5 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) @@ -689,7 +687,7 @@ static void lod_ah_init(const struct lu_env *env, * 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)) { @@ -876,7 +874,6 @@ static int lod_declare_object_create(const struct lu_env *env, LASSERT(dof); LASSERT(attr); LASSERT(th); - LASSERT(!dt_object_exists(next)); /* * first of all, we declare creation of local object @@ -1131,6 +1128,26 @@ struct dt_object_operations lod_obj_ops = { .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)