Please don't reply to lustre-devel. Instead, comment in
Bugzilla by using the following link:
http
s://bugzilla.lustre.org/show_bug.cgi?id=9977
What |Removed |Added
------------------------------------------------------------
----------------
Attachment #9337|review?(vitaly clusterfs.com|review-
Flag|) |
(From update of attachment 9337)
1. ldlm_cli_cancel_unused() cancels unused on the resource
extent locks.
what is needed is cancel conflict extent locks given to
clients and
to not allow to take another lock until object is created
and its lvb
data are updated. first of all you need to take a write
lock:
res_id = { .name = { oa->o_id } };
policy = { .l_extent = {0, OBD_OBJECT_EOF } };
flags = 0;
rc = ldlm_cli_enqueue_local(obd->obd_namespace, res_id,
LDLM_EXTENT,
&policy, LCK_PW, &flags, ldlm_blocking_ast,
ldlm_completion_ast, NULL, NULL, 0, NULL,
&lockh);
re-create objects, update lvb data and only then drop the
lock:
ldlm_lock_decref(&lockh, LCK_PW);
be sure the lock is taken for ost_create only, others
already have a lock.
2. OST_LVB_ERR_INIT seems to be needed indeed because the
return
code is negative, i.e. because ((MASK + rc) & MASK) !=
MASK.
please put INIT back and add a comment why INIT is needed.
_______________________________________________
Lustre-devel mailing list
Lustre-devel clusterfs.com
https://mail.clusterfs.com/mailman/listinfo/lustre-devel
|