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=13942

    Note 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

    Ed Cashin
     

28 Jul, 2009

4 commits


23 Jul, 2009

1 commit


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

    Rakib Mullick
     

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

    Christoph Hellwig
     
  • 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

    Christoph Hellwig
     
  • 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

    Julia Lawall
     

15 Jul, 2009

1 commit


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_PREEMPT

    This 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

    Alexey Dobriyan
     

11 Jul, 2009

2 commits


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

    Joe Perches
     

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

    Hannes Reinecke
     

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

    Jiri Slaby
     

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 driver

    Signed-off-by: Boaz Harrosh

    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

    Jeff Garzik
     

18 Jun, 2009

1 commit


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}

    Linus Torvalds
     
  • * '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

    Linus Torvalds
     
  • * '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
    ...

    Linus Torvalds
     

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

    Li Zefan
     
  • 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.h

    Signed-off-by: unsik Kim
    Signed-off-by: Jens Axboe

    unsik Kim
     
  • 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

    GeunSik Lim
     
  • 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

    Roel Kluin
     
  • 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

    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

    Kay Sievers
     
  • 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

    Kay Sievers
     

15 Jun, 2009

10 commits