Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753278AbbLVF1P (ORCPT ); Tue, 22 Dec 2015 00:27:15 -0500 Received: from TYO202.gate.nec.co.jp ([210.143.35.52]:38683 "EHLO tyo202.gate.nec.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751656AbbLVF1O convert rfc822-to-8bit (ORCPT ); Tue, 22 Dec 2015 00:27:14 -0500 From: Junichi Nomura To: Kent Overstreet , Tejun Heo CC: "Artem S. Tashkinov" , "Artem S. Tashkinov" , Christoph Hellwig , Ming Lin , Jens Axboe , Linus Torvalds , Steven Whitehouse , IDE-ML , Linux Kernel Mailing List , Ming Lei Subject: Re: IO errors after "block: remove bio_get_nr_vecs()" Thread-Topic: IO errors after "block: remove bio_get_nr_vecs()" Thread-Index: AQHRO08bKY/Em8KO4ka8VVQOeN/kR57Ua6gAgAAIRwCAAMwrAIAACM6AgAAQ/4CAAHL8AIAAGCiA Date: Tue, 22 Dec 2015 05:26:12 +0000 Message-ID: <20151222052611.GA10487@xzibit.linux.bs1.fc.nec.co.jp> References: <20151221065528.GA3873@htj.duckdns.org> <20151221193550.GM4026@mtj.duckdns.org> <20151221200721.GN4026@mtj.duckdns.org> <20151221210811.GO4026@mtj.duckdns.org> <20151222035944.GG20661@kmo-pixel> In-Reply-To: <20151222035944.GG20661@kmo-pixel> Accept-Language: ja-JP, en-US Content-Language: ja-JP X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.34.125.85] Content-Type: text/plain; charset="iso-2022-jp" Content-ID: Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1485 Lines: 49 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? -- 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/