21 Feb, 2007
2 commits
-
>=============================================
>[ INFO: possible recursive locking detected ]
>2.6.19-1.2909.fc7 #1
>---------------------------------------------
>anaconda/587 is trying to acquire lock:
> (&bdev->bd_mutex){--..}, at: [] mutex_lock+0x21/0x24
>
>but task is already holding lock:
> (&bdev->bd_mutex){--..}, at: [] mutex_lock+0x21/0x24
>
>other info that might help us debug this:
>1 lock held by anaconda/587:
> #0: (&bdev->bd_mutex){--..}, at: [] mutex_lock+0x21/0x24
>
>stack backtrace:
> [] show_trace_log_lvl+0x1a/0x2f
> [] show_trace+0x12/0x14
> [] dump_stack+0x16/0x18
> [] __lock_acquire+0x116/0xa09
> [] lock_acquire+0x56/0x6f
> [] __mutex_lock_slowpath+0xe5/0x24a
> [] mutex_lock+0x21/0x24
> [] blkdev_ioctl+0x600/0x76d
> [] block_ioctl+0x1b/0x1f
> [] do_ioctl+0x22/0x68
> [] vfs_ioctl+0x252/0x265
> [] sys_ioctl+0x49/0x63
> [] syscall_call+0x7/0xbAnnotate BLKPG_DEL_PARTITION's bd_mutex locking and add a little comment
clarifying the bd_mutex locking, because I confused myself and initially
thought the lock order was wrong too.Signed-off-by: Peter Zijlstra
Cc: Neil Brown
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Several people have reported failures in dynamic major device number handling
due to the recent changes in there to avoid handing out the local/experimental
majors.Rolf reports that this is due to a gcc-4.1.0 bug.
The patch refactors that code a lot in an attempt to provoke the compiler into
behaving.Cc: Rolf Eike Beer
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
18 Feb, 2007
1 commit
-
Change I/O scheduler description to correctly show CFQ as being the default
scheduler and not the anticipatory scheduler that previously was default.Signed-off-by: Jesper Juhl
Signed-off-by: Adrian Bunk
13 Feb, 2007
2 commits
-
Many struct file_operations in the kernel can be "const". Marking them const
moves these to the .rodata section, which avoids false sharing with potential
dirty data. In addition it'll catch accidental writes at compile time to
these shared resources.Signed-off-by: Arjan van de Ven
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
As pointed out in http://bugzilla.kernel.org/show_bug.cgi?id=7922, dynamic
blockdev major allocation can hand out majors which LANANA has defined as
being for local/experimental use.Cc: Torben Mathiasen
Cc: Greg KH
Cc: Al Viro
Cc: Tomas Klas
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
12 Feb, 2007
15 commits
-
This improves performance considerably for sync requests when you
have command queuing enabled.Signed-off-by: Jens Axboe
-
We only really need it for a process going away, so move it to
those locations.Signed-off-by: Jens Axboe
-
Makes it more fair for the residual slice count.
Signed-off-by: Jens Axboe
-
We currently check the FIFO once per slice. Optimize that a bit and
only do it as the first thing for a new slice, so we don't end up
doing a single request and then seek to the FIFO requests.Signed-off-by: Jens Axboe
-
It must always be the active queue, otherwise it's a bug. So just
use the active_queue, don't pass it in explicitly.Signed-off-by: Jens Axboe
-
If a slice uses less than it is entitled to (or perhaps more), include
that in the decision on how much time to give it the next time it
gets serviced.Signed-off-by: Jens Axboe
-
This better matches what time the queue is actually spending doing
IO.Signed-off-by: Jens Axboe
-
Right now we use slice_start, which gives async queues an unfair
advantage. Chance that to service_last, and base the resorter
on that.Signed-off-by: Jens Axboe
-
Signed-off-by: Jens Axboe
-
Move the on_rr check into cfq_resort_rr_list(), every call site
needs to check it anyway.Signed-off-by: Jens Axboe
-
It hasn't been used for a while, kill it off and remove the old
if 0 code chunk.Signed-off-by: Jens Axboe
-
Don't allow elv_dispatch_sort() to mix reads and writes together,
it's rarely a good idea.Signed-off-by: Jens Axboe
-
Signed-off-by: Jens Axboe
-
* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
[SPARC64]: Update defconfig.
[SPARC64]: Add PCI MSI support on Niagara.
[SPARC64] IRQ: Use irq_desc->chip_data instead of irq_desc->handler_data
[SPARC64]: Add obppath sysfs attribute for SBUS and PCI devices.
[PARTITION]: Add whole_disk attribute. -
Mathieu originally needed to add this for tracing Xen, but it's something
that's needed for any application that can be tracing while cpus are added.unplug isn't supported by this patch. The thought was that at minumum a new
buffer needs to be added when a cpu comes up, but it wasn't worth the effort
to remove buffers on cpu down since they'd be freed soon anyway when the
channel was closed.[zanussi@us.ibm.com: avoid lock_cpu_hotplug deadlock]
Signed-off-by: Mathieu Desnoyers
Cc: Tom Zanussi
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
11 Feb, 2007
1 commit
-
Some partitioning systems create special partitions that
span the entire disk. One example are Sun partitions, and
this whole-disk partition exists to tell the firmware the
extent of the entire device so it can load the boot block
and do other things.Such partitions should not be treated as normal partitions,
because all the other partitions overlap this whole-disk one.
So we'd see multiple instances of the same UUID etc. which
we do not want. udev and friends can thus search for this
'whole_disk' attribute and use it to decide to ignore the
partition.Signed-off-by: Fabio Massimo Di Nitto
Signed-off-by: David S. Miller
10 Feb, 2007
1 commit
-
It is possible for raid5 to be sent a bio that is too big for an underlying
device. So if it is a READ that we pass stright down to a device, it will
fail and confuse RAID5.So in 'chunk_aligned_read' we check that the bio fits within the parameters
for the target device and if it doesn't fit, fall back on reading through
the stripe cache and making lots of one-page requests.Note that this is the earliest time we can check against the device because
earlier we don't have a lock on the device, so it could change underneath
us.Also, the code for handling a retry through the cache when a read fails has
not been tested and was badly broken. This patch fixes that code.Signed-off-by: Neil Brown
Cc: "Kai"
Cc:
Cc:
Cc: Jens Axboe
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
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