diff options
author | Tejun Heo <tj@kernel.org> | 2009-04-17 08:34:48 +0200 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-04-22 08:35:10 +0200 |
commit | 71982a409f12c50d011325a4471aa20666bb908d (patch) | |
tree | d457415cc6c50b386a6876acf0abc4472f0e5630 /include | |
parent | a9e9dc24bbc3e084450a22cf4fb82f5f5d4cbeea (diff) | |
download | kernel_goldelico_gta04-71982a409f12c50d011325a4471aa20666bb908d.zip kernel_goldelico_gta04-71982a409f12c50d011325a4471aa20666bb908d.tar.gz kernel_goldelico_gta04-71982a409f12c50d011325a4471aa20666bb908d.tar.bz2 |
block: include empty disks in /proc/diskstats
/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>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/genhd.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 634c530..a1a28ca 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h @@ -214,6 +214,7 @@ static inline void disk_put_part(struct hd_struct *part) #define DISK_PITER_REVERSE (1 << 0) /* iterate in the reverse direction */ #define DISK_PITER_INCL_EMPTY (1 << 1) /* include 0-sized parts */ #define DISK_PITER_INCL_PART0 (1 << 2) /* include partition 0 */ +#define DISK_PITER_INCL_EMPTY_PART0 (1 << 3) /* include empty partition 0 */ struct disk_part_iter { struct gendisk *disk; |