Re: [PATCH 7/9] Guard bvec iteration logic v3

From: Christoph Hellwig
Date: Thu Apr 06 2017 - 07:47:06 EST


> if (bio_no_advance_iter(bio))
> iter->bi_size -= bytes;
> - else
> - bvec_iter_advance(bio->bi_io_vec, iter, bytes);
> + else {
> + int err;
> + err = bvec_iter_advance(bio->bi_io_vec, iter, bytes);
> + if (unlikely(err))
> + bio->bi_error = err;
> + }

I don't think that setting bi_error here is a good idea without actually
completing the bio, which would be a much bigger change.

Maybe leave the error ignored here for now with a fixme comment, and
then we can look into proper error handling in a separate series.