09 Sep, 2009
1 commit
-
Andy Whitcroft reported an oops in aoe triggered by use of an
incorrectly initialised request_queue object:[ 2645.959090] kobject '' (ffff880059ca22c0): tried to add
an uninitialized object, something is seriously wrong.
[ 2645.959104] Pid: 6, comm: events/0 Not tainted 2.6.31-5-generic #24-Ubuntu
[ 2645.959107] Call Trace:
[ 2645.959139] [] kobject_add+0x5f/0x70
[ 2645.959151] [] blk_register_queue+0x8b/0xf0
[ 2645.959155] [] add_disk+0x8f/0x160
[ 2645.959161] [] aoeblk_gdalloc+0x164/0x1c0 [aoe]The request queue of an aoe device is not used but can be allocated in
code that does not sleep.Bruno bisected this regression down to
cd43e26f071524647e660706b784ebcbefbd2e44
block: Expose stacked device queues in sysfs
"This seems to generate /sys/block/$device/queue and its contents for
everyone who is using queues, not just for those queues that have a
non-NULL queue->request_fn."Addresses http://bugs.launchpad.net/bugs/410198
Addresses http://bugzilla.kernel.org/show_bug.cgi?id=13942Note that embedding a queue inside another object has always been
an illegal construct, since the queues are reference counted and
must persist until the last reference is dropped. So aoe was
always buggy in this respect (Jens).Signed-off-by: Ed Cashin
Cc: Andy Whitcroft
Cc: "Rafael J. Wysocki"
Cc: Bruno Premont
Cc: Martin K. Petersen
Cc: Andrew Morton
Signed-off-by: Jens Axboe
28 Jul, 2009
4 commits
-
When last sector is written, ready bit of status register should be
checked.Signed-off-by: unsik Kim
Acked-by: Bartlomiej Zolnierkiewicz
Signed-off-by: Jens Axboe -
We cannot acknowledge the sector write before checking its status
(which is done on the next loop iteration) and we also need to do
the final status register check after writing the last sector.Fix mg_write() to match mg_write_intr() in this regard.
While at it:
- add mg_read_one() and mg_write_one() helpers
- always use MG_SECTOR_SIZE and remove MG_STORAGE_BUFFER_SIZE[bart: thanks to Tejun for porting the patch over recent block changes]
Cc: unsik Kim
Cc: Tejun Heo
Signed-off-by: Bartlomiej Zolnierkiewicz===================================================================
Signed-off-by: Jens Axboe -
When using polling driver, little delay is required to access
status register. Without this, host might read invalid status.Signed-off-by: unsik Kim
Signed-off-by: Jens Axboe -
mflash's polling driver operate in standard request_fn_proc's context,
sleep in this isn't permitted.Signed-off-by: unsik Kim
Signed-off-by: Jens Axboe
23 Jul, 2009
1 commit
-
* 'tj-block-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/misc:
virtio_blk: mark virtio_blk with __refdata to kill spurious section mismatch
block: sysfs fix mismatched queue_var_{store,show} in 64bit kernel
ataflop: adjust NULL test
block: fix failfast merge testing in elv_rq_merge_ok()
z2ram: Small cleanup for z2ram.c
19 Jul, 2009
1 commit
-
The variable virtio_blk references the function virtblk_probe() (which
is in .devinit section) and also references the function
virtblk_remove() ( which is in .devexit section). So, virtio_blk
simultaneously refers .devinit and .devexit section. To avoid this
messup, we mark virtio_blk as __refdata.We were warned by the following warning:
LD drivers/block/built-in.o
WARNING: drivers/block/built-in.o(.data+0xc8dc): Section mismatch in
reference from the variable virtio_blk to the function
.devinit.text:virtblk_probe()
The variable virtio_blk references
the function __devinit virtblk_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,WARNING: drivers/block/built-in.o(.data+0xc8e0): Section mismatch in
reference from the variable virtio_blk to the function
.devexit.text:virtblk_remove()
The variable virtio_blk references
the function __devexit virtblk_remove()
If the reference is valid then annotate the
variable with __exit* (see linux/init.h) or name the variable:
*driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,Signed-off-by: Rakib Mullick
Signed-off-by: Tejun Heo
17 Jul, 2009
3 commits
-
Block driver ioctl methods must return ENOTTY and not -ENOIOCTLCMD if
they expect the block layer to handle generic ioctls.This triggered a BLKROSET failure in xfsqa #200.
Signed-off-by: Christoph Hellwig
Signed-off-by: Rusty Russell -
By default a block driver bounces highmem requests, but virtio-blk is
perfectly fine with any request that fit into it's 64 bit addressing scheme,
mapped in the kernel virtual space or not.Besides improving performance on highmem systems this also makes the
reproducible oops in __bounce_end_io go away (but hiding the real cause).Signed-off-by: Christoph Hellwig
Signed-off-by: Rusty Russell -
dtp is derefenced on the lines above the test !dtp, and so it cannot be
NULL at this point.A simplified version of the semantic match that finds this problem is as
follows: (http://www.emn.fr/x-info/coccinelle/)//
@r@
expression x,E,E1;
identifier f,l;
position p1,p2;
@@*x@p1->f = E1;
... when != x = E
when != goto l;
(
*x@p2 == NULL
|
*x@p2 != NULL
)
//Signed-off-by: Julia Lawall
Signed-off-by: Tejun Heo
15 Jul, 2009
1 commit
-
We should use Z2MINOR_COUNT as range argument in blk_unregister_region()
Signed-off-by: Zhao Lei
Signed-off-by: Tejun Heo
13 Jul, 2009
1 commit
-
* Remove smp_lock.h from files which don't need it (including some headers!)
* Add smp_lock.h to files which do need it
* Make smp_lock.h include conditional in hardirq.h
It's needed only for one kernel_locked() usage which is under CONFIG_PREEMPTThis will make hardirq.h inclusion cheaper for every PREEMPT=n config
(which includes allmodconfig/allyesconfig, BTW)Signed-off-by: Alexey Dobriyan
Signed-off-by: Linus Torvalds
11 Jul, 2009
2 commits
-
* 'for-linus' of git://git.open-osd.org/linux-open-osd:
osdblk: Adjust queue limits to lower device's limits
osdblk: a Linux block device for OSD objects
MAINTAINERS: Add osd maintained files (F:)
exofs: Avoid using file_fsync()
exofs: Remove IBM copyrights
exofs: Fix bio leak in error handling path (sync read) -
Commit 1faa16d22877f4839bd433547d770c676d1d964c accidentally broke
the bdi congestion wait queue logic, causing us to wait on congestion
for WRITE (== 1) when we really wanted BLK_RW_ASYNC (== 0) instead.Signed-off-by: Jens Axboe
09 Jul, 2009
1 commit
-
Commit 5fd29d6ccbc98884569d6f3105aeca70858b3e0f ("printk: clean up
handling of log-levels and newlines") changed printk semantics. printk
lines with multiple KERN_ prefixes are no longer emitted as
before the patch.is now included in the output on each additional use.
Remove all uses of multiple KERN_s in formats.
Signed-off-by: Joe Perches
Signed-off-by: Linus Torvalds
04 Jul, 2009
1 commit
-
When doing an unexpected shutdown like kexec the cciss
firmware might still have some commands in flight, which
it is trying to complete.
The driver is doing it's best on resetting the HBA,
but sadly there's a firmware issue causing the firmware
_not_ to abort or drop old commands.
So the firmware will send us commands which we haven't
accounted for, causing the driver to panic.With this patch we're just ignoring these commands as
there is nothing we could be doing with them anyway.Signed-off-by: Hannes Reinecke
Acked-by: Mike Miller
Signed-off-by: Jens Axboe
01 Jul, 2009
1 commit
-
A crappy macro prevents us unlocking on a fail path.
Expand the macro and unlock appropriatelly.
Signed-off-by: Jiri Slaby
Cc: Jens Axboe
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
24 Jun, 2009
2 commits
-
call blk_queue_stack_limits() to copy queue limits from
the underline osd scsi_device. This is absolutely needed
because osdblk cannot sleep when allocating a lower-request and
therefore cannot be bouncing.TODO: Dynamic changes of limits to the lower device queue
will not reflect in the upper driverSigned-off-by: Boaz Harrosh
-
Submitted driver exports a block device of the form /dev/osdblkX,
where X is a decimal number.It does that by mounting a stacking block device on top
of an osd object. For example, if you create a 2G object
on an OSD device, you can then use this module to present
that 2G object as a Linux block device.See inside patch for exact documentation.
[Sitting at linux-next helped fix proper Kconfig dependency
for this driver, thanks to Randy Dunlap]Signed-off-by: Jeff Garzik
Signed-off-by: Boaz Harrosh
18 Jun, 2009
1 commit
-
Just use HD_MAJOR directly.
Signed-off-by: Christoph Hellwig
Signed-off-by: Jens Axboe
17 Jun, 2009
3 commits
-
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: (64 commits)
debugfs: use specified mode to possibly mark files read/write only
debugfs: Fix terminology inconsistency of dir name to mount debugfs filesystem.
xen: remove driver_data direct access of struct device from more drivers
usb: gadget: at91_udc: remove driver_data direct access of struct device
uml: remove driver_data direct access of struct device
block/ps3: remove driver_data direct access of struct device
s390: remove driver_data direct access of struct device
parport: remove driver_data direct access of struct device
parisc: remove driver_data direct access of struct device
of_serial: remove driver_data direct access of struct device
mips: remove driver_data direct access of struct device
ipmi: remove driver_data direct access of struct device
infiniband: ehca: remove driver_data direct access of struct device
ibmvscsi: gadget: at91_udc: remove driver_data direct access of struct device
hvcs: remove driver_data direct access of struct device
xen block: remove driver_data direct access of struct device
thermal: remove driver_data direct access of struct device
scsi: remove driver_data direct access of struct device
pcmcia: remove driver_data direct access of struct device
PCIE: remove driver_data direct access of struct device
...Manually fix up trivial conflicts due to different direct driver_data
direct access fixups in drivers/block/{ps3disk.c,ps3vram.c} -
* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
block: remove some includings of blktrace_api.h
mg_disk: seperate mg_disk.h again
block: Introduce helper to reset queue limits to default values
cfq: remove extraneous '\n' in blktrace output
ubifs: register backing_dev_info
btrfs: properly register fs backing device
block: don't overwrite bdi->state after bdi_init() has been run
cfq: cleanup for last_end_request in cfq_data -
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (38 commits)
ps3flash: Always read chunks of 256 KiB, and cache them
ps3flash: Cache the last accessed FLASH chunk
ps3: Replace direct file operations by callback
ps3: Switch ps3_os_area_[gs]et_rtc_diff to EXPORT_SYMBOL_GPL()
ps3: Correct debug message in dma_ioc0_map_pages()
drivers/ps3: Add missing annotations
ps3fb: Use ps3_system_bus_[gs]et_drvdata() instead of direct access
ps3flash: Use ps3_system_bus_[gs]et_drvdata() instead of direct access
ps3: shorten ps3_system_bus_[gs]et_driver_data to ps3_system_bus_[gs]et_drvdata
ps3: Use dev_[gs]et_drvdata() instead of direct access for system bus devices
block/ps3: remove driver_data direct access of struct device
ps3vram: Make ps3vram_priv.reports a void *
ps3vram: Remove no longer used ps3vram_priv.ddr_base
ps3vram: Replace mutex by spinlock + bio_list
block: Add bio_list_peek()
powerpc: Use generic atomic64_t implementation on 32-bit processors
lib: Provide generic atomic64_t implementation
powerpc: Add compiler memory barrier to mtmsr macro
powerpc/iseries: Mark signal_vsp_instruction() as maybe unused
powerpc/iseries: Fix unused function warning in iSeries DT code
...
16 Jun, 2009
7 commits
-
When porting blktrace to tracepoints, we changed to trace/block.h
for trace prober declarations.Signed-off-by: Li Zefan
Signed-off-by: Jens Axboe -
eec9462088a26c046d4db3100796a340a50890b8 fold mg_disk.h into mg_disk.c,
but mg_disk platform driver needs private data for operation. This also
make mg_disk.c as machine independent. Seperate only needed structure and
defines to mg_disk.hSigned-off-by: unsik Kim
Signed-off-by: Jens Axboe -
Many developers use "/debug/" or "/debugfs/" or "/sys/kernel/debug/"
directory name to mount debugfs filesystem for ftrace according to
./Documentation/tracers/ftrace.txt file.And, three directory names(ex:/debug/, /debugfs/, /sys/kernel/debug/) is
existed in kernel source like ftrace, DRM, Wireless, Documentation,
Network[sky2]files to mount debugfs filesystem.debugfs means debug filesystem for debugging easy to use by greg kroah
hartman. "/sys/kernel/debug/" name is suitable as directory name
of debugfs filesystem.
- debugfs related reference: http://lwn.net/Articles/334546/Fix inconsistency of directory name to mount debugfs filesystem.
* From Steven Rostedt
- find_debugfs() and tracing_files() in this patch.Signed-off-by: GeunSik Lim
Acked-by : Inaky Perez-Gonzalez
Reviewed-by : Steven Rostedt
Reviewed-by : James Smart
CC: Jiri Kosina
CC: David Airlie
CC: Peter Osterlund
CC: Ananth N Mavinakayanahalli
CC: Anil S Keshavamurthy
CC: Masami Hiramatsu
Signed-off-by: Greg Kroah-Hartman -
In the near future, the driver core is going to not allow direct access
to the driver_data pointer in struct device. Instead, the functions
dev_get_drvdata() and dev_set_drvdata() should be used. These functions
have been around since the beginning, so are backwards compatible with
all older kernel versions.Signed-off-by: Roel Kluin
Acked-by: Geert Uytterhoeven
Signed-off-by: Greg Kroah-Hartman -
In the near future, the driver core is going to not allow direct access
to the driver_data pointer in struct device. Instead, the functions
dev_get_drvdata() and dev_set_drvdata() should be used. These functions
have been around since the beginning, so are backwards compatible with
all older kernel versions.Cc: xen-devel@lists.xensource.com
Cc: virtualization@lists.osdl.org
Acked-by: Chris Wright
Acked-by: Jeremy Fitzhardinge
Signed-off-by: Greg Kroah-Hartman -
This adds support to the AOE core to report the proper device name to
userspace for the AOE devices.Signed-off-by: Kay Sievers
Signed-off-by: Jan Blunck
Signed-off-by: Greg Kroah-Hartman -
This adds support for block drivers to report their requested nodename
to userspace. It also updates a number of block drivers to provide the
needed subdirectory and device name to be used for them.Signed-off-by: Kay Sievers
Signed-off-by: Jan Blunck
Signed-off-by: Greg Kroah-Hartman
15 Jun, 2009
10 commits
-
Conflicts:
Documentation/feature-removal-schedule.txt
drivers/scsi/fcoe/fcoe.c
net/core/drop_monitor.c
net/core/net-traces.c -
Signed-off-by: Geert Uytterhoeven
Cc: Geoff Levand
Cc: Jim Paris
Acked-by: Geoff Levand
Signed-off-by: Benjamin Herrenschmidt -
In the near future, the driver core is going to not allow direct access
to the driver_data pointer in struct device. Instead, the functions
dev_get_drvdata() and dev_set_drvdata() should be used. These functions
have been around since the beginning, so are backwards compatible with
all older kernel versions.[Geert: Use ps3_system_bus_[gs]et_driver_data() for ps3_system_bus_device]
Signed-off-by: Roel Kluin
Signed-off-by: Geert Uytterhoeven
Cc: Jim Paris
Cc: Jens Axboe
Signed-off-by: Benjamin Herrenschmidt -
So we can kill a cast.
Signed-off-by: Geert Uytterhoeven
Cc: Jim Paris
Cc: Jens Axboe
Signed-off-by: Benjamin Herrenschmidt -
Signed-off-by: Geert Uytterhoeven
Cc: Jim Paris
Cc: Jens Axboe
Signed-off-by: Benjamin Herrenschmidt -
Remove the mutex serializing access to the cache.
Instead, queue up new requests on a bio_list if the driver is busy.This improves sequential write performance by ca. 2%.
Signed-off-by: Geert Uytterhoeven
Cc: Jim Paris
Cc: Jens Axboe
Signed-off-by: Benjamin Herrenschmidt -
Signed-off-by: Geert Uytterhoeven
Cc: linux-fbdev-devel@lists.sourceforge.net
Cc: Jim Paris
Cc: Jens Axboe
Signed-off-by: Benjamin Herrenschmidt -
- Make the IOMMU flags used for mapping main memory into the GPU's I/O space
explicit, instead of relying on the default in the hypervisor,
- Add missing calls to lv1_gpu_context_iomap(..., CBE_IOPTE_M) to unmap the
memory during cleanup.Signed-off-by: Geert Uytterhoeven
Cc: Jim Paris
Cc: Jens Axboe
Signed-off-by: Benjamin Herrenschmidt -
Signed-off-by: Geert Uytterhoeven
Cc: Jim Paris
Cc: Jens Axboe
Signed-off-by: Benjamin Herrenschmidt -
Use proc_create_data() to avoid race conditions.
Reported-by: Alexey Dobriyan
Signed-off-by: Geert Uytterhoeven
Cc: Jim Paris
Cc: Jens Axboe
Signed-off-by: Benjamin Herrenschmidt