Commit 90862a70 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Add a BOS_PREP_STREAM state to notify stevedores before streaming

starts.
parent cbe3974f
......@@ -365,6 +365,7 @@ struct storeobj {
enum boc_state_e {
BOS_INVALID = 0, /* don't touch (yet) */
BOS_REQ_DONE, /* beresp.* can be examined */
BOS_PREP_STREAM, /* Prepare for streaming */
BOS_STREAM, /* beresp.* can be examined */
BOS_FINISHED, /* object is complete */
BOS_FAILED, /* something went wrong */
......
......@@ -672,6 +672,7 @@ vbf_stp_fetch(struct worker *wrk, struct busyobj *bo)
assert(bo->fetch_objcore->boc->state == BOS_REQ_DONE);
if (bo->do_stream) {
ObjSetState(wrk, bo->fetch_objcore, BOS_PREP_STREAM);
HSH_Unbusy(wrk, bo->fetch_objcore);
ObjSetState(wrk, bo->fetch_objcore, BOS_STREAM);
}
......@@ -762,6 +763,7 @@ vbf_stp_condfetch(struct worker *wrk, struct busyobj *bo)
AZ(ObjCopyAttr(bo->wrk, bo->fetch_objcore, bo->stale_oc, OA_GZIPBITS));
if (bo->do_stream) {
ObjSetState(wrk, bo->fetch_objcore, BOS_PREP_STREAM);
HSH_Unbusy(wrk, bo->fetch_objcore);
ObjSetState(wrk, bo->fetch_objcore, BOS_STREAM);
}
......
......@@ -54,7 +54,7 @@
* 2 ObjSetU32()
* 2 ObjSetU64()
*
* 2->3 ObjStable() Will no longer be modified
* 2->3 ObjStable() Will no longer be modified (clean up boc)
*
* 23 ObjHasAttr()
* 23 ObjGetAttr()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment