30 Jan, 2007
1 commit
-
Commit 85e04e371b5a321b5df2bc3f8e0099a64fb087d7 cleaned up the timeout
conversion, but did it exactly the wrong way. We get msecs from user
space, and should convert them into jiffies. Not the other way around.Here is a fix with the overflow check sg.c has added in. This fixes DVD
burnign with Nero.Signed-off-by: Mike Christie
[ "you'll be wanting a comma there" - Andrew ]
Cc: Andrew Morton
Signed-off-by: Linus Torvalds
24 Jan, 2007
1 commit
-
A flag was recently added to the elevator code to avoid
performing an unplug when reuests are being re-queued.
The goal of this flag was to avoid a deep recursion that
can occur when re-queueing requests after a SCSI device/host
reset. See http://lkml.org/lkml/2006/5/17/254However, that fix added the flag near the bottom of a case
statement, where an earlier break (in an if statement) could
transport one out of the case, without setting the flag.
This patch sets the flag earlier in the case statement.I re-discovered the deep recursion recently during testing;
I was told that it was a known problem, and the fix to it was
in the kernel I was testing. Indeed it was ... but it didn't
fix the bug. With the patch below, I no longer see the bug.Signed-off by: Linas Vepstas
Signed-off-by: Jens Axboe
Cc: Chris Wright
Signed-off-by: Linus Torvalds
03 Jan, 2007
1 commit
-
Two issues:
- The final return 1 should be a return 0, otherwise comparing cfqq is
a noop.- bio_sync() only checks the sync flag, while rq_is_sync() checks both
for READ and sync. The latter is what we want. Expand the bio check
to include reads, and relax the restriction to allow merging of async
io into sync requests.In the future we want to clean up the SYNC logic, right now it means
both sync request (such as READ and O_DIRECT WRITE) and unplug-on-issue.
Leave that for later.Signed-off-by: Jens Axboe
Signed-off-by: Linus Torvalds
23 Dec, 2006
2 commits
-
The logic in cfq_allow_merge() wasn't clear enough - basically allow
merging for the same queues only. Do a fast check for 'rq and bio both
sync/async' before doing the cfqq hash lookup.This is verified to work with the fixed elv_try_merge() from commit
bb4067e34159648d394943d5e2a011f838bff22f.Signed-off-by: Jens Axboe
Signed-off-by: Linus Torvalds -
Fix kernel-doc warnings in 2.6.20-rc1.
Signed-off-by: Randy Dunlap
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
22 Dec, 2006
1 commit
-
The recent io scheduler allow_merge commit left the block layer with
no merging, oops. This patch fixes that up.That means the CFQ change needs to be verified again, it might not fix
the original bug now. But that's a seperate thing, I'll double check
that tomorrow.Signed-off-by: Jens Axboe
Signed-off-by: Linus Torvalds
20 Dec, 2006
1 commit
-
Currently we allow any merge, even if the io originates from different
processes. This can cause really bad starvation and unfairness, if those
ios happen to be synchronous (reads or direct writes).So add a allow_merge hook to the io scheduler ops, so an io scheduler can
help decide whether a bio/process combination may be merged with an
existing request.Signed-off-by: Jens Axboe
19 Dec, 2006
5 commits
-
The blk_rq_unmap_user() API is not very nice. It expects the caller to
know that rq->bio has to be reset to the original bio, and it will
silently do nothing if that is not done. Instead make it explicit that
we need to pass in the first bio, by expecting a bio argument.Signed-off-by: Jens Axboe
-
If the bio is user copied, the copy back could return -EFAULT. Make
sure we return any error seen during unmapping.Signed-off-by: Jens Axboe
-
It was for driver private back_merge_fn hooks, but they don't exist
anymore.Signed-off-by: Jens Axboe
-
We have full flexibility of merging parameters now, so we can remove the
hooks that define back/front/request merge strategies. Nobody is using
them anymore.Signed-off-by: Jens Axboe
-
It's a file system thing, for block requests the only size used in the
io paths is ->data_len as it is in bytes, not sectors.Signed-off-by: Jens Axboe
13 Dec, 2006
2 commits
-
We implemented the missing bits to allow this some time ago, and
they are integrated in AS. So remove the __module_get() to allow
the module to be unloaded.Signed-off-by: Jens Axboe
-
We need to do this, otherwise the io schedulers don't get access to the
sync flag. Then they cannot tell the difference between a regular write
and an O_DIRECT write, which can cause a performance loss.Signed-off-by: Jens Axboe
12 Dec, 2006
3 commits
-
When I converted the original patch, I left unnecessary blk_queue_bounce in
SG_IO.Signed-off-by: FUJITA Tomonori
Signed-off-by: Mike Christie
Signed-off-by: Jens Axboe -
This patch fixes bio leaks in SG_IO. rq->bio can be changed after io
completion, so we need to reset rq->bio before calling blk_rq_unmap_user()http://marc.theaimsgroup.com/?l=linux-kernel&m=116570666807983&w=2
Signed-off-by: FUJITA Tomonori
Signed-off-by: Jens Axboe -
While working on bidi support at struct request level
I have found that blk_queue_activity_fn is actually never used.
The only user is in ide-probe.c with this code:/* enable led activity for disk drives only */
if (drive->media == ide_disk && hwif->led_act)
blk_queue_activity_fn(q, hwif->led_act, drive);And led_act is never initialized anywhere.
(Looking back at older kernels it was used in the PPC arch, but was removed around 2.6.18)
Unless it is all for future use off course.
(this patch is against linux-2.6-block.git as off 2006/12/4)Signed-off-by: Boaz Harrosh
Signed-off-by: Jens Axboe
11 Dec, 2006
1 commit
-
Wire up read accounting for block devices, within submit_bio().
Cc: Jay Lan
Cc: Shailabh Nagar
Cc: Balbir Singh
Cc: Chris Sturtivant
Cc: Tony Ernst
Cc: Guillaume Thouvenin
Cc: David Wright
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
09 Dec, 2006
3 commits
-
This patch provides fault-injection capability for disk IO.
Boot option:
fail_make_request=,,,
-- specifies the interval of failures.
-- specifies how often it should fail in percent.
-- specifies the size of free space where disk IO can be issued
safely in bytes.-- specifies how many times failures may happen at most.
Debugfs:
/debug/fail_make_request/interval
/debug/fail_make_request/probability
/debug/fail_make_request/specifies
/debug/fail_make_request/timesExample:
fail_make_request=10,100,0,-1
echo 1 > /sys/blocks/hda/hda1/make-it-failgeneric_make_request() on /dev/hda1 fails once per 10 times.
Cc: Jens Axboe
Signed-off-by: Akinobu Mita
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Signed-off-by: Josef Sipek
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Remove the old complex and crufty bd_mutex annotation.
Signed-off-by: Peter Zijlstra
Cc: Neil Brown
Cc: Ingo Molnar
Cc: Arjan van de Ven
Cc: Jason Baron
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
08 Dec, 2006
3 commits
-
There was lots of #ifdef noise in the kernel due to hotcpu_notifier(fn,
prio) not correctly marking 'fn' as used in the !HOTPLUG_CPU case, and thus
generating compiler warnings of unused symbols, hence forcing people to add
#ifdefs.the compiler can skip truly unused functions just fine:
text data bss dec hex filename
1624412 728710 3674856 6027978 5bfaca vmlinux.before
1624412 728710 3674856 6027978 5bfaca vmlinux.after[akpm@osdl.org: topology.c fix]
Signed-off-by: Ingo Molnar
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Replace all uses of kmem_cache_t with struct kmem_cache.
The patch was generated using the following script:
#!/bin/sh
#
# Replace one string by another in all the kernel sources.
#set -e
for file in `find * -name "*.c" -o -name "*.h"|xargs grep -l $1`; do
quilt add $file
sed -e "1,\$s/$1/$2/g" $file >/tmp/$$
mv /tmp/$$ $file
quilt refresh
doneThe script was run like this
sh replace kmem_cache_t "struct kmem_cache"
Signed-off-by: Christoph Lameter
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The patch (as824b) makes percpu_free() ignore NULL arguments, as one would
expect for a deallocation routine. (Note that free_percpu is #defined as
percpu_free in include/linux/percpu.h.) A few callers are updated to remove
now-unneeded tests for NULL. A few other callers already seem to assume
that passing a NULL pointer to percpu_free() is okay!The patch also removes an unnecessary NULL check in percpu_depopulate().
Signed-off-by: Alan Stern
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
06 Dec, 2006
3 commits
-
Conflicts:
drivers/pcmcia/ds.c
Fix up merge failures with Linus's head and fix new compile failures.
Signed-Off-By: David Howells
-
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (73 commits)
[SCSI] aic79xx: Add ASC-29320LPE ids to driver
[SCSI] stex: version update
[SCSI] stex: change wait loop code
[SCSI] stex: add new device type support
[SCSI] stex: update device id info
[SCSI] stex: adjust default queue length
[SCSI] stex: add value check in hard reset routine
[SCSI] stex: fix controller_info command handling
[SCSI] stex: fix biosparam calculation
[SCSI] megaraid: fix MMIO casts
[SCSI] tgt: fix undefined flush_dcache_page() problem
[SCSI] libsas: better error handling in sas_expander.c
[SCSI] lpfc 8.1.11 : Change version number to 8.1.11
[SCSI] lpfc 8.1.11 : Misc Fixes
[SCSI] lpfc 8.1.11 : Add soft_wwnn sysfs attribute, rename soft_wwn_enable
[SCSI] lpfc 8.1.11 : Removed decoding of PCI Subsystem Id
[SCSI] lpfc 8.1.11 : Add MSI (Message Signalled Interrupts) support
[SCSI] lpfc 8.1.11 : Adjust LOG_FCP logging
[SCSI] lpfc 8.1.11 : Fix Memory leaks
[SCSI] lpfc 8.1.11 : Fix lpfc_multi_ring_support
... -
Conflicts:
drivers/ata/libata-scsi.c
include/linux/libata.hFuther merge of Linus's head and compilation fixups.
Signed-Off-By: David Howells
05 Dec, 2006
2 commits
-
Conflicts:
drivers/infiniband/core/iwcm.c
drivers/net/chelsio/cxgb2.c
drivers/net/wireless/bcm43xx/bcm43xx_main.c
drivers/net/wireless/prism54/islpci_eth.c
drivers/usb/core/hub.h
drivers/usb/input/hid-core.c
net/core/netpoll.cFix up merge failures with Linus's head and fix new compilation failures.
Signed-Off-By: David Howells
-
CONFIG_LBD and CONFIG_LSF are spread into asm/types.h for no particularly
good reason.Centralising the definition in linux/types.h means that arch maintainers
don't need to bother adding it, as well as fixing the problem with
x86-64 users being asked to make a decision that has absolutely no
effect.The H8/300 porters seem particularly confused since I'm not aware of any
microcontrollers that need to support 2TB filesystems.Signed-off-by: Matthew Wilcox
Signed-off-by: Linus Torvalds
04 Dec, 2006
2 commits
-
Only the process notifier needs it, and it can set it manually.
Signed-off-by: Jens Axboe
-
It's too large to inline. Additionally clean it up, by fast pathing
the likely path.Signed-off-by: Jens Axboe
01 Dec, 2006
3 commits
-
- ->init_queue() does not need the elevator passed in
- ->put_request() is a hot path and need not have the queue passed in
- cfq_update_io_seektime() does not need cfqd passed inSigned-off-by: Jens Axboe
-
This patch modifies blk_rq_map/unmap_user() and the cdrom and scsi_ioctl.c
users so that it supports requests larger than bio by chaining them together.Signed-off-by: Mike Christie
Signed-off-by: Jens Axboe -
This adds a new timestamp message to blktrace, giving the timeofday when
we starting tracing. This helps user space correlate block trace events
with eg an application strace.This requires a (compatible) update to blkparse. The changed blkparse
is still able to process traces generated by older kernels, and older
versions of blkparse should silently ignore the new records (because
they have a pid of 0).Signed-off-by: Olaf Kirch
Signed-off-by: Jens Axboe
23 Nov, 2006
1 commit
22 Nov, 2006
1 commit
-
Pass the work_struct pointer to the work function rather than context data.
The work function can use container_of() to work out the data.For the cases where the container of the work_struct may go away the moment the
pending bit is cleared, it is made possible to defer the release of the
structure by deferring the clearing of the pending bit.To make this work, an extra flag is introduced into the management side of the
work_struct. This governs auto-release of the structure upon execution.Ordinarily, the work queue executor would release the work_struct for further
scheduling or deallocation by clearing the pending bit prior to jumping to the
work function. This means that, unless the driver makes some guarantee itself
that the work_struct won't go away, the work function may not access anything
else in the work_struct or its container lest they be deallocated.. This is a
problem if the auxiliary data is taken away (as done by the last patch).However, if the pending bit is *not* cleared before jumping to the work
function, then the work function *may* access the work_struct and its container
with no problems. But then the work function must itself release the
work_struct by calling work_release().In most cases, automatic release is fine, so this is the default. Special
initiators exist for the non-auto-release case (ending in _NAR).Signed-Off-By: David Howells
17 Nov, 2006
1 commit
-
ATAPI devices transfer fixed number of bytes for CDBs (12 or 16). Some
ATAPI devices choke when shorter CDB is used and the left bytes contain
garbage. Block SG_IO cleared left bytes but SCSI SG_IO didn't. This patch
makes SCSI SG_IO clear it and simplify CDB clearing in block SG_IO.Signed-off-by: Tejun Heo
Cc: Mathieu Fluhr
Cc: James Bottomley
Cc: Douglas Gilbert
Acked-by: Jens Axboe
Cc:
Acked-by: Jeff Garzik
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
16 Nov, 2006
1 commit
-
Use the proper conversion function for convert jiffies to msecs in
sg_io().Signed-off-by: Hannes Reinecke
Signed-off-by: James Bottomley
14 Nov, 2006
1 commit
-
Contrary to what the name misleads you to believe, SG_DXFER_TO_FROM_DEV
is really just a normal read seen from the device side.This patch fixes http://lkml.org/lkml/2006/10/13/100
Signed-off-by: Jens Axboe
Signed-off-by: Linus Torvalds
04 Nov, 2006
1 commit
-
Neil's xterms are too wide.
Cc: Neil Brown
Cc: Jens Axboe
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds