summaryrefslogtreecommitdiff
path: root/block/bsg.c
diff options
context:
space:
mode:
authorJeff Mahoney <jeffm@suse.com>2011-04-27 20:22:20 (GMT)
committerJames Bottomley <James.Bottomley@suse.de>2011-05-01 18:04:02 (GMT)
commite37c4913c555bd149eba3af953fb5d3a1686dfbd (patch)
treeba9fbba3ba75f4a1153825c7833f977f8c6d50c6 /block/bsg.c
parent9c324b8ba8e3ee8772a0c716d557e1582699d481 (diff)
downloadlinux-fsl-qoriq-e37c4913c555bd149eba3af953fb5d3a1686dfbd.tar.xz
[SCSI] iterate over devices individually for /proc/scsi/scsi
On systems with very large numbers (> 1600 or so) of SCSI devices, cat /proc/scsi/scsi ends up failing with -ENOMEM. This is due to the show routine simply iterating over all of the devices with bus_for_each_dev(), and trying to dump all of them into the buffer at the same time. On my test system (using scsi_debug with 4064 devices), the output ends up being ~ 632k, far more than kmalloc will typically allow. This patch defines its own seq_file opreations to iterate over the scsi devices.The result is that each show() operation only dumps ~ 180 bytes into the buffer at a time so we don't run out of memory. If the "Attached devices" header isn't required, we can dump the sfile->private bit completely. Signed-off-by: Jeff Mahoney <jeffm@suse.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'block/bsg.c')
0 files changed, 0 insertions, 0 deletions