From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755739AbaLWKQV (ORCPT ); Tue, 23 Dec 2014 05:16:21 -0500 Received: from bombadil.infradead.org ([198.137.202.9]:41888 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755693AbaLWKQS (ORCPT ); Tue, 23 Dec 2014 05:16:18 -0500 Date: Tue, 23 Dec 2014 02:16:14 -0800 From: Christoph Hellwig To: Dongsu Park Cc: linux-kernel@vger.kernel.org, Jens Axboe , Kent Overstreet , Ming Lin , Christoph Hellwig , Al Viro , Ming Lei , Neil Brown , Alasdair Kergon , Mike Snitzer , dm-devel@redhat.com, drbd-dev@lists.linbit.com, Jiri Kosina , Geoff Levand , Jim Paris , Joshua Morris , Philip Kelleher , Minchan Kim , Nitin Gupta , Oleg Drokin , Andreas Dilger Subject: Re: [RFC PATCH 01/17] block: make generic_make_request handle arbitrarily sized bios Message-ID: <20141223101614.GA13138@infradead.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > +void blk_queue_split(struct request_queue *q, struct bio **bio, > + struct bio_set *bs) > +{ > + struct bio *split; > + > + if ((*bio)->bi_rw & REQ_DISCARD) > + split = blk_bio_discard_split(q, *bio, bs); > + else if ((*bio)->bi_rw & REQ_WRITE_SAME) > + split = blk_bio_write_same_split(q, *bio, bs); > + else > + split = blk_bio_segment_split(q, *bio, q->bio_split); > + > + if (split) { > + bio_chain(split, *bio); > + generic_make_request(*bio); > + *bio = split; > + } > +} > +EXPORT_SYMBOL(blk_queue_split); I think blk_queue_split needs to explicitly skip BLOCK_PC bios. Those are SCSI pass through ioctls that we can't split due to their opaque nature.