mirror of
https://github.com/schoebel/mars
synced 2025-02-04 14:21:50 +00:00
copy: use kb as limiter units
This commit is contained in:
parent
dae1218c50
commit
61e5d30757
@ -395,8 +395,10 @@ restart:
|
||||
if (!mref0) { // idempotence: wait by unchanged state
|
||||
goto idle;
|
||||
}
|
||||
if (brick->copy_limiter)
|
||||
mars_limit_sleep(brick->copy_limiter, mref0->ref_len);
|
||||
if (brick->copy_limiter) {
|
||||
int amount = (mref0->ref_len - 1) / 1024 + 1;
|
||||
mars_limit_sleep(brick->copy_limiter, amount);
|
||||
}
|
||||
// on append mode: increase the end pointer dynamically
|
||||
if (brick->append_mode > 0 && mref0->ref_total_size && mref0->ref_total_size > brick->copy_end) {
|
||||
brick->copy_end = mref0->ref_total_size;
|
||||
|
Loading…
Reference in New Issue
Block a user