From patchwork Thu Apr 14 12:02:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 8834901 Return-Path: X-Original-To: patchwork-linux-block@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 941769F3A0 for ; Thu, 14 Apr 2016 12:04:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CBB0220131 for ; Thu, 14 Apr 2016 12:04:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 384682020F for ; Thu, 14 Apr 2016 12:03:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755023AbcDNMDm (ORCPT ); Thu, 14 Apr 2016 08:03:42 -0400 Received: from mail-ob0-f195.google.com ([209.85.214.195]:36759 "EHLO mail-ob0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755009AbcDNMDk (ORCPT ); Thu, 14 Apr 2016 08:03:40 -0400 Received: by mail-ob0-f195.google.com with SMTP id rf6so4871819obc.3; Thu, 14 Apr 2016 05:03:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=q5dIZlHf5x3RrordGGmQBpr5UAU8kaCQjcf7f4VvZco=; b=IFAtvFF6LuLys4nuXrdtoE31yJIlw2gzPFM/OPvZSae3A/nqCUJF623lzwNAFyc0mC Lv074wnrMQ8CR4bMNYXDgP+4VUmXgXmd1Ry40Dam4PblVcpXnAotBn2kQbeItipZenEq ZbsZERb/527Hv0lnQfbvPkmVPie/+BVvyLetNmgL61Rv2jp2HThyZEaIofH12njVyrsT FliID8F2NyL5Y3PvQE86RO6g8jCs+YkBWYEH0AWumuiGgKicnT8SoEbYdNG7dE0iQecQ vdirHk13Ma1rNsaQ/ZhDQlHA7Hpk7VCA4hTW1TiG9atuKmNNTZ+x8zNy07IF+jRLaV3M 9prQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=q5dIZlHf5x3RrordGGmQBpr5UAU8kaCQjcf7f4VvZco=; b=eMXL2x9xhIKXejXKT5ecIBE3LuUsTunS4yvIAUdH9EeIlEnJA5UQs+omUjU13Uii1e Ph5XJBzijEojuQVP67qgDJ9TR0mYZbYCS15Fxlutp2DbdQyp4Al7ZkpE328yOITdvtx5 7A65BM/4V/DEWKPMOBcRfBTRP5jxDfZx3V8KnogQ4QOjTpk0PRD9GJDFj2qT6mscVqPQ CB4WN2lzrr2iihnzmv9shnjQmyom82As82UtgtqZHLPRE9qSBRUqCoVzx0NqWyltKr4p v/l4REFSQnJsj40oco0M56TJTU9Dn10Ujfo+OwFcMtt7VRJbHBnrgUWl1vTsv2bEJNlL Lmbg== X-Gm-Message-State: AOPr4FXrJQ2Kka1yByWVv7yzdtleC74lvT2G9voW0C3saQBFo41Djcswmek2QhPpj7fXEw== X-Received: by 10.60.98.169 with SMTP id ej9mr7283076oeb.21.1460635419659; Thu, 14 Apr 2016 05:03:39 -0700 (PDT) Received: from localhost ([12.228.154.70]) by smtp.gmail.com with ESMTPSA id k110sm13029128otc.26.2016.04.14.05.03.39 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Thu, 14 Apr 2016 05:03:39 -0700 (PDT) From: Ming Lei To: Jens Axboe , linux-kernel@vger.kernel.org Cc: linux-block@vger.kernel.org, Christoph Hellwig , Ming Lei , Alasdair Kergon , Mike Snitzer , dm-devel@redhat.com (maintainer:DEVICE-MAPPER (LVM)), Shaohua Li , linux-raid@vger.kernel.org (open list:SOFTWARE RAID (Multiple Disks) SUPPORT) Subject: [PATCH v1 19/27] dm: dm.c: replace 'bio->bi_vcnt == 1' with !bio_multiple_segments Date: Thu, 14 Apr 2016 20:02:37 +0800 Message-Id: <1460635375-28282-20-git-send-email-tom.leiming@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1460635375-28282-1-git-send-email-tom.leiming@gmail.com> References: <1460635375-28282-1-git-send-email-tom.leiming@gmail.com> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Ming Lei --- drivers/md/dm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/md/dm.c b/drivers/md/dm.c index be49057..4c34f88 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -2172,7 +2172,8 @@ static void dm_request_fn(struct request_queue *q) pos = blk_rq_pos(rq); if ((dm_request_peeked_before_merge_deadline(md) && - md_in_flight(md) && rq->bio && rq->bio->bi_vcnt == 1 && + md_in_flight(md) && rq->bio && + !bio_multiple_segments(rq->bio) && md->last_rq_pos == pos && md->last_rq_rw == rq_data_dir(rq)) || (ti->type->busy && ti->type->busy(ti))) { blk_delay_queue(q, HZ / 100);