26 Aug, 2008

1 commit

  • Fix this compile bug:

    CC drivers/s390/block/dcssblk.o
    drivers/s390/block/dcssblk.c: In function 'dcssblk_add_store':
    drivers/s390/block/dcssblk.c:387: error: implicit declaration of function 'dcssblk_get_segment_by_name'
    drivers/s390/block/dcssblk.c:389: error: label 'release_gd' used but not defined
    make[1]: *** [drivers/s390/block/dcssblk.o] Error 1
    make: *** [drivers/s390/block/] Error 2

    Cc: Gerald Schaefer
    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     

22 Aug, 2008

4 commits

  • Concurrently adding the same segment may lead to duplicate device_register()
    calls, which will trigger an error in kobject code:
    "... don't try to register things with the same name in the same directory".
    This patch adds a check to avoid this.

    Signed-off-by: Gerald Schaefer
    Signed-off-by: Martin Schwidefsky

    Gerald Schaefer
     
  • Calling a ccw driver's notify function without the ccw device lock
    held opens up a race window between discovery and handling of a change
    in the device operational state. As a result, the device driver may
    encounter unexpected device malfunction, leading to out-of-retry
    situations or similar.

    Remove race by extending the ccw device lock from state change
    discovery to the calling of the notify function.

    Signed-off-by: Peter Oberparleiter
    Signed-off-by: Martin Schwidefsky

    Peter Oberparleiter
     
  • The Perform Subsystem Function/Prepare for Read Subsystem Data
    command requires 12 bytes of parameter data, but the respective data
    structure dasd_psf_prssd_data has a length of 16 bytes.
    Current storage servers ignore the obsolete bytes, but older models
    fail to execute the command and report an incorrect length error.
    This causes the device initilization for these devices to fail.
    To fix this problem we need to correct the dasd_psf_prssd_data
    structure and shorten it to the correct length.

    Reported-by: Ivan Warren
    Reviewed-by: Ivan Warren
    Tested-by: Ivan Warren
    CC: stable
    Signed-off-by: Stefan Weinhuber

    Stefan Weinhuber
     
  • In case of error, functions dasd_kmalloc_request and idal_buffer_alloc
    return an ERR pointer, but never return the NULL pointer. So after a
    call to one of these functions, a NULL test should be replaced by an
    IS_ERR test.

    A simplified version of the semantic patch that makes this change is
    as follows:
    (http://www.emn.fr/x-info/coccinelle/)

    //
    @correct_null_test@
    expression x,E;
    statement S1, S2;
    @@
    x =
    (
    dasd_kmalloc_request(...)
    |
    idal_buffer_alloc(...)
    )

    ? x = E;
    //

    Signed-off-by: Julien Brunel
    Signed-off-by: Julia Lawall
    Signed-off-by: Martin Schwidefsky

    Julien Brunel
     

01 Aug, 2008

1 commit

  • When z/VM provides two virtual devices (minidisks) that reside on the
    same real device, both will receive the configuration data from the
    real device and thus get the same uid. To fix this problem, z/VM
    provides an additional configuration data record that allows to
    distinguish between minidisks.
    z/VM APAR VM64273 needs be installed so this fix has an effect.

    Signed-off-by: Stefan Weinhuber
    Signed-off-by: Martin Schwidefsky

    Stefan Weinhuber
     

17 Jul, 2008

3 commits


15 Jul, 2008

2 commits

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

    Linus Torvalds
     
  • Jonathan Corbet
     

14 Jul, 2008

3 commits


21 Jun, 2008

1 commit


30 May, 2008

1 commit


15 May, 2008

2 commits


29 Apr, 2008

2 commits

  • Use proc_create() to make sure that ->proc_fops be setup before gluing PDE to
    main tree.

    Signed-off-by: Denis V. Lunev
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: Alexey Dobriyan
    Cc: "Eric W. Biederman"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Denis V. Lunev
     
  • Remove proc_root export. Creation and removal works well if parent PDE is
    supplied as NULL -- it worked always that way.

    So, one useless export removed and consistency added, some drivers created
    PDEs with &proc_root as parent but removed them as NULL and so on.

    Signed-off-by: Alexey Dobriyan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     

28 Apr, 2008

1 commit

  • Alter the block device ->direct_access() API to work with the new
    get_xip_mem() API (that requires both kaddr and pfn are returned).

    Some architectures will not do the right thing in their virt_to_page() for use
    by XIP (to translate from the kernel virtual address returned by
    direct_access(), to a user mappable pfn in XIP's page fault handler.

    However, we can't switch it to just return the pfn and not the kaddr, because
    we have no good way to get a kva from a pfn, and XIP requires the kva for its
    read(2) and write(2) handlers. So we have to return both.

    Signed-off-by: Jared Hulbert
    Signed-off-by: Nick Piggin
    Cc: Carsten Otte
    Cc: Heiko Carstens
    Cc: linux-mm@kvack.org
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jared Hulbert
     

17 Apr, 2008

6 commits

  • Move the function that prints the segment warning messages found in the
    monreader driver and the dcssblk driver to the extmem base code.

    Signed-off-by: Martin Schwidefsky
    Signed-off-by: Heiko Carstens

    Martin Schwidefsky
     
  • Most noteable part of this commit is the new local header file entry.h
    which contains all the function declarations of functions that get only
    called from asm code or are arch internal. That way we can avoid extern
    declarations in C files.
    This is more or less the same that was done for sparc64.

    Signed-off-by: Martin Schwidefsky
    Signed-off-by: Heiko Carstens

    Heiko Carstens
     
  • __FUNCTION__ is gcc-specific, use __func__

    Signed-off-by: Harvey Harrison
    Signed-off-by: Andrew Morton
    Signed-off-by: Martin Schwidefsky
    Signed-off-by: Heiko Carstens

    Harvey Harrison
     
  • Now the system reports system information messages (SIM) to the user.
    The System Reference Code (SRC) which is reported to the user gives
    the abbility to lookup the reason of the SIM online in the
    documentation of the storage server.

    Signed-off-by: Stefan Haberland
    Signed-off-by: Martin Schwidefsky
    Signed-off-by: Heiko Carstens

    Stefan Haberland
     
  • allocating dasd_fba_private without GFP_DMA results in IO error
    during read device characteristics of a FBA disk

    Signed-off-by: Stefan Haberland
    Signed-off-by: Martin Schwidefsky
    Signed-off-by: Heiko Carstens

    Stefan Haberland
     
  • I compiled the kernel without deadline, and the dasd code exits the old
    scheduler (CFQ), fails to load the new one (deadline), and then things just
    hang - with one of these (sorry about the weird chars - I copy & pasted it
    from a 3270 console):

    dasd(eckd): 0.0.0151: 3390/0A(CU:3990/01) Cyl:3338 Head:15 Sec:224
    ------------ cut here ------------
    Badness at kernel/mutex.c:134
    Modules linked in: dasd_eckd_mod dasd_mod
    CPU: 0 Not tainted 2.6.25-rc3 #9
    Process exe (pid: 538, task: 000000000d172000, ksp: 000000000d21ef88)
    Krnl PSW : 0404000180000000 000000000022fb5c (mutex_lock_nested+0x2a4/0x2cc)
    R:0 T:1 IO:0 EX:0 Key:0 M:1 W:0 P:0 AS:0 CC:0 PM:0 EA:3
    Krnl GPRS: 0000000000024218 000000000076fc78 0000000000000000 000000000000000f
    000000000022f92e 0000000000449898 000000000f921c00 000003e000162590
    00000000001539c4 000000000d172000 070000007fffffff 000000000d21f400
    000000000f8f2560 00000000002413f8 000000000022fb44 000000000d21f400
    Krnl Code: 000000000022fb50: bf2f1000 icm %r2,15,0(%r1)
    000000000022fb54: a774fef6 brc 7,22f940
    000000000022fb58: a7f40001 brc 15,22fb5a
    >000000000022fb5c: a7f4fef2 brc 15,22f940
    000000000022fb60: c0e5fffa112a brasl %r14,171db4
    000000000022fb66: 1222 ltr %r2,%r2
    000000000022fb68: a784fedb brc 8,22f91e
    000000000022fb6c: c010002a0086 larl %r1,76fc78
    Call Trace:
    ( mutex_lock_nested+0x76/0x2cc)
    elevator_exit+0x38/0x80
    blk_cleanup_queue+0x62/0x7c
    dasd_change_state+0xe0/0x8ec
    dasd_set_target_state+0x8e/0x9c
    dasd_generic_set_online+0x160/0x284
    dasd_eckd_set_online+0x2e/0x40
    ccw_device_set_online+0x170/0x2c0
    online_store_recog_and_online+0x5a/0x14c
    online_store+0xbe/0x2ec
    dev_attr_store+0x38/0x58
    sysfs_write_file+0x130/0x190
    vfs_write+0xb2/0x160
    sys_write+0x54/0x9c
    sys32_write+0x2e/0x50
    sysc_noemu+0x10/0x16
    0x77e82bd2

    Set elevator pointer to NULL in order to avoid double elevator_exit
    calls when elevator_init call for deadline iosched fails.
    Also make sure the dasd device driver depends on IOSCHED_DEADLINE so
    the default IO scheduler of the dasd driver is present.

    Signed-off-by: Josef 'Jeff' Sipek
    Signed-off-by: Martin Schwidefsky
    Signed-off-by: Heiko Carstens

    Josef 'Jeff' Sipek
     

05 Mar, 2008

2 commits

  • Using the /proc/dasd/devices interface leaves the reference counter
    of alias devices in an inconsistent state. A process that tries to set
    such a device offline afterwards will hang.
    The dasd_devices_show function returns immediately for alias devices
    and this code path was missing a dasd_put_device call.

    Signed-off-by: Stefan Weinhuber
    Signed-off-by: Martin Schwidefsky

    Stefan Weinhuber
     
  • When a request fails that was started on an alias device then the
    first recovery step is to retry it on the base device. If the
    recovery request fails again with the same symptoms, the next step
    should not be a simple retry, but should be a proper recovery based
    on sense data, etc. To do so, the dasd recovery functions need to
    recognize the alias recovery step in the erp chain by comparing
    the start devices.

    Signed-off-by: Stefan Weinhuber
    Signed-off-by: Martin Schwidefsky

    Stefan Weinhuber
     

19 Feb, 2008

2 commits

  • Fix Unlikely(x) != y

    Cc: Gerald Schaefer
    Cc: Stefan Weinhuber
    Cc: Carsten Otte
    Signed-off-by: Roel Kluin
    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Roel Kluin
     
  • After setting the status of the cqr and releasing the lock for the
    block cqr queue, we call the cqr callback function, which will usually
    just trigger the dasd_block_tasklet. But when the tasklet is already
    running the cqr might be processed before we invoke the callback
    function. In rare cases the callback pointer may already be invalid
    by the time we want to call it, which will result in a panic.
    Solution: Call the callback function first and then release the lock.

    Signed-off-by: Stefan Weinhuber
    Signed-off-by: Martin Schwidefsky

    Stefan Weinhuber
     

05 Feb, 2008

3 commits

  • In case a dcss segment cannot be loaded blk_cleanup_queue
    will be called before blk_queue_make_request, leaving the
    struct work unplug_work of the request queue uninitialized
    before it is used.
    That leads also to the lockdep message below.
    To avoid that call blk_queue_make_request right after the
    request_queue has been allocated.
    This makes sure that the struct work is always initialized
    before it is used.

    INFO: trying to register non-static key.
    the code is fine but needs lockdep annotation.
    turning off the locking correctness validator.
    CPU: 2 Not tainted 2.6.24 #6
    Process swapper (pid: 1, task: 000000000f854038, ksp: 000000000f85f980)
    040000000f85f860 000000000f85f880 0000000000000002 0000000000000000
    000000000f85f920 000000000f85f898 000000000f85f898 000000000001622e
    0000000000000000 000000000f85f980 0000000000000000 0000000000000000
    000000000f85f880 000000000000000c 000000000f85f880 000000000f85f8f0
    0000000000342908 000000000001622e 000000000f85f880 000000000f85f8d0
    Call Trace:
    ([] show_trace+0xda/0x104)
    [] show_stack+0xc0/0xf8
    [] dump_stack+0xb0/0xc0
    [] __lock_acquire+0x47e/0x1160
    [] lock_acquire+0xb0/0xd8
    [] __cancel_work_timer+0x9e/0x240
    [] cancel_work_sync+0x2a/0x3c
    [] kblockd_flush_work+0x26/0x34
    [] blk_sync_queue+0x38/0x48
    [] blk_release_queue+0x3c/0xa8
    [] kobject_cleanup+0x58/0xac
    [] kobject_release+0x2a/0x38
    [] kref_put+0x6e/0x94
    [] kobject_put+0x38/0x48
    [] blk_put_queue+0x2a/0x38
    [] blk_cleanup_queue+0x82/0x90
    [] dcssblk_add_store+0x34e/0x700
    [] dcssblk_init+0x1a0/0x308
    [] kernel_init+0x1b2/0x3a4
    [] kernel_thread_starter+0x6/0xc
    [] kernel_thread_starter+0x0/0xc

    INFO: lockdep is turned off.

    Cc: Gerald Schaefer
    Cc: Carsten Otte
    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     
  • When an alias device is set offline while it is in use this may
    result in a panic in the cleanup part of the dasd_block_tasklet.
    The problem here is that there may exist some ccw requests that were
    originally created for the alias device and transferred to the base
    device when the alias was set offline. When these request are
    cleaned up later, the discipline pointer in the alias device may not
    be valid anymore. To fix this use the base device discipline to find
    the cleanup function.

    Signed-off-by: Stefan Weinhuber
    Signed-off-by: Martin Schwidefsky

    Stefan Weinhuber
     
  • Adding interface control check (ifcc) handling in error recovery.
    First retry up to 255 times and if all retries fail try an alternate
    path if possible.

    Signed-off-by: Stefan Haberland
    Signed-off-by: Martin Schwidefsky

    Stefan Haberland
     

28 Jan, 2008

1 commit

  • This patch converts s390 to use blk_end_request interfaces.
    Related 'uptodate' arguments are converted to 'error'.

    As a result, the interfaces of internal functions below are changed:
    o dasd_end_request
    o tapeblock_end_request

    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: linux390@de.ibm.com
    Signed-off-by: Kiyoshi Ueda
    Signed-off-by: Jun'ichi Nomura
    Signed-off-by: Jens Axboe

    Kiyoshi Ueda
     

26 Jan, 2008

5 commits

  • Signed-off-by: Peter Tiedemann

    Peter Tiedemann
     
  • Signed-off-by: Jan Engelhardt
    Signed-off-by: Martin Schwidefsky

    Jan Engelhardt
     
  • Add time to the 'expires' value to avoid a loop caused by the cqr
    termination function

    Signed-off-by: Stefan Haberland
    Signed-off-by: Martin Schwidefsky

    Stefan Haberland
     
  • Parallel access volumes (PAV) is a storage server feature, that allows
    to start multiple channel programs on the same DASD in parallel. It
    defines alias devices which can be used as alternative paths to the
    same disk. With the old base PAV support we only needed rudimentary
    functionality in the DASD device driver. As the mapping between base
    and alias devices was static, we just had to export an identifier
    (uid) and could leave the combining of devices to external layers
    like a device mapper multipath.
    Now hyper PAV removes the requirement to dedicate alias devices to
    specific base devices. Instead each alias devices can be combined with
    multiple base device on a per request basis. This requires full
    support by the DASD device driver as now each channel program itself
    has to identify the target base device.
    The changes to the dasd device driver and the ECKD discipline are:
    - Separate subchannel device representation (dasd_device) from block
    device representation (dasd_block). Only base devices are block
    devices.
    - Gather information about base and alias devices and possible
    combinations.
    - For each request decide which dasd_device should be used (base or
    alias) and build specific channel program.
    - Support summary unit checks, which allow the storage server to
    upgrade / downgrade between base and hyper PAV at runtime (support
    is mandatory).

    Signed-off-by: Stefan Weinhuber
    Signed-off-by: Martin Schwidefsky

    Stefan Weinhuber
     
  • Signed-off-by: Joe Perches
    Signed-off-by: Martin Schwidefsky

    Joe Perches