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: 8868411 X-Patchwork-Delegate: snitzer@redhat.com Return-Path: X-Original-To: patchwork-dm-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0C81ABF29F for ; Mon, 18 Apr 2016 07:26:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 470EB2017D for ; Mon, 18 Apr 2016 07:26:08 +0000 (UTC) Received: from mx6-phx2.redhat.com (mx6-phx2.redhat.com [209.132.183.39]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 34C0B20259 for ; Mon, 18 Apr 2016 07:26:07 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx6-phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u3I7MOxf006099; Mon, 18 Apr 2016 03:22:24 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u3EC3fMs026781 for ; Thu, 14 Apr 2016 08:03:41 -0400 Received: from mx1.redhat.com (ext-mx03.extmail.prod.ext.phx2.redhat.com [10.5.110.27]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u3EC3ebs006070 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 14 Apr 2016 08:03:41 -0400 Received: from mail-ob0-f195.google.com (mail-ob0-f195.google.com [209.85.214.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4167380F6A; Thu, 14 Apr 2016 12:03:40 +0000 (UTC) Received: by mail-ob0-f195.google.com with SMTP id tz8so4852745obc.1; 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=bOKd1pG8gPdOCZWeEFzY3HCgVzuj2fEy07blnCBmBObLxXCbFKVhLaiSzjX9hiqY7i lNGfUbOPmqFqShXyEy3hz+Pw+yUPRZPPypUYhkfXycKSEcOM9/EORIYOgBA79FIEsQre 0K4d90Z+D1haeu3uCvOnorHeCtDzJy4ZNs/vHKVAYzxItM0KUG423DJmjyh7cZwbvLrS tXox32n+NtWXIAx8QQR0H0gD2HHZmxRU05xF09SpPQVvtwVWeh9h9NKbNJ1fuGDcOHgu 9SkZZn4OeIIeMf4XI8wTW2EQuskRul3H1+bgqSkvzzwB1RoG9x9DBTM07xNanZJP3lH9 wpLQ== X-Gm-Message-State: AOPr4FV5heyAd8CLDL/kqNnoA8eHtSm5Il1WIBBFl9iI5IMOqByjb/AdKoXi7u4zmpFfOw== 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 Date: Thu, 14 Apr 2016 20:02:37 +0800 Message-Id: <1460635375-28282-20-git-send-email-tom.leiming@gmail.com> In-Reply-To: <1460635375-28282-1-git-send-email-tom.leiming@gmail.com> References: <1460635375-28282-1-git-send-email-tom.leiming@gmail.com> X-RedHat-Spam-Score: -0.02 (BAYES_50, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS) 209.85.214.195 mail-ob0-f195.google.com 209.85.214.195 mail-ob0-f195.google.com X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-Scanned-By: MIMEDefang 2.76 on 10.5.110.27 X-loop: dm-devel@redhat.com X-Mailman-Approved-At: Mon, 18 Apr 2016 03:22:14 -0400 Cc: Christoph Hellwig , Mike Snitzer , Ming Lei , linux-block@vger.kernel.org, "maintainer:DEVICE-MAPPER LVM, Shaohua Li , linux-raid@vger.kernel.org open list:SOFTWARE RAID Multiple DisksSUPPORT" , Alasdair Kergon Subject: [dm-devel] [PATCH v1 19/27] dm: dm.c: replace 'bio->bi_vcnt == 1' with !bio_multiple_segments X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable 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);