question about ReplicatedPG::do_op
Hi, everyone.
I'm trying to read the source code of ceph's read/write operation processing. In ReplicatedPG::do_op, I found that when the call to "get_rw_locks(write_ordered, ctx)" fail, as showed in the following, the method ReplicatedPG::do_op will return. However, when ReplicatedPG::do_op is called, the op is dequeued from the osd_op_wq, wouldn't the op be lost if do_op return without requeueing the op? If it is lost, wouldn't this lead to an error? Thanks.
else if (!get_rw_locks(write_ordered, ctx)) {
dout(20)
<< __func__ << " waiting for rw locks " << dendl;
op->mark_delayed("waiting for rw locks");
close_op_ctx(ctx, -EBUSY);
return;
}the RWState structure was used to reserve the waited ops
2016-12-05 17:07 GMT+08:00 xxhdx1985126 <[email protected]>:
Quoted 11 lines
Hi, everyone.
I'm trying to read the source code of ceph's read/write operation processing. In
ReplicatedPG::do_op, I found that when the call to "get_rw_locks(write_ordered, ctx)" fail, as showed in the following, the methodReplicatedPG::do_opwill return. However, whenReplicatedPG::do_opis called, the op is dequeued from theosd_op_wq, wouldn't the op be lost ifdo_opreturn without requeueing the op? If it is lost, wouldn't this lead to an error? Thanks.else if (!get_rw_locks(write_ordered, ctx)) { dout(20) << __func__ << " waiting for rw locks " << dendl; op->mark_delayed("waiting for rw locks"); close_op_ctx(ctx, -EBUSY); return; }
Signature · 2 lines
Thank you! HuangJun