Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3621598pxf; Mon, 22 Mar 2021 10:41:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz7TlbwcLYINDGKWTMUECD2BnW6fdQO6687KaD88Lc+Q7cpGlm7FzsUX4pIiT2hn/NkllbG X-Received: by 2002:a05:6402:3047:: with SMTP id bu7mr733984edb.227.1616434891284; Mon, 22 Mar 2021 10:41:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616434891; cv=none; d=google.com; s=arc-20160816; b=vJheczxoUcOsbMb7EMSNY3sxTBbg3skUXTMjMjPJQ4v9Q3/G0zFtHkftWNZVTDn77F oyrAbWef98rNtlLgQKkg5Man6Z7WVCmZVZ2eRx8P7xmRikpm5BtJy2pA3Wm8V7DL1jSo n21vvd2KTC41BkN3GrHacO+GGP6Rg6tQ8voagTFn/2/L/dzz8zBZTVKO9u/e7R+j+FFf cbNJUWyVU5d/XURo6eySSPCgVqly2tuRy9V2AffgOvqKDpAx9h/I1Cofr14umxzSt2kf o/9GjnrbiOViSk281QrL+eIogH346FWhNsWpvSwNOawsX0R5Dp4pXj0m2gS8izkeeyu3 QMPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=UHcNT/4il5tW9mXoc6ARPr050wPN1fj+Adjar4kkzQ8=; b=uECWMsIOo3E+GLDtc5EpXO/K3iO77csD/K3MlvQL8cWH6kREKv6/p/2WHIKlfvj67q hZC4yPurr5EZgQLNbQpHVgi/Atczwx0++fmRf2lW8pSqExDh7c0hQzHopXGZrlX2Fh+c 1RYDlv1+0CB3GD1imD8QPcBlS3edr7okspRqV2u3YjXr9TUt9Oo0g41qiayHtApIEbQS eOnALCIZ6snxpjVm0YXPJ0pfWcGNzewyhYMoOxbxW0ORYYDgj/9cgicTnGsBJyVlzRFt /2Xkc6Pi6ljXlWZAbJ7LyO3B7wTdTuI+6XZLvrSNNEtP1LowW5jElfAwP30S/P1lzoQj TgQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eWfsJUJE; 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 b1si12790483ejb.714.2021.03.22.10.41.08; Mon, 22 Mar 2021 10:41:31 -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=eWfsJUJE; 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 S231574AbhCVRkG (ORCPT + 99 others); Mon, 22 Mar 2021 13:40:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:48850 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232158AbhCVRjm (ORCPT ); Mon, 22 Mar 2021 13:39:42 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D518B6196E; Mon, 22 Mar 2021 17:39:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1616434782; bh=UHcNT/4il5tW9mXoc6ARPr050wPN1fj+Adjar4kkzQ8=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=eWfsJUJEs/trJlTX/faIgFkAz6YcDAWG330R2dk4YtY9La66+aH9KHuPsP7wRxW6u oYWGEnRfBbCRwR8ceew7F7OWv8Ev473MWWgCXY76dBEQslXpM8c0P/r3G+Beux8R8j lUcIbIo5RqAfj634EBAF39+WX0jL92LN2Gd+jmx4pX9qEA/YsHtOkwxwcjV2iyawpC XtrA21jFeJgT8/z1SW4aJljKOZdCumzLVOn4rzMMSwQxztrYeuYpNEhhABwi//cmiR J0ZKtbODXsEuTZ8VR4706BkwEkd+jYHs/8FoTOx0upF0cK63NR6dWJRASXpbtnMK/3 RYGFSSnwwVg1Q== Received: by mail-lf1-f43.google.com with SMTP id b83so22573327lfd.11; Mon, 22 Mar 2021 10:39:41 -0700 (PDT) X-Gm-Message-State: AOAM532Cml84bqRA5c7IugNaub8JAqP+SjW23I3ZksNIFtSN/kseFKC0 FqHrTLRPLxgKjJa3H9+BkH0fWksOGmHrSt6nFbg= X-Received: by 2002:ac2:5dcf:: with SMTP id x15mr260735lfq.176.1616434780144; Mon, 22 Mar 2021 10:39:40 -0700 (PDT) MIME-Version: 1.0 References: <20210317140439.9499-1-jglauber@digitalocean.com> In-Reply-To: <20210317140439.9499-1-jglauber@digitalocean.com> From: Song Liu Date: Mon, 22 Mar 2021 10:39:29 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] md: Fix missing unused status line of /proc/mdstat To: Jan Glauber Cc: linux-raid , open list Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 17, 2021 at 7:05 AM Jan Glauber wrote: > > Reading /proc/mdstat with a read buffer size that would not > fit the unused status line in the first read will skip this > line from the output. > > So 'dd if=/proc/mdstat bs=64 2>/dev/null' will not print something > like: unused devices: > > Don't return NULL immediately in start() for v=2 but call > show() once to print the status line also for multiple reads. > > Fixes: 1f4aace60b0e ("fs/seq_file.c: simplify seq_file iteration code and interface") > Signed-off-by: Jan Glauber Applied to md-next. Thanks! Song