From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752229AbcBOHCb (ORCPT ); Mon, 15 Feb 2016 02:02:31 -0500 Received: from mail-pa0-f67.google.com ([209.85.220.67]:36832 "EHLO mail-pa0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752122AbcBOHCO (ORCPT ); Mon, 15 Feb 2016 02:02:14 -0500 From: Ming Lei To: Jens Axboe , linux-kernel@vger.kernel.org Cc: linux-block@vger.kernel.org, Christoph Hellwig , Sagi Grimberg , Ming Lei Subject: [PATCH 2/4] block: check virt boundary in bio_will_gap() Date: Mon, 15 Feb 2016 15:01:25 +0800 Message-Id: <1455519687-23873-3-git-send-email-ming.lei@canonical.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1455519687-23873-1-git-send-email-ming.lei@canonical.com> References: <1455519687-23873-1-git-send-email-ming.lei@canonical.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In the following patch, the way for figuring out the last bvec will be changed with a bit cost introduced, so return immediately if the queue doesn't have virt boundary limit. Actually most of devices have not this limit. Cc: Sagi Grimberg Cc: Christoph Hellwig Signed-off-by: Ming Lei --- include/linux/blkdev.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 4571ef1..b8ff6a3 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -1388,7 +1388,7 @@ static inline bool bvec_gap_to_prev(struct request_queue *q, static inline bool bio_will_gap(struct request_queue *q, struct bio *prev, struct bio *next) { - if (!bio_has_data(prev)) + if (!bio_has_data(prev) || !queue_virt_boundary(q)) return false; return bvec_gap_to_prev(q, &prev->bi_io_vec[prev->bi_vcnt - 1], -- 1.9.1