From patchwork Tue Dec 27 15:56:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 9489451 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E170362AAD for ; Tue, 27 Dec 2016 16:04:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D3F76201BC for ; Tue, 27 Dec 2016 16:04:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C8D8E223B2; Tue, 27 Dec 2016 16:04:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 73BA1201BC for ; Tue, 27 Dec 2016 16:04:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755324AbcL0QAg (ORCPT ); Tue, 27 Dec 2016 11:00:36 -0500 Received: from mail-pf0-f196.google.com ([209.85.192.196]:32970 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752546AbcL0P7v (ORCPT ); Tue, 27 Dec 2016 10:59:51 -0500 Received: by mail-pf0-f196.google.com with SMTP id 127so8374727pfg.0; Tue, 27 Dec 2016 07:59:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=aV9ZHMZfbPi7Dewms7v5L/RbcqTLJxZdvtTwk6lWjJs=; b=OlEwFnWChWU1raCqh4D+oNkOSXZz4CSRjSDNt9/6SJ4s1/FwI/2Odvnd+McqYlVBQF 4o9uFu0KUNTBhzkH3FMxx9dsRWTdeXooh23AB0MbLBuDJMSLy/vhcQmL/fAaY6W+VEb7 fqhx1GsHFY/A0lPvA8nV6RB6IJgdXPvUJCnxOLcC43uwjAsaqaYjClu2blhrFzy8cJ+2 n0nDuUogFUDoPTrK61WE3+whXVFIBAJ9/8jrX9X8LDPc3Qgn99k5nH5nvqm3KHgg6ZML AifNuIl0uRp0CUz+p8hLJ6a33IMbQe0r7r9dcp0Q1W38X5H3cKtvQKe1Z3yWQyCZB2mG vrPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=aV9ZHMZfbPi7Dewms7v5L/RbcqTLJxZdvtTwk6lWjJs=; b=FPp1nVeIaOD5TAaWT7pRzb1lX3+OYAmjUGKESZDb/2lF3eDXd/YfDu+Hildnwn4l4X mobeRIEx30cuYz3Mf0Fv8oRhMDY+08QUDXXTWtJZKmQ78k2xS0U+FyG80XHLBve82r5i kGtv+kcxmgSk1xpZ62RCFw4rcvQCvx55W38Bm+M4940DIMfpM86/ms2AWz+BBI5dOZOl WQHP8kPJZv402C3YMIntvCVJYXpWklZopGNYIWI9KxtqT95ok01Hp0qIOLQij8Pc1DRt HON+X6/mIVOW10ReepXlF0gsfvvZHzZljsTZ3GHSH4s2Qdkzoox8F8qo2R0njw1wxJwz aH6g== X-Gm-Message-State: AIkVDXKWa95ajkLjXd5HiX5oTq5TjbBNqZplxTjo6+zqkh0yMnPvQWOj8L88LGbfVDPUPg== X-Received: by 10.98.32.12 with SMTP id g12mr20479472pfg.0.1482854378718; Tue, 27 Dec 2016 07:59:38 -0800 (PST) Received: from localhost ([45.35.47.137]) by smtp.gmail.com with ESMTPSA id f23sm90648226pff.59.2016.12.27.07.59.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Dec 2016 07:59:37 -0800 (PST) From: Ming Lei To: Jens Axboe , linux-kernel@vger.kernel.org Cc: linux-block@vger.kernel.org, Christoph Hellwig , Ming Lei , Shaohua Li , linux-raid@vger.kernel.org (open list:SOFTWARE RAID (Multiple Disks) SUPPORT) Subject: [PATCH v1 11/54] md: set NO_MP for request queue of md Date: Tue, 27 Dec 2016 23:56:00 +0800 Message-Id: <1482854250-13481-12-git-send-email-tom.leiming@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1482854250-13481-1-git-send-email-tom.leiming@gmail.com> References: <1482854250-13481-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-Virus-Scanned: ClamAV using ClamSMTP MD isn't ready for multipage bvecs, so mark it as NO_MP. Signed-off-by: Ming Lei --- drivers/md/md.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/md/md.c b/drivers/md/md.c index 82821ee0d57f..63c6326bafde 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -5162,6 +5162,16 @@ static void md_safemode_timeout(unsigned long data) static int start_dirty_degraded; +/* + * MD isn't ready for multipage bvecs yet, and set the flag + * so that MD still can see singlepage bvecs bio + */ +static inline void md_set_no_mp(struct mddev *mddev) +{ + if (mddev->queue) + set_bit(QUEUE_FLAG_NO_MP, &mddev->queue->queue_flags); +} + int md_run(struct mddev *mddev) { int err; @@ -5381,6 +5391,8 @@ int md_run(struct mddev *mddev) if (mddev->sb_flags) md_update_sb(mddev, 0); + md_set_no_mp(mddev); + md_new_event(mddev); sysfs_notify_dirent_safe(mddev->sysfs_state); sysfs_notify_dirent_safe(mddev->sysfs_action);