Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1296550

Re: IO errors after "block: remove bio_get_nr_vecs()"

From Kent Overstreet <kent.overstreet@gmail.com>
Newsgroups linux.kernel
Subject Re: IO errors after "block: remove bio_get_nr_vecs()"
Date 2015-12-22 06:40 +0100
Message-ID <qInPY-8dk-11@gated-at.bofh.it> (permalink)
References (3 earlier) <qIetk-2e0-11@gated-at.bofh.it> <qIeWm-2Dm-21@gated-at.bofh.it> <qIfSp-3eT-9@gated-at.bofh.it> <qImqR-7qS-7@gated-at.bofh.it> <qInGh-8ai-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Dec 22, 2015 at 05:26:12AM +0000, Junichi Nomura wrote:
> On 12/22/15 12:59, Kent Overstreet wrote:
> > reproduced it with 32 bit pae:
> > 
> >> 1. Exclude memory above 4G line with boot param "max_addr=4G".
> > 
> > doesn't work - max_addr=1G doesn't work either
> > 
> >> 2. Disable highmem with "highmem=0".
> > 
> > works!
> > 
> >> 3. Try booting 64bit kernel.
> > 
> > works
> 
> blk_queue_bio() does split then bounce, which makes the segment
> counting based on pages before bouncing and could go wrong.
> 
> What do you think of a patch like this?

Shit, you nailed it. Can't believe I didn't think to check that.

> 
> -- 
> Jun'ichi Nomura, NEC Corporation
> 
> diff --git a/block/blk-core.c b/block/blk-core.c
> index 5131993b..1d1c3c7 100644
> --- a/block/blk-core.c
> +++ b/block/blk-core.c
> @@ -1689,8 +1689,6 @@ static blk_qc_t blk_queue_bio(struct request_queue *q, struct bio *bio)
>  	struct request *req;
>  	unsigned int request_count = 0;
>  
> -	blk_queue_split(q, &bio, q->bio_split);
> -
>  	/*
>  	 * low level driver can indicate that it wants pages above a
>  	 * certain limit bounced to low memory (ie for highmem, or even
> @@ -1698,6 +1696,8 @@ static blk_qc_t blk_queue_bio(struct request_queue *q, struct bio *bio)
>  	 */
>  	blk_queue_bounce(q, &bio);
>  
> +	blk_queue_split(q, &bio, q->bio_split);
> +
>  	if (bio_integrity_enabled(bio) && bio_integrity_prep(bio)) {
>  		bio->bi_error = -EIO;
>  		bio_endio(bio);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

IO errors after "block: remove bio_get_nr_vecs()" Linus Torvalds <torvalds@linux-foundation.org> - 2015-12-20 19:00 +0100
  Re: IO errors after "block: remove bio_get_nr_vecs()" Christoph Hellwig <hch@lst.de> - 2015-12-20 19:20 +0100
    Re: IO errors after "block: remove bio_get_nr_vecs()" Kent Overstreet <kent.overstreet@gmail.com> - 2015-12-20 19:50 +0100
      Re: IO errors after "block: remove bio_get_nr_vecs()" "Artem S. Tashkinov" <t.artem@lycos.com> - 2015-12-21 00:50 +0100
    Re: IO errors after "block: remove bio_get_nr_vecs()" Linus Torvalds <torvalds@linux-foundation.org> - 2015-12-20 19:50 +0100
      Re: IO errors after "block: remove bio_get_nr_vecs()" "Artem S. Tashkinov" <t.artem@lycos.com> - 2015-12-21 00:40 +0100
      Re: IO errors after "block: remove bio_get_nr_vecs()" Dan Aloni <dan@kernelim.com> - 2015-12-21 12:30 +0100
    Re: IO errors after "block: remove bio_get_nr_vecs()" "Artem S. Tashkinov" <t.artem@lycos.com> - 2015-12-21 00:40 +0100
      Re: IO errors after "block: remove bio_get_nr_vecs()" Kent Overstreet <kent.overstreet@gmail.com> - 2015-12-21 00:50 +0100
        Re: IO errors after "block: remove bio_get_nr_vecs()" "Artem S. Tashkinov" <t.artem@lycos.com> - 2015-12-21 01:00 +0100
  Re: IO errors after "block: remove bio_get_nr_vecs()" "Artem S. Tashkinov" <t.artem@lycos.com> - 2015-12-21 00:40 +0100
  Re: IO errors after "block: remove bio_get_nr_vecs()" Ming Lei <tom.leiming@gmail.com> - 2015-12-21 02:40 +0100
    Re: IO errors after "block: remove bio_get_nr_vecs()" "Artem S. Tashkinov" <t.artem@lycos.com> - 2015-12-21 03:00 +0100
      Re: IO errors after "block: remove bio_get_nr_vecs()" Ming Lei <tom.leiming@gmail.com> - 2015-12-21 03:20 +0100
        Re: IO errors after "block: remove bio_get_nr_vecs()" "Artem S. Tashkinov" <t.artem@lycos.com> - 2015-12-21 03:30 +0100
      Re: IO errors after "block: remove bio_get_nr_vecs()" Kent Overstreet <kent.overstreet@gmail.com> - 2015-12-21 03:40 +0100
        Re: IO errors after "block: remove bio_get_nr_vecs()" Ming Lei <tom.leiming@gmail.com> - 2015-12-21 04:30 +0100
          Re: IO errors after "block: remove bio_get_nr_vecs()" "Artem S. Tashkinov" <t.artem@lycos.com> - 2015-12-21 04:40 +0100
      Re: IO errors after "block: remove bio_get_nr_vecs()" Linus Torvalds <torvalds@linux-foundation.org> - 2015-12-21 05:40 +0100
        Re: IO errors after "block: remove bio_get_nr_vecs()" "Artem S. Tashkinov" <t.artem@lycos.com> - 2015-12-21 05:50 +0100
          Re: IO errors after "block: remove bio_get_nr_vecs()" Linus Torvalds <torvalds@linux-foundation.org> - 2015-12-21 05:50 +0100
            Re: IO errors after "block: remove bio_get_nr_vecs()" Linus Torvalds <torvalds@linux-foundation.org> - 2015-12-21 06:30 +0100
              Re: IO errors after "block: remove bio_get_nr_vecs()" "Artem S. Tashkinov" <t.artem@lycos.com> - 2015-12-21 08:40 +0100
              Re: IO errors after "block: remove bio_get_nr_vecs()" "Artem S. Tashkinov" <t.artem@lycos.com> - 2015-12-22 05:10 +0100
  Re: IO errors after "block: remove bio_get_nr_vecs()" Tejun Heo <tj@kernel.org> - 2015-12-21 05:30 +0100
    Re: IO errors after "block: remove bio_get_nr_vecs()" Linus Torvalds <torvalds@linux-foundation.org> - 2015-12-21 06:20 +0100
  Re: IO errors after "block: remove bio_get_nr_vecs()" Tejun Heo <tj@kernel.org> - 2015-12-21 08:00 +0100
    Re: IO errors after "block: remove bio_get_nr_vecs()" Tejun Heo <tj@kernel.org> - 2015-12-21 20:40 +0100
      Re: IO errors after "block: remove bio_get_nr_vecs()" Tejun Heo <tj@kernel.org> - 2015-12-21 21:10 +0100
        Re: IO errors after "block: remove bio_get_nr_vecs()" Tejun Heo <tj@kernel.org> - 2015-12-21 22:10 +0100
          Re: IO errors after "block: remove bio_get_nr_vecs()" Kent Overstreet <kent.overstreet@gmail.com> - 2015-12-22 04:50 +0100
          Re: IO errors after "block: remove bio_get_nr_vecs()" Kent Overstreet <kent.overstreet@gmail.com> - 2015-12-22 05:10 +0100
            Re: IO errors after "block: remove bio_get_nr_vecs()" Junichi Nomura <j-nomura@ce.jp.nec.com> - 2015-12-22 06:30 +0100
              Re: IO errors after "block: remove bio_get_nr_vecs()" Kent Overstreet <kent.overstreet@gmail.com> - 2015-12-22 06:40 +0100
                Re: IO errors after "block: remove bio_get_nr_vecs()" "Artem S. Tashkinov" <t.artem@lycos.com> - 2015-12-22 07:00 +0100
                Re: IO errors after "block: remove bio_get_nr_vecs()" Kent Overstreet <kent.overstreet@gmail.com> - 2015-12-22 07:00 +0100
                Re: IO errors after "block: remove bio_get_nr_vecs()" "Artem S. Tashkinov" <t.artem@lycos.com> - 2015-12-22 07:00 +0100
                Re: IO errors after "block: remove bio_get_nr_vecs()" Kent Overstreet <kent.overstreet@gmail.com> - 2015-12-22 07:10 +0100
              Re: IO errors after "block: remove bio_get_nr_vecs()" Kent Overstreet <kent.overstreet@gmail.com> - 2015-12-22 06:40 +0100
              Re: IO errors after "block: remove bio_get_nr_vecs()" Jens Axboe <axboe@fb.com> - 2015-12-22 18:30 +0100
          Re: IO errors after "block: remove bio_get_nr_vecs()" Kent Overstreet <kent.overstreet@gmail.com> - 2015-12-22 05:50 +0100
        Re: IO errors after "block: remove bio_get_nr_vecs()" "Artem S. Tashkinov" <t.artem@lycos.com> - 2015-12-22 06:20 +0100
        Re: IO errors after "block: remove bio_get_nr_vecs()" "Artem S. Tashkinov" <t.artem@lycos.com> - 2015-12-22 06:30 +0100
      Re: IO errors after "block: remove bio_get_nr_vecs()" Ming Lei <tom.leiming@gmail.com> - 2015-12-22 00:00 +0100

csiph-web