Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2200930pxb; Tue, 12 Oct 2021 01:20:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxjyihEXyFPvx9brhbvsIYx0OF5aQ6YEgIuYObLpx/Azy3/6o/WqmCW43sHrfe7SfMPoUuh X-Received: by 2002:a17:906:2ccf:: with SMTP id r15mr30196230ejr.182.1634026804981; Tue, 12 Oct 2021 01:20:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634026804; cv=none; d=google.com; s=arc-20160816; b=JASQqfkyBpZky3jAqvbBI9AoQNtSeCLi880EvBxptSjmdKLhzdpUYUd4EL1+Kq9RqY jpTIoJ2d5EKRoFeAuAL7rVJlPAtZnlQ5TLpOSMJR+UYd2mPWn0t/aUNP4MaUyfV/7qd6 tj/EivWIAqbdPzCXVWNk0Bx0QD4i9ZMKHAsiBrc99+Jp/HQxivu02zLsJ1eunHvnoTxB GFBcUADKzFu+yoeOubZDk+5Q5DN2I6QxRr1DCv+PxvouKXV3bVZXRS7/8I2iE19AihO7 bP69jvQLwo5g7JvkYbYs7oBCuRIbp8jtpQnW3jaJMQj2U5w1UqLjptPT/RevT1qh3YHS pi6Q== 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=37HZo9dcrkwOLU1i3Qm8Ux7eDM2zIcDhx1qcFpRt1/4=; b=F2gXw+RaKzWmboXWbr7i7syuQpUNHGJprGM2Ty8DmbXMtrB0BRWO2uI/F6wxLtXN9Y miMrAtzYo3/xr0qitsodCqc+VhonpNTGTOKaqw0hn8dMlnIzJJ9N65lHDEo1WDe/MaNK M+KXsAogeUhtYGNP4Ygyg/eh5S1V+ieXdHeW4WWu1enOBbuQBSusMtiWisj8SVaDp1up gK6/3JGY+TbjU8oDO4rD+NzVEhXIkZtLrAPdEQXxYlclugDD5tFD4jGA5ftaj6Ui/Okx q+0JuAyYU/D0RN+KzFfQ4MMYHRMl8WHefxwPgYuwgIu98ViBUUieNdJXLgHVvQMbeseR f/Og== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BZdnk4kj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f14si12548177edc.609.2021.10.12.01.19.41; Tue, 12 Oct 2021 01:20:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BZdnk4kj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S234632AbhJLIT6 (ORCPT + 99 others); Tue, 12 Oct 2021 04:19:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:51184 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232541AbhJLIT6 (ORCPT ); Tue, 12 Oct 2021 04:19:58 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id EFF6660F23; Tue, 12 Oct 2021 08:17:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1634026677; bh=O6YnQ6b4Trs6QluMttA3AsFs4aF9SM6xHU/t4DKvyTg=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=BZdnk4kj10eF4uEL6UQmlX9cXLWKhntEHIog5IiiWy6oi03Rs9Vy7hiLkoMhb01cK jkTMvDk3/sOBe8RY6RI3z5BqnRY2kIdrTfg96CxHS+JzKGwP9zBPMuzUXwp9ZC1OkB NJUacUssiNN5o3CVEzhgoGRTONDLUhhKakBld00Z1/9Sxvk3LEkrzmYWRAmzJxFvjQ BAEhmY2czxDkkZurU7PoPFstdMkndfphZ41VupVyoZPTsVlD9bbkq+PsaXQgpkcFrg qs35g/FOskmvwWI+RHt9w40Vhce1DrugvKNc92XT5eM58rLbbnibObKRrCJr49hb2c AaT4ixBlT+iLw== Received: by mail-lf1-f54.google.com with SMTP id u18so84176791lfd.12; Tue, 12 Oct 2021 01:17:56 -0700 (PDT) X-Gm-Message-State: AOAM530PIop8lR92HAGFVlhFVXo2Acpwx8utvQup1hzMwdb1BWomUHpE IM/BHBtZ7lgO4XJDUYVeq3NaqQYmpZ74Xi5FZKk= X-Received: by 2002:a2e:3907:: with SMTP id g7mr28814014lja.285.1634026675077; Tue, 12 Oct 2021 01:17:55 -0700 (PDT) MIME-Version: 1.0 References: <20211008032231.1143467-1-fengli@smartx.com> In-Reply-To: From: Song Liu Date: Tue, 12 Oct 2021 01:17:43 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH RESEND] md: allow to set the fail_fast on RAID1/RAID10 To: Li Feng Cc: Xiao Ni , "open list:SOFTWARE RAID (Multiple Disks) SUPPORT" , open list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 12, 2021 at 1:07 AM Li Feng wrote: > > Xiao Ni =E4=BA=8E2021=E5=B9=B410=E6=9C=8812=E6=97=A5=E5= =91=A8=E4=BA=8C =E4=B8=8B=E5=8D=882:58=E5=86=99=E9=81=93=EF=BC=9A > > > > On Mon, Oct 11, 2021 at 5:42 PM Li Feng wrote: > > > > > > Xiao Ni =E4=BA=8E2021=E5=B9=B410=E6=9C=8811=E6=97=A5= =E5=91=A8=E4=B8=80 =E4=B8=8B=E5=8D=883:49=E5=86=99=E9=81=93=EF=BC=9A > > > > > > > > Hi all > > > > > > > > Now the per device sysfs interface file state can change failfast. = Do > > > > we need a new file for failfast? > > > > > > > > I did a test. The steps are: > > > > > > > > mdadm -CR /dev/md0 -l1 -n2 /dev/sdb /dev/sdc --assume-clean > > > > cd /sys/block/md0/md/dev-sdb > > > > echo failfast > state > > > > cat state > > > > in_sync,failfast > > > > > > This works, will it be persisted to disk? > > > > > > > mdadm --detail /dev/md0 can show the failfast information. So it > > should be written in superblock. > > But I don't find how md does this. I'm looking at this. > > > Yes, I have tested that it has been persisted, but don't understand who d= oes it. I think this is not guaranteed to be persistent: [root@eth50-1 ~]# cat /sys/block/md127/md/rd1/state in_sync,failfast [root@eth50-1 ~]# echo -failfast > /sys/block/md127/md/rd1/state [root@eth50-1 ~]# cat /sys/block/md127/md/rd1/state in_sync [root@eth50-1 ~]# mdadm --stop /dev/md* mdadm: /dev/md does not appear to be an md device mdadm: stopped /dev/md127 [root@eth50-1 ~]# mdadm -As mdadm: /dev/md/0_0 has been started with 4 drives. [root@eth50-1 ~]# cat /sys/block/md127/md/rd1/state in_sync,failfast How about we fix state_store to make sure it is always persistent? Thanks, Song