Partially revert 24d0e21f51
This reverts the extra for loop condition from "do_iterative_fd_io_iterate(): Support sparse files". When reading a file with more than 8 block_runs, get_vecs() would return B_BUFFER_OVERFLOW which would never create any subrequest due to the test on error == B_OK on the loop, but instead just fail. Except for the get_vecs() return code, where it is not wanted, the test made no sense as all other assignments are tested directly or passed around with break. Works for me but I don't guarantee it's completely correct.
This commit is contained in:
@@ -165,9 +165,7 @@ do_iterative_fd_io_iterate(void* _cookie, io_request* request,
|
||||
|
||||
// create subrequests for the file vecs we've got
|
||||
size_t subRequestCount = 0;
|
||||
for (size_t i = 0;
|
||||
i < vecCount && subRequestCount < kMaxSubRequests && error == B_OK;
|
||||
i++) {
|
||||
for (size_t i = 0; i < vecCount && subRequestCount < kMaxSubRequests; i++) {
|
||||
off_t vecOffset = vecs[i].offset;
|
||||
off_t vecLength = min_c(vecs[i].length, (off_t)requestLength);
|
||||
TRACE_RIO("[%ld] vec %lu offset: %lld, length: %lld\n",
|
||||
|
||||
Reference in New Issue
Block a user