Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp530257rdd; Tue, 9 Jan 2024 11:15:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IGHhPxic9aOj3b1irZX1C0lA30b2M2zTASyQvn48Vpj624WlIyaM6WqDCQkOnqexs4wRFHH X-Received: by 2002:a50:ed03:0:b0:557:5313:4f7e with SMTP id j3-20020a50ed03000000b0055753134f7emr3044262eds.63.1704827725038; Tue, 09 Jan 2024 11:15:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704827725; cv=none; d=google.com; s=arc-20160816; b=0eh/QbTUtKgqsFXFTMsHZW/JXA2wZCLKgl6v1cIRee3y9l3E02Dh+3CG6M5SiHYmmx FfaE5V3U6od5IsxCUKs5GXKdbwdxH4b9YUDulRIAKIO+8qkJIS1+2SKBykXslkDZCYYK HdIn2aBE7DY4/fynXrYozIzgPDE4kVbqdpsom6sNc9XPRCrngTgQmhqlY7hd6kRIUClt TMkt2AiWuASjM3u5Vr3pTzCHi7APYWW3BqLPse3Zy+c8uZgG1iEUSGdxh8uqW70iu+UR NWoWAzhB6vhUCAUt7Dhpzb5RLHGM2FfXbP6/XMiw6rMSm3/yD2gmNsvVnrm1V10UFHgv ZK5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=4SsRSpC3zQNVfX90HN/qxKpECK6w2g1CzyOyBjGoX8w=; fh=21b3PmLu1PNv3tDaWOKoqjG180Kpof/kg3VrmUdddqQ=; b=Lq4oIp51xlG68hiws0WdkexgRJlNpasZMk5FApgPp5AcGzBX1P0Nk+Hoh8s/U0mjoS QYFteAx66teQ4V1g7gaMWJJLdCq1zUlKCVgS2AaMIMs/cCN8l7233TW5NfTdE+853kh5 +z6j2fLbo9Cs63FlTIHHU0vqek59OpME/g3Sl+EIVVhImwKv5dMksGdmnh5OgzCOVviP YA0z1EK/2DO+U03m9uXOtoHVgjT1drboDdL/QQNHs/WgbsLNglTkxiZ9LjuKZuJGETHE I8yYIJmABVT3f58cNJQtMM1AVtgvGcaMuLtzDpoRSJrcwRtOlM3ONbQnlXwnGqF3imFs Hx+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jCOehkuf; spf=pass (google.com: domain of linux-kernel+bounces-21295-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-21295-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id f1-20020a50d541000000b005533fa17a45si959624edj.526.2024.01.09.11.15.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 11:15:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-21295-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jCOehkuf; spf=pass (google.com: domain of linux-kernel+bounces-21295-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-21295-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id B9B7F1F26985 for ; Tue, 9 Jan 2024 19:15:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 21DB93D0CD; Tue, 9 Jan 2024 19:15:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="jCOehkuf" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 523C33C07B; Tue, 9 Jan 2024 19:15:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C720AC43394; Tue, 9 Jan 2024 19:15:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1704827712; bh=Q8C1+ejFECnjGdpfPU+CdyrV1UwUh3RMKZG5x0HTquo=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=jCOehkufsUMqP14SDeEYEAGs9cU7h8NsJzU+DbuHNTFVkLkswlyw5FwHb+WBhoGmk TzsZTHmy3JIR1brF7ClTRPbMG3dIFvSwHHE+p8W33thlciRbGzXjq9dFOGaxngFwyg RnlSjHkErBSl5TZND7pW5CPG34DgY3T4tuxFTw3FOXODj23wenRL3FWeYACaJ2VYc3 Z4D72jKZAqqqHegnViZspAKlIUgnk3u9JBIzH/GKHUWJ5xkiHfIRJxb5weejql6Gdt Uz4oLhuvZeyNZ289N7LBqtgaoL9S3ttfnNC5+VxLRJwetUCqtMzDM20jKqLPbOBARh GxkCksU6ygSBw== Received: by mail-lf1-f53.google.com with SMTP id 2adb3069b0e04-50e80d40a41so4050283e87.1; Tue, 09 Jan 2024 11:15:12 -0800 (PST) X-Gm-Message-State: AOJu0YzeGIQ/SPDSKVHIst5GgZ1MfYkDv/fWdHZ8a4Xx5BQ7Ns6Q9WDM M75MukC3cDq4FvrsXuWtxjin7j2vgsk7s0O2Akg= X-Received: by 2002:a05:6512:787:b0:50e:9fa0:c1ec with SMTP id x7-20020a056512078700b0050e9fa0c1ecmr2463663lfr.109.1704827710960; Tue, 09 Jan 2024 11:15:10 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240109133957.2975272-1-yukuai1@huaweicloud.com> In-Reply-To: <20240109133957.2975272-1-yukuai1@huaweicloud.com> From: Song Liu Date: Tue, 9 Jan 2024 11:14:59 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] md: fix md_seq_ops() regressions To: Yu Kuai Cc: linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org, yukuai3@huawei.com, yi.zhang@huawei.com, yangerkun@huawei.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Jan 9, 2024 at 5:43=E2=80=AFAM Yu Kuai wr= ote: > > From: Yu Kuai > > Commit cf1b6d4441ff ("md: simplify md_seq_ops") introduce following > regressions: > > 1) If list all_mddevs is emptly, personalities and unused devices won't > be showed to user anymore. > 2) If seq_file buffer overflowed from md_seq_show(), then md_seq_start() > will be called again, hence personalities will be showed to user > again. > 3) If seq_file buffer overflowed from md_seq_stop(), seq_read_iter() > doesn't handle this, hence unused devices won't be showed to user. > > Fix above problems by print personalities and unused devices in > md_seq_show(), as it used to be. > > Fixes: cf1b6d4441ff ("md: simplify md_seq_ops") > > Signed-off-by: Yu Kuai Applied to md-6.8 branch. (Yes, I am trying to make some changes to the branches we use. ) Thanks, Song