]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
md: Fix missing unused status line of /proc/mdstat
authorJan Glauber <jglauber@digitalocean.com>
Wed, 17 Mar 2021 14:04:39 +0000 (15:04 +0100)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 26 May 2021 13:39:05 +0000 (15:39 +0200)
commitb292be9dd036176fad061854b2b364a8881b84b1
tree525bf3ab6df404cf137626273564dd87ea2ec307
parent9848f8ecc7e6b384b9f6f565b2206a98cf1441d8
md: Fix missing unused status line of /proc/mdstat

BugLink: https://bugs.launchpad.net/bugs/1929615
commit 7abfabaf5f805f5171d133ce6af9b65ab766e76a upstream.

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: <none>

Don't return NULL immediately in start() for v=2 but call
show() once to print the status line also for multiple reads.

Cc: stable@vger.kernel.org
Fixes: 1f4aace60b0e ("fs/seq_file.c: simplify seq_file iteration code and interface")
Signed-off-by: Jan Glauber <jglauber@digitalocean.com>
Signed-off-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/md/md.c