From patchwork Sat Oct 29 08:08:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 9403379 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 10B9060587 for ; Sat, 29 Oct 2016 08:27:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F1BE92A1D0 for ; Sat, 29 Oct 2016 08:27:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E65122A1DD; Sat, 29 Oct 2016 08:27:41 +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 A02152A1D0 for ; Sat, 29 Oct 2016 08:27:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757006AbcJ2IOL (ORCPT ); Sat, 29 Oct 2016 04:14:11 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:34571 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S942253AbcJ2INq (ORCPT ); Sat, 29 Oct 2016 04:13:46 -0400 Received: by mail-pf0-f194.google.com with SMTP id u84so3378222pfj.1; Sat, 29 Oct 2016 01:13:45 -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=CTqMxFRCHduovdgzuBP2qxk23CX1GfKigUH2tfawGSA=; b=RaLuRl7miSQjNQKHOa8L4gjgAKtUWqmaivJlkje78Qi5V3ivnscX3P9VEVONux+NyT CbD33YbgmeYRNDY1U347jBcIBfBsFWhwxI005IYU7P8cdzisfXSGPGkCLukJ/nBYA3ua 7Wu0C2Gq3vtj//ahr+MBnGcgl/IOZWFrWEHUP+hKRFxhqZoieJk/pAYlrXEbC87GdTSD ld7UvQcAcsjf2tIf7tAlFA9CYW4nDwk3MLkmro0/vcS6fBXXjFPwCPq9sfKEz0k8fO7q qEMxEcKLWLRhFi7/28WCTBmk9S1p2bVH2P7ex9VLC/hqTRMYL4a+GJPeULjCLpMFWtwF dZGQ== 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=CTqMxFRCHduovdgzuBP2qxk23CX1GfKigUH2tfawGSA=; b=PAd58CM742i2JPI1KljOtaNcaJB+6co6bSImz9fbpOmvoYpMKDIZVeuNytBguS5OKp OtgxLw3bFSwHk8fc+mrOZvd0ndgrkFlJd8fB6nP5MCM19v1FA6++jSCjJc+85WWXzAC7 9jT7m1sA/rG+co+Uq+2Cn6221cNUERApeOTKDJvLHiJGzWaMn04FicukJaCJyEkhFe72 IvNbvj4bm4bMivqyREAc1aYZogUQWZ8cF7lFrd+d0s7e6hLcKoi0knLcVJg8qj7PLKyR QFgkB4Mh/hP9KuZQbpKDb8ALvmIq+AbUQKxHwPWKoOHnCduLUB8SObAYeowRJ5MjT944 9vSQ== X-Gm-Message-State: ABUngvfZ/KnxKpyyp2Kk1JdbKyujZdVgBgEqBNaeKN4yjkWeMKSHYi7PD+nsNtEzyagXeg== X-Received: by 10.98.71.215 with SMTP id p84mr31740418pfi.59.1477728825097; Sat, 29 Oct 2016 01:13:45 -0700 (PDT) Received: from localhost ([45.34.23.101]) by smtp.gmail.com with ESMTPSA id c2sm23563573pal.42.2016.10.29.01.13.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 29 Oct 2016 01:13:44 -0700 (PDT) From: Ming Lei To: Jens Axboe , linux-kernel@vger.kernel.org Cc: linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, Christoph Hellwig , "Kirill A . Shutemov" , Ming Lei , Shaohua Li , linux-raid@vger.kernel.org (open list:SOFTWARE RAID (Multiple Disks) SUPPORT) Subject: [PATCH 24/60] md: set NO_MP for request queue of md Date: Sat, 29 Oct 2016 16:08:23 +0800 Message-Id: <1477728600-12938-25-git-send-email-tom.leiming@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1477728600-12938-1-git-send-email-tom.leiming@gmail.com> References: <1477728600-12938-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 eac84d8ff724..f8d98098dff8 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -5128,6 +5128,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; @@ -5353,6 +5363,8 @@ int md_run(struct mddev *mddev) if (mddev->flags & MD_UPDATE_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);