From: Christoph Hellwig Subject: Re: [PATCH 01/10] block: make generic_make_request handle arbitrarily sized bios Date: Tue, 5 May 2015 23:48:49 -0700 Message-ID: <20150506064849.GB5181@infradead.org> References: <1430203717-13307-1-git-send-email-mlin@kernel.org> <1430203717-13307-2-git-send-email-mlin@kernel.org> <20150428114320.GA9790@lst.de> <5549AFD4.5020803@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <5549AFD4.5020803@kernel.org> Sender: linux-kernel-owner@vger.kernel.org To: Ming Lin Cc: Christoph Hellwig , linux-kernel@vger.kernel.org, Jens Axboe , Kent Overstreet , Dongsu Park , Christoph Hellwig , Al Viro , Ming Lei , Neil Brown , Alasdair Kergon , Mike Snitzer , dm-devel@redhat.com, Lars Ellenberg , drbd-user@lists.linbit.com, Jiri Kosina , Geoff Levand , Jim Paris , Joshua Morris , Philip Kelleher , Minchan Kim , Nitin Gupta , Oleg Drokin , Andreas Dilger , Keith Busch List-Id: dm-devel.ids On Tue, May 05, 2015 at 11:08:20PM -0700, Ming Lin wrote: > How about below incremental patch? > - > - /* > - * If the queue doesn't support SG gaps and adding this > - * offset would create a gap, disallow it. > - */ > - if (q->queue_flags & (1 << QUEUE_FLAG_SG_GAPS) && > - bvec_gap_to_prev(prev, offset)) > - return 0; You need to keep the explicit checks for the BLOCK_PC case, as we can't split those. Otherwise it looks fine.