05 Aug, 2008
1 commit
-
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
[SCSI] scsi_transport_spi: fix oops in revalidate
[SCSI] ses: fix VPD inquiry overrun
[SCSI] block: Fix miscalculation of sg_io timeout in CDROM_SEND_PACKET handler.
[SCSI] hptiop: add more PCI device IDs
02 Aug, 2008
1 commit
-
blk_plug_device() must be called with the queue lock held, so callers
often just grab and release the lock for that purpose. Add a helper
that does just that.Signed-off-by: Jens Axboe
30 Jul, 2008
1 commit
-
It seems cdrwtool in the udftools has been unusable on "modern" kernels
for some time. A Google search reveals many people with the same issue
but no solution (cdrwtool fails to format the disk). After spending some
time tracking down the issue, it comes down to the following:The udftools still use the older CDROM_SEND_PACKET interface to send
things like FORMAT_UNIT through to the drive. They should really be
updated, but that's another story. Since most distros are using libata
now, the cd or dvd burner appears as a SCSI device, and we wind up in
block/scsi_ioctl.c. Here, the code tries to take the "struct
cdrom_generic_command" and translate it and stuff it into a "struct
sg_io_hdr" structure so it can pass it to the modern sg_io() routine
instead. Unfortunately, there is one error, or rather an omission in the
translation. The timeout that is passed in in the "struct
cdrom_generic_command" is in HZ=100 units, and this is modified and
correctly converted to jiffies by use of clock_t_to_jiffies(). However,
a little further down, this cgc.timeout value in jiffies is simply
copied into the sg_io_hdr timeout, which should be in milliseconds.
Since most modern x86 kernels seems to be getting build with HZ=250, the
timeout that is passed to sg_io and eventually converted to the
timeout_per_command member of the scsi_cmnd structure is now four times
too small. Since cdrwtool tries to set the timeout to one hour for the
FORMAT_UNIT command, and it takes about 20 minutes to format a 4x CDRW,
the SCSI error-handler kicks in after the FORMAT_UNIT completes because
it took longer than the incorrectly-calculated timeout.[jejb: fix up whitespace]
Signed-off-by: Tim Wright
Cc: Stable Tree
Signed-off-by: James Bottomley
27 Jul, 2008
2 commits
-
Use WARN() instead of a printk+WARN_ON() pair; this way the message
becomes part of the warning section for better reporting/collection.Signed-off-by: Arjan van de Ven
Cc: Jens Axboe
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Signed-off-by: FUJITA Tomonori
Cc: Bartlomiej Zolnierkiewicz
Cc: Thomas Bogendoerfer
Cc: Tejun Heo
Cc: Jens Axboe
Cc: James Bottomley
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
26 Jul, 2008
1 commit
-
Now that add_partition() has been aught to propagate errors, let's check them.
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Abdel Benamrouche
Cc: Jens Axboe
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
22 Jul, 2008
9 commits
-
Use the proper class iterator function instead of mucking around in the
internals of the class structures.Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
The seq_start call is the better place for the header for the file, that
way we don't have to be mucking in the class structure to try to figure
out if this is the first partition or not.Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
Use the proper class iterator function instead of mucking around in the
internals of the class structures.Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
These functions are only needed if CONFIG_PROC_FS is enabled, so save
the space when it is not.This also makes it easier for a patch later in this series to work
properly if CONFIG_PROC_FS is not enabled.Signed-off-by: Randy Dunlap
Signed-off-by: Greg Kroah-Hartman -
Use the proper class iterator function instead of mucking around in the
internals of the class structures.Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
Use the proper class iterator function instead of mucking around in the
internals of the class structures.Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
Warn if something really bad happens if we can't create this link.
Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
device_create() is race-prone, so use the race-free
device_create_drvdata() instead as device_create() is going away.Signed-off-by: Greg Kroah-Hartman
-
Why?:
There are occasions where userspace would like to access sysfs
attributes for a device but it may not know how sysfs has named the
device or the path. For example what is the sysfs path for
/dev/disk/by-id/ata-ST3160827AS_5MT004CK? With this change a call to
stat(2) returns the major:minor then userspace can see that
/sys/dev/block/8:32 links to /sys/block/sdc.What are the alternatives?:
1/ Add an ioctl to return the path: Doable, but sysfs is meant to reduce
the need to proliferate ioctl interfaces into the kernel, so this
seems counter productive.2/ Use udev to create these symlinks: Also doable, but it adds a
udev dependency to utilities that might be running in a limited
environment like an initramfs.3/ Do a full-tree search of sysfs.
[kay.sievers@vrfy.org: fix duplicate registrations]
[kay.sievers@vrfy.org: cleanup suggestions]Cc: Neil Brown
Cc: Tejun Heo
Acked-by: Kay Sievers
Reviewed-by: SL Baur
Acked-by: Kay Sievers
Acked-by: Mark Lord
Acked-by: H. Peter Anvin
Signed-off-by: Dan Williams
Signed-off-by: Greg Kroah-Hartman
16 Jul, 2008
5 commits
-
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (102 commits)
[SCSI] scsi_dh: fix kconfig related build errors
[SCSI] sym53c8xx: Fix bogus sym_que_entry re-implementation of container_of
[SCSI] scsi_cmnd.h: remove double inclusion of linux/blkdev.h
[SCSI] make struct scsi_{host,target}_type static
[SCSI] fix locking in host use of blk_plug_device()
[SCSI] zfcp: Cleanup external header file
[SCSI] zfcp: Cleanup code in zfcp_erp.c
[SCSI] zfcp: zfcp_fsf cleanup.
[SCSI] zfcp: consolidate sysfs things into one file.
[SCSI] zfcp: Cleanup of code in zfcp_aux.c
[SCSI] zfcp: Cleanup of code in zfcp_scsi.c
[SCSI] zfcp: Move status accessors from zfcp to SCSI include file.
[SCSI] zfcp: Small QDIO cleanups
[SCSI] zfcp: Adapter reopen for large number of unsolicited status
[SCSI] zfcp: Fix error checking for ELS ADISC requests
[SCSI] zfcp: wait until adapter is finished with ERP during auto-port
[SCSI] ibmvfc: IBM Power Virtual Fibre Channel Adapter Client Driver
[SCSI] sg: Add target reset support
[SCSI] lib: Add support for the T10 (SCSI) Data Integrity Field CRC
[SCSI] sd: Move scsi_disk() accessor function to sd.h
... -
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (80 commits)
ide-floppy: fix unfortunate function naming
ide-tape: unify idetape_create_read/write_cmd
ide: add ide_pc_intr() helper
ide-{floppy,scsi}: read Status Register before stopping DMA engine
ide-scsi: add more debugging to idescsi_pc_intr()
ide-scsi: use pc->callback
ide-floppy: add more debugging to idefloppy_pc_intr()
ide-tape: always log debug info in idetape_pc_intr() if debugging is enabled
ide-tape: add ide_tape_io_buffers() helper
ide-tape: factor out DSC handling from idetape_pc_intr()
ide-{floppy,tape}: move checking of ->failed_pc to ->callback
ide: add ide_issue_pc() helper
ide: add PC_FLAG_DRQ_INTERRUPT pc flag
ide-scsi: move idescsi_map_sg() call out from idescsi_issue_pc()
ide: add ide_transfer_pc() helper
ide-scsi: set drive->scsi flag for devices handled by the driver
ide-{cd,floppy,tape}: remove checking for drive->scsi
ide: add PC_FLAG_ZIP_DRIVE pc flag
ide-tape: factor out waiting for good ireason from idetape_transfer_pc()
ide-tape: set PC_FLAG_DMA_IN_PROGRESS flag in idetape_transfer_pc()
... -
All the users of blk_end_sync_rq has gone (they are converted to use
blk_execute_rq). This unexports blk_end_sync_rq.Signed-off-by: FUJITA Tomonori
Cc: Borislav Petkov
Signed-off-by: Jens Axboe
Signed-off-by: Bartlomiej Zolnierkiewicz -
Some uses blk_put_request asymmetrically, that is, they uses it with
requests that not allocated by blk_get_request. As a result,
blk_put_request has a hack to catch a NULL request_queue. Now such
callers are fixed (they use blk_get_request properly). So we can
safely remove the hack in blk_put_request.Signed-off-by: FUJITA Tomonori
Cc: Borislav Petkov
Signed-off-by: Jens Axboe
Signed-off-by: Bartlomiej Zolnierkiewicz -
For blk_pm_resume_request() requests (which are used only by IDE subsystem
currently) the queue is stopped so we need to call ->request_fn explicitly.Thanks to:
- Rafael for reporting/bisecting the bug
- Borislav/Rafael for testing the fixThis is a preparation for converting IDE to use blk_execute_rq().
Cc: FUJITA Tomonori
Cc: Borislav Petkov
Cc: Jens Axboe
Cc: "Rafael J. Wysocki"
Signed-off-by: Bartlomiej Zolnierkiewicz
15 Jul, 2008
4 commits
-
* 'core/softirq' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
softirq: remove irqs_disabled warning from local_bh_enable
softirq: remove initialization of static per-cpu variable
Remove argument from open_softirq which is always NULL -
* 'bkl-removal' of git://git.lwn.net/linux-2.6: (146 commits)
IB/umad: BKL is not needed for ib_umad_open()
IB/uverbs: BKL is not needed for ib_uverbs_open()
bf561-coreb: BKL unneeded for open()
Call fasync() functions without the BKL
snd/PCM: fasync BKL pushdown
ipmi: fasync BKL pushdown
ecryptfs: fasync BKL pushdown
Bluetooth VHCI: fasync BKL pushdown
tty_io: fasync BKL pushdown
tun: fasync BKL pushdown
i2o: fasync BKL pushdown
mpt: fasync BKL pushdown
Remove BKL from remote_llseek v2
Make FAT users happier by not deadlocking
x86-mce: BKL pushdown
vmwatchdog: BKL pushdown
vmcp: BKL pushdown
via-pmu: BKL pushdown
uml-random: BKL pushdown
uml-mmapper: BKL pushdown
... -
* 'for-linus' of git://git.kernel.dk/linux-2.6-block: (37 commits)
splice: fix generic_file_splice_read() race with page invalidation
ramfs: enable splice write
drivers/block/pktcdvd.c: avoid useless memset
cdrom: revert commit 22a9189 (cdrom: use kmalloced buffers instead of buffers on stack)
scsi: sr avoids useless buffer allocation
block: blk_rq_map_kern uses the bounce buffers for stack buffers
block: add blk_queue_update_dma_pad
DAC960: push down BKL
pktcdvd: push BKL down into driver
paride: push ioctl down into driver
block: use get_unaligned_* helpers
block: extend queue_flag bitops
block: request_module(): use format string
Add bvec_merge_data to handle stacked devices and ->merge_bvec()
block: integrity flags can't use bit ops on unsigned short
cmdfilter: extend default read filter
sg: fix odd style (extra parenthesis) introduced by cmd filter patch
block: add bounce support to blk_rq_map_user_iov
cfq-iosched: get rid of enable_idle being unused warning
allow userspace to modify scsi command filter on per device basis
...
12 Jul, 2008
2 commits
-
If you do a modremove of any sas driver, you run into an oops on
shutdown when the host is removed (coming from the host bsg device).
The root cause seems to be that there's a use after free of the
bsg_class_device: In bsg_kref_release_function, this is used (to do a
put_device(bcg->parent) after bcg->release has been called. In sas (and
possibly many other things) bcd->release frees the queue which contains
the bsg_class_device, so we get a put_device on unreferenced memory.
Fix this by taking a copy of the pointer to the parent before releasing
bsg.Acked-by: FUJITA Tomonori
Signed-off-by: James Bottomley -
We don't need to hold bsg_mutex during bsg_complete_all_commands(). It
leads to a problem that we block bsg_unregister_queue during
bsg_complete_all_commands (untill all the outstanding commands
complete).Thanks to Pete Wyckoff for finding the bug and testing the patch.
The detailed bug report is:
http://marc.info/?l=linux-scsi&m=121182137132145&w=2
Tested-by: Pete Wyckoff
Signed-off-by: FUJITA Tomonori
Signed-off-by: James Bottomley
04 Jul, 2008
2 commits
-
blk_rq_map_kern is used for kernel internal I/Os. Some callers use
this function with stack buffers but DMA to/from the stack buffers
leads to memory corruption on a non-coherent platform.This patch make blk_rq_map_kern uses the bounce buffers if a caller
passes a stack buffer (on the all platforms for simplicity).Signed-off-by: FUJITA Tomonori
Cc: Bartlomiej Zolnierkiewicz
Cc: Thomas Bogendoerfer
Cc: Tejun Heo
Cc: James Bottomley
Signed-off-by: Andrew Morton
Signed-off-by: Jens Axboe -
This adds blk_queue_update_dma_pad to prevent LLDs from overwriting
the dma pad mask wrongly (we added blk_queue_update_dma_alignment due
to the same reason).This also converts libata to use blk_queue_update_dma_pad instead of
blk_queue_dma_pad.Signed-off-by: FUJITA Tomonori
Cc: Tejun Heo
Cc: Bartlomiej Zolnierkiewicz
Cc: Thomas Bogendoerfer
Cc: James Bottomley
Signed-off-by: Andrew Morton
Signed-off-by: Jens Axboe
03 Jul, 2008
12 commits
-
Add test_and_clear and test_and_set.
Signed-off-by: Jens Axboe
-
Avoid bad things happening if the module has a printk control string in
its name.Signed-off-by: maximilian attems
Signed-off-by: Jens Axboe -
Just use normal open coded bit operations instead, they need not be
atomic.Signed-off-by: Jens Axboe
-
This patch adds the commands that the former sg filter allowed for read
access to the cmdfilter to keep userspace apps that rely on them working.Signed-off-by: Adel Gadllah
Signed-off-by: Jens Axboe -
blk_rq_map_user_iov can't handle the bounce buffer (it means that the
bio_map_user_iov path doesn't work with a LLD that needs GFP_DMA).This patch fixes blk_rq_map_user_iov to support the bounce buffer.
Signed-off-by: FUJITA Tomonori
Cc: Mike Christie
Signed-off-by: Jens Axboe -
Signed-off-by: Jens Axboe
-
This patch exports the per-gendisk command filter to user space through
sysfs, so it can be changed by the system administrator.
All users of the old cmd filter have been converted to use the new one.Original patch from Peter Jones.
Signed-off-by: Adel Gadllah
Signed-off-by: Peter Jones
Signed-off-by: Jens Axboe -
> 80 char lines and that sort of thing.
Signed-off-by: Jens Axboe
-
Some block devices support verifying the integrity of requests by way
of checksums or other protection information that is submitted along
with the I/O.This patch implements support for generating and verifying integrity
metadata, as well as correctly merging, splitting and cloning bios and
requests that have this extra information attached.See Documentation/block/data-integrity.txt for more information.
Signed-off-by: Martin K. Petersen
Signed-off-by: Jens Axboe -
Signed-off-by: Kay Sievers
Signed-off-by: Jens Axboe -
This allows a user to annotate the blk trace stream: writing a suitable
message to {/sys/kernel/debug}/block//msg will have it propagated
into the trace stream.Signed-off-by: Alan D. Brunelle
Signed-off-by: Jens Axboe -
Now that blktrace has the ability to carry arbitrary messages in
its stream, use that for some CFQ logging.Signed-off-by: Jens Axboe