Commit ef2ef1ce authored by Tejun Heo's avatar Tejun Heo Committed by Greg Kroah-Hartman
Browse files

block: include empty disks in /proc/diskstats



commit 71982a40 upstream.

/proc/diskstats used to show stats for all disks whether they're
zero-sized or not and their non-zero partitions.  Commit
074a7aca accidentally changed the
behavior such that it doesn't print out zero sized disks.  This patch
implements DISK_PITER_INCL_EMPTY_PART0 flag to partition iterator and
uses it in diskstats_show() such that empty part0 is shown in
/proc/diskstats.

Reported and bisectd by Dianel Collins.

Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Reported-by: default avatarDaniel Collins <solemnwarning@solemnwarning.no-ip.org>
Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 05c75f1c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment