Received: by 2002:a05:7412:bb8d:b0:d7:7d3a:4fe2 with SMTP id js13csp76057rdb; Mon, 14 Aug 2023 09:55:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGQxl7sex6+quYF52bOD90JJ5TcVMSJWODpebLqxzlAB+rEwzip6eQMcCwZXiFeVTr9zf/h X-Received: by 2002:a17:906:30d7:b0:99c:4ea0:ed18 with SMTP id b23-20020a17090630d700b0099c4ea0ed18mr8063357ejb.8.1692032118755; Mon, 14 Aug 2023 09:55:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692032118; cv=none; d=google.com; s=arc-20160816; b=dqnqiJapSuXbTqpETg69KtvV0JmZBaJYVmEjTKniTyos0kYsnDq1AVbZjognJGaiZn MN7ASRmDUVaaNvrFvq4i6cRYqJL7Tm1QVJPsEaNh3o7/ecCgNlJa7W6TJZewGmyeXLA8 gu1KPH+3VGVpAcIbtCvcJAwgqJ5Acz4r6PaHr8CQFJN9UMbye8YvLJt8wQO5OArUc/+8 HOtTqP8yLTUOaDQ+ocQ416KFGvSde8A47Wf3qFg8N8vyY0FEPubO1HmNTWNBgdn2OrJ5 TwL3BKUkJp49WO0EY65Pv1+ljXZlJkw588PulcaAJEve3q1F3iM3m25Q5rvcb7Ug3Io4 tYsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=e/RsRWQvIzO9Tmb7Z+807AzNfuzAEQkX5uVQGukGIR8=; fh=E733AC9xuSJ2bTdGcymwPjbmAW2nBw7SjxwPJ7XmvqI=; b=1FP75D8h3BAx0l0HDQ8k6P0ca7o97nnyE/HETQdrfdvGsgq4+SK5g9uK5mJGcSf77a K9ka7GaTsmIZlCcScId2lJHRh5FVi47NsrDgduU/R0/HTQ0EztI8kBqu7bZAL8f3Xv5j 3UUKsv3G4qXkMcssZbQlZaBdQWV9qrqg7iS6240rK98afOrnVftLoM01j23MmykAnQ/K vOq5CnsVYoPdG/r76im9MDGQ6bK44jx7rMo5JM4YulTHkxFVtGyOTVJSNqCu0TBxSeCG 2bQk/hsAYv1vPtDsiggTn5oR3FWHWl2kZ7jAB9keYmjB8/ZqJ3Ot7xEDio3R0GUwFwis KRcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JEgyhuiS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h9-20020a170906260900b00992dc9d3b33si7283520ejc.863.2023.08.14.09.54.52; Mon, 14 Aug 2023 09:55:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JEgyhuiS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231189AbjHNQ00 (ORCPT + 99 others); Mon, 14 Aug 2023 12:26:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230397AbjHNQ0L (ORCPT ); Mon, 14 Aug 2023 12:26:11 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 22A6CA8; Mon, 14 Aug 2023 09:26:08 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B443B621AB; Mon, 14 Aug 2023 16:26:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2065FC433C7; Mon, 14 Aug 2023 16:26:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1692030367; bh=5lsPZ8SK0Jh8HjHHDJJGtSSEohvEECM6ocPfbzBa/04=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=JEgyhuiSU3m4Jia4n6ZxTEVjZ9SXkbTCEU6TEdWOeBkswm2lfFlnQ1LPia6CcB2ey ZFEeHfs0RkBQeTcQbPbfApglNo9xbZUisjv97Ev4c5JkIkIOIefvwObJ8EdhUgm+KZ SSyHAtcOCp9pqgGJZPY8ZWAILkXmMKRU9lI07ckBjD937VPW5mjf5LhYcZZ7r3JzL0 pBomIyDOLhDt6I24EGUyn+Uhzwqnh6edAGrmi23WOBw3krwfWvu4+kPl9J5AZLFmNt LcnhWtbC4uLIsBtPBLdYjv1BHahFRhGF0+ESjULhvUhteqJGFA/vX3rNamYzkcqY1B YWrBfoCjNHtZQ== Received: by mail-lf1-f54.google.com with SMTP id 2adb3069b0e04-4fe21e7f3d1so7188403e87.3; Mon, 14 Aug 2023 09:26:07 -0700 (PDT) X-Gm-Message-State: AOJu0Yx7DPID2MlP6Hbh5tCyyoAkoKwYvu7BtsHP2iyiSOAF6A7WsUJg yqTSdUaVZlvlHBcnl1HolNqfJpolrVjqtFcaPeU= X-Received: by 2002:ac2:491a:0:b0:4fe:1e74:3f3e with SMTP id n26-20020ac2491a000000b004fe1e743f3emr6143823lfi.48.1692030365117; Mon, 14 Aug 2023 09:26:05 -0700 (PDT) MIME-Version: 1.0 References: <2a9592bf3340f34bf588eec984b23ee219f3985e.1692013451.git.heinzm@redhat.com> In-Reply-To: <2a9592bf3340f34bf588eec984b23ee219f3985e.1692013451.git.heinzm@redhat.com> From: Song Liu Date: Tue, 15 Aug 2023 00:25:52 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] md raid1: allow writebehind to work on any leg device set WriteMostly To: heinzm@redhat.com Cc: linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org, xni@redhat.com, ncroxon@redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 14, 2023 at 8:04=E2=80=AFPM wrote: > > From: Heinz Mauelshagen > > This is version 2 replacing my previous patch series as requested by Song= Liu. For future patches, you can move the line above to ... > > As the WriteMostly flag can be set on any component device of a RAID1 > array, remove the constraint that it only works if set on the first one. > > > Signed-off-by: Heinz Mauelshagen > Tested-by: Xiao Ni > --- ... here, below an extra "---" so that git-am will remove it automatically. Other than this, applied to md-next. Thanks, Song > --- > drivers/md/raid1.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c > index dd25832eb045..913cd46b786b 100644 > --- a/drivers/md/raid1.c > +++ b/drivers/md/raid1.c > @@ -1519,7 +1519,7 @@ static void raid1_write_request(struct mddev *mddev= , struct bio *bio, > * allocate memory, or a reader on WriteMostly > * is waiting for behind writes to flush */ > if (bitmap && > - test_bit(WriteMostly, &rdev->flags) && > + write_behind && > (atomic_read(&bitmap->behind_writes) > < mddev->bitmap_info.max_write_behind) && > !waitqueue_active(&bitmap->behind_wait)) { > -- > 2.41.0 >