Fix 24d0e21f51 correctly
CreateSubRequest() could still return an error and break out of the while loop without exiting the outer for loop. Instead we reset the error code before entering the for loop.
This commit is contained in:
@@ -163,9 +163,14 @@ do_iterative_fd_io_iterate(void* _cookie, io_request* request,
|
||||
}
|
||||
TRACE_RIO("[%ld] got %zu file vecs\n", find_thread(NULL), vecCount);
|
||||
|
||||
// Reset the error code for the loop below
|
||||
error = B_OK;
|
||||
|
||||
// create subrequests for the file vecs we've got
|
||||
size_t subRequestCount = 0;
|
||||
for (size_t i = 0; i < vecCount && subRequestCount < kMaxSubRequests; i++) {
|
||||
for (size_t i = 0;
|
||||
i < vecCount && subRequestCount < kMaxSubRequests && error == B_OK;
|
||||
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