Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S943077AbcJ2IOe (ORCPT ); Sat, 29 Oct 2016 04:14:34 -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 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-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1010 Lines: 40 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); -- 2.7.4