-
Notifications
You must be signed in to change notification settings - Fork 251
belt sanding stream_writer #5152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: ripatel/snapshot-tiles-wip
Are you sure you want to change the base?
belt sanding stream_writer #5152
Conversation
|
||
writer->cons_cnt = 0UL; | ||
writer->cons_max = cons_max; | ||
/* writer->out_sync already set */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kinda confused where out_sync gets set... I probably missed it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh nvm I found it lol
} | ||
|
||
int err = fd_io_istream_snapshot_http_read( ctx->http, out, dst_max, &sz ); | ||
while( out_cur<out_end ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ohh smart... so we can set a frag_sz_max
for the stream writer and repeatedly fill up to frag_sz_max
with calls to fd_io_istream_snapshot_http_read
which is capped at the size of the HTTP resp buffer.
|
||
for(;;) { | ||
uchar const * prev = cur; | ||
while( out_cur<out_end ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And same here, nice!
ulong * cons_seq; /* cons_seq[ 2*cons_idx+i ] caches cons_fseq[ cons_idx ][i] */ | ||
ulong volatile ** cons_fseq; /* cons_fseq[ cons_idx ] points to consumer fseq */ | ||
/* Each consumer reports a 'frag sequence number' and the 'stream offset' */ | ||
# define FD_STREAM_WRITER_CONS_SEQ_STRIDE 2UL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm why the define in the middle of the stream writer struct?
1f61afc
to
60a9ad8
Compare
… ripatel/snapshot-restore-beltsanding
60a9ad8
to
ec0003d
Compare
No description provided.