mirror of https://github.com/schoebel/mars
copy: stop upon short read
This commit is contained in:
parent
48c53bbe47
commit
79b55514fc
|
@ -771,6 +771,9 @@ int _run_copy(struct copy_brick *brick, loff_t this_start)
|
||||||
count += st->len;
|
count += st->len;
|
||||||
// check contiguity
|
// check contiguity
|
||||||
if (unlikely(GET_OFFSET(pos) + st->len != COPY_CHUNK)) {
|
if (unlikely(GET_OFFSET(pos) + st->len != COPY_CHUNK)) {
|
||||||
|
/* Short read detected: shorten the copy_end.
|
||||||
|
*/
|
||||||
|
brick->copy_end = pos + st->len;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue