New: /proc/diskstats does not contain all disk devices
A message that is not in the archive (sent off-list or not yet received): [email protected]/
Quoted 18 lines · On Wed, 13 Aug 2008 12:12:44 -0700 (PDT) [email protected] wrote:
http://bugzilla.kernel.org/show_bug.cgi?id=11323
Summary:
/proc/diskstatsdoes not contain all disk devices
Product: File System
Version: 2.5
KernelVersion: 2.6.27-rcX
Platform: All
OS/Version: Linux
Tree: Mainline
Status: NEW
Severity: normal
Priority: P1
Component: Other
AssignedTo: [email protected]
ReportedBy: [email protected]
Quoted 2 lines
Latest working kernel version: 2.6.26
Earliest failing kernel version: 2.6.27-rc1
Post-2.6.26 regression.
Quoted 8 lines
Distribution: Debian
Hardware Environment: Dell
Software Environment:
Problem Description:/proc/diskstatsdoes not contain all the block devices it should./sys/blockhas all the devices, but/proc/diskstatsdoes not.Steps to reproduce: boot a system with >9 (10?) disk devices (24 block devices?)
The below would be a prime suspect.
Unfortunately a simple revert results in an uncompilable kernel.
(It drives me up the wall and across the ceiling how the patch has a commit "date" of three months prior to the 2.6.26 release, however it wasn't present in 2.6.26. What a dumb feature. How do I make it stop doing this? gitk kind of gets it right, but isn't useful across DSL)
commit 27f302519148f311307637d4c9a6d0fd87d07e4c
Author: Greg Kroah-Hartman <[email protected]> Date: Thu May 22 17:21:08 2008 -0400
block: make /proc/partitions and /proc/diskstats use class_find_device()
Use the proper class iterator function instead of mucking around in the internals of the class structures.
block/genhd.c +13 -12
@@ -317,17 +317,21 @@ static void *part_start(struct seq_filereturn NULL ; } +static int find_next (struct device *dev,void *data) +{ +if (dev->type == &disk_type) +return 1 ; +return 0 ; +} +static void *part_next (struct seq_file *part,void *v,loff_t *pos) {struct gendisk *gp = v;struct device *dev; ++*pos; -list_for_each_entry (dev, &gp->dev.node, node) { -if (&dev->node == &block_class.devices) -return NULL ; -if (dev->type == &disk_type) -return dev_to_disk (dev); - } + dev =class_find_device (&block_class, &gp->dev,NULL , find_next); +if (dev) +return dev_to_disk (dev);return NULL ; }
@@ -578,12 +582,9 @@ static void *diskstats_next(struct seq_fstruct device *dev; ++*pos; -list_for_each_entry (dev, &gp->dev.node, node) { -if (&dev->node == &block_class.devices) -return NULL ; -if (dev->type == &disk_type) -return dev_to_disk (dev); - } + dev =class_find_device (&block_class, &gp->dev,NULL , find_next); +if (dev) +return dev_to_disk (dev);return NULL ; }
Quoted 8 lines · Andrew Morton
Quoted 5 lines
Problem Description:
/proc/diskstatsdoes not contain all the block devices it should./sys/blockhas all the devices, but/proc/diskstatsdoes not.Steps to reproduce: boot a system with >9 (10?) disk devices (24 block devices?)
The below would be a prime suspect.
Quoted 7 lines
Unfortunately a simple revert results in an uncompilable kernel.
(It drives me up the wall and across the ceiling how the patch has a commit "date" of three months prior to the 2.6.26 release, however it wasn't present in 2.6.26. What a dumb feature. How do I make it stop doing this? gitk kind of gets it right, but isn't useful across DSL)
$ git show --pretty=fuller 27f302519148f311307637d4c9a6d0fd87d07e4c
commit 27f302519148f311307637d4c9a6d0fd87d07e4c
Author: Greg Kroah-Hartman <[email protected]> AuthorDate: Thu May 22 17:21:08 2008 -0400 Commit: Greg Kroah-Hartman <[email protected]> CommitDate: Mon Jul 21 21:54:49 2008 -0700
There is a commit date, and the date the patch was written. Both are preserved in git.
And even if it was committed to a branch before 2.6.26 was released, and then pulled in, that's fine, it's distributed development :)
$ git describe --contains 27f302519148f311307637d4c9a6d0fd87d07e4c v2.6.27-rc1~866^2~40
showing it first showed up on 2.6.27-rc1.
Anyway, I don't have any systems with such a large number of devices to test with. Running git-bisect should narrow the problem down, you can't just revert this patch as later-on patches relied on it, as you found out...
Also, what is the output of these files, what exactly is missing?
thanks,
greg k-h
Quoted 12 lines · On Wed, 13 Aug 2008 16:51:12 -0700 Greg KH <[email protected]> wrote:
Quoted 11 lines · Andrew Morton
Quoted 5 lines
Problem Description:
/proc/diskstatsdoes not contain all the block devices it should./sys/blockhas all the devices, but/proc/diskstatsdoes not.Steps to reproduce: boot a system with >9 (10?) disk devices (24 block devices?)
The below would be a prime suspect.
Unfortunately a simple revert results in an uncompilable kernel.
Quoted 6 lines
Quoted 4 lines
(It drives me up the wall and across the ceiling how the patch has a commit "date" of three months prior to the 2.6.26 release, however it wasn't present in 2.6.26. What a dumb feature. How do I make it stop doing this? gitk kind of gets it right, but isn't useful across DSL)
$ git show --pretty=fuller 27f302519148f311307637d4c9a6d0fd87d07e4c
<writes a script>
Quoted 11 lines
commit
27f302519148f311307637d4c9a6d0fd87d07e4cAuthor: Greg Kroah-Hartman <[email protected]> AuthorDate: Thu May 22 17:21:08 2008 -0400 Commit: Greg Kroah-Hartman <[email protected]> CommitDate: Mon Jul 21 21:54:49 2008 -0700There is a commit date, and the date the patch was written. Both are preserved in git.
And even if it was committed to a branch before 2.6.26 was released, and then pulled in, that's fine, it's distributed development :)
It's useless. I have never ever ever ever wanted to know when random person X committed a patch to some local tree. The overwhelmingly most common question is "when did that go into Linux". Sigh.
Quoted 4 lines
$ git describe --contains 27f302519148f311307637d4c9a6d0fd87d07e4c v2.6.27-rc1~866^2~40showing it first showed up on 2.6.27-rc1.
Spose that works. My usual recourse is searching the commits list, which has useful-to-humans ordering information.
Is the date at which it went into mainline recorded?
Quoted 2 lines
Anyway, I don't have any systems with such a large number of devices to test with.
I suppose that partitioning a junk disk with lots of little partitions will show it. parted wants to go stupid on me though.
Quoted 5 lines
Running git-bisect should narrow the problem down, you can't
just revert this patch as later-on patches relied on it, as you found out...Also, what is the output of these files, what exactly is missing?