[haiku-commits] Re: haiku: hrev46508 - src/system/kernel/fs

  • From: François Revol <revol@xxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 08 Dec 2013 11:16:41 +0100

On 08/12/2013 05:19, Ingo Weinhold wrote:
> On 12/08/2013 01:46 AM, revol@xxxxxxx wrote:
>> 664e3fb: Partially revert 24d0e21f51e88ab35cc3f1c1750741dfeb40933d
>>
>>    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.
> 
> The correct fix would be to reset error to B_OK, if get_vecs() returned
> B_BUFFER_OVERFLOW.
> 
>>    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.
> 
> That is not correct. In the inner loop request->CreateSubRequest() can
> fail and it wouldn't necessarily break out of the outer loop.

Hmm right, never code at 3am...

François.


Other related posts: