On Thu, Mar 19, 2020 at 10:53:22AM +0200, Nikolay Borisov wrote: > Is this correct though, in case of buffered reads we are always called > with bi_status != BLK_STS_OK (we are called from end_bio_extent_readpage > in case uptodate is false, which happens if failed_bio->bi_status is > non-zero. Additionally the bio is guaranteed to not be cloned because > there is : ASSERT(!bio_flagged(bio, BIO_CLONED)); > If I understand this correctly this is the "this is a DIO " branch. IMO > it'd be clearer if you had bool is_dio = bio_flagged(failed_bio, > BIO_CLONED) at the top of the function and you used that. The non-fragile way would be to pass an explicit is_bio argument. The is cloned thing is just a side effect of the weird cloning done in the bio path, which hopefully won't survive too long.
