block: include empty disks in /proc/diskstats
commit28cb1f4a210dd7ef5e58b1b39aa95d59116f69cd
authorTejun Heo <tj@kernel.org>
Fri, 17 Apr 2009 06:34:48 +0000 (17 08:34 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 8 May 2009 22:45:00 +0000 (8 15:45 -0700)
treec945da1038506b3e94369985b856359e213add68
parentdfc731fb384e760651b97a34b7d443ac213aaa82
block: include empty disks in /proc/diskstats

commit 71982a409f12c50d011325a4471aa20666bb908d upstream.

/proc/diskstats used to show stats for all disks whether they're
zero-sized or not and their non-zero partitions.  Commit
074a7aca7afa6f230104e8e65eba3420263714a5 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: Tejun Heo <tj@kernel.org>
Reported-by: Daniel Collins <solemnwarning@solemnwarning.no-ip.org>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
block/genhd.c
include/linux/genhd.h