linux-stable/drivers
Jeff Mahoney e37c4913c5 [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>
2011-05-01 13:04:02 -05:00
..
accessibility
acpi Fix common misspellings 2011-03-31 11:26:23 -03:00
amba PM / Hibernate: Introduce CONFIG_HIBERNATE_CALLBACKS 2011-04-11 22:54:42 +02:00
ata Fix common misspellings 2011-03-31 11:26:23 -03:00
atm Merge branch 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6 2011-04-07 11:14:49 -07:00
auxdisplay Fix common misspellings 2011-03-31 11:26:23 -03:00
base Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6 2011-04-12 17:18:05 -07:00
block Fix common misspellings 2011-03-31 11:26:23 -03:00
bluetooth Merge branch 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6 2011-04-07 11:14:49 -07:00
cdrom Fix common misspellings 2011-03-31 11:26:23 -03:00
char Fix common misspellings 2011-03-31 11:26:23 -03:00
clk
clocksource
connector connector: convert to synchronous netlink message processing 2011-03-30 17:14:33 -07:00
cpufreq Fix common misspellings 2011-03-31 11:26:23 -03:00
cpuidle
crypto Fix common misspellings 2011-03-31 11:26:23 -03:00
dca
dio
dma Merge branch 'spi/merge' of git://git.secretlab.ca/git/linux-2.6 2011-04-11 15:44:38 -07:00
edac Merge branch 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6 2011-04-07 11:14:49 -07:00
eisa
firewire Fix common misspellings 2011-03-31 11:26:23 -03:00
firmware
gpio Merge branch 'spi/merge' of git://git.secretlab.ca/git/linux-2.6 2011-04-11 15:44:38 -07:00
gpu Revert "i915: restore only the mode of this driver on lastclose" 2011-04-13 09:20:24 +10:00
hid Merge branch 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6 2011-04-07 11:14:49 -07:00
hwmon Merge branch 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6 2011-04-07 11:14:49 -07:00
hwspinlock
i2c Fix common misspellings 2011-03-31 11:26:23 -03:00
ide Merge branch 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6 2011-04-07 11:14:49 -07:00
idle
ieee802154
infiniband Fix common misspellings 2011-03-31 11:26:23 -03:00
input Merge branch 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6 2011-04-07 11:14:49 -07:00
isdn Fix common misspellings 2011-03-31 11:26:23 -03:00
leds leds/leds-regulator.c: fix handling of already enabled regulators 2011-04-14 16:06:54 -07:00
lguest Fix common misspellings 2011-03-31 11:26:23 -03:00
macintosh Merge branch 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6 2011-04-07 11:14:49 -07:00
mca
md Merge branch 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6 2011-04-07 11:14:49 -07:00
media Merge branch 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6 2011-04-07 11:14:49 -07:00
memstick Fix common misspellings 2011-03-31 11:26:23 -03:00
message [SCSI] mptfusion: Bump version 3.4.19 2011-05-01 11:58:22 -05:00
mfd mfd: Fetch cell pointer from platform_device->mfd_cell 2011-04-12 11:13:00 +02:00
misc drivers/misc/sgi-gru/grufile.c: fix the wrong members of gru_chip 2011-04-14 16:06:55 -07:00
mmc Fix common misspellings 2011-03-31 11:26:23 -03:00
mtd Merge git://git.infradead.org/mtd-2.6 2011-04-09 13:23:50 -07:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2011-04-11 07:27:24 -07:00
nfc
nubus
of Fix common misspellings 2011-03-31 11:26:23 -03:00
oprofile
parisc Fix common misspellings 2011-03-31 11:26:23 -03:00
parport Fix common misspellings 2011-03-31 11:26:23 -03:00
pci PM / Hibernate: Introduce CONFIG_HIBERNATE_CALLBACKS 2011-04-11 22:54:42 +02:00
pcmcia Fix common misspellings 2011-03-31 11:26:23 -03:00
platform Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86 2011-04-13 09:15:55 -07:00
pnp Fix common misspellings 2011-03-31 11:26:23 -03:00
power
pps Fix common misspellings 2011-03-31 11:26:23 -03:00
ps3 Fix common misspellings 2011-03-31 11:26:23 -03:00
rapidio RapidIO/mpc85xx: fix possible mport registration problems 2011-04-14 16:06:56 -07:00
regulator Fix common misspellings 2011-03-31 11:26:23 -03:00
rtc drivers/rtc/rtc-mc13xxx.c: fix unterminated platform_device_id table 2011-04-14 16:06:54 -07:00
s390 Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6 2011-04-08 07:36:14 -07:00
sbus Fix common misspellings 2011-03-31 11:26:23 -03:00
scsi [SCSI] iterate over devices individually for /proc/scsi/scsi 2011-05-01 13:04:02 -05:00
sfi Fix common misspellings 2011-03-31 11:26:23 -03:00
sh
sn
spi Merge branch 'spi/merge' of git://git.secretlab.ca/git/linux-2.6 2011-04-11 15:44:38 -07:00
ssb Fix common misspellings 2011-03-31 11:26:23 -03:00
staging Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86 2011-04-12 15:24:23 -07:00
target Fix common misspellings 2011-03-31 11:26:23 -03:00
tc
telephony Fix common misspellings 2011-03-31 11:26:23 -03:00
thermal
tty Merge branch 'sh-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6 2011-04-07 12:48:45 -07:00
uio Fix common misspellings 2011-03-31 11:26:23 -03:00
usb [SCSI] usb-storage: do not increment cmd->serial_number 2011-05-01 10:23:09 -05:00
uwb Fix common misspellings 2011-03-31 11:26:23 -03:00
vhost
video Merge branch 'fbdev-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-2.6 2011-04-07 12:49:17 -07:00
virtio
vlynq
w1 Fix common misspellings 2011-03-31 11:26:23 -03:00
watchdog watchdog: mpc8xxx_wdt: fix build 2011-04-07 20:20:24 +00:00
xen Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6 2011-04-12 17:18:05 -07:00
zorro
Kconfig
Makefile