17 May, 2010

2 commits

  • Remove the duplicate of the DASD uid from the devmap structure.
    Use the uid from the device private structure instead.
    This also removes a lockdep warning complaining about a possible
    SOFTIRQ-safe -> SOFTIRQ-unsafe lock order.

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

    Stefan Haberland
     
  • For base Parallel Access Volume (PAV) there is a fixed mapping of
    base and alias devices. With dynamic PAV this mapping can be changed
    so that an alias device is used with another base device.
    This patch enables the DASD device driver to tolerate dynamic PAV
    changes.

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

    Stefan Haberland
     

12 May, 2010

1 commit

  • The various dasd_sleep_on functions use a global wait queue when
    waiting for a cqr. The wait condition checks the status and devlist
    fields of the cqr to determine if it is safe to continue. This
    evaluation may return true, although the tasklet has not finished
    processing of the cqr and the callback function has not been called
    yet. When the callback is finally called, the data in the cqr may
    already be invalid. The sleep_on wait condition needs a safe way to
    determine if the tasklet has finished processing. Use the
    callback_data field of the cqr to store a token, which is set by
    the callback function itself.

    Cc:
    Signed-off-by: Stefan Weinhuber
    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Stefan Weinhuber
     

22 Apr, 2010

1 commit


30 Mar, 2010

1 commit

  • …it slab.h inclusion from percpu.h

    percpu.h is included by sched.h and module.h and thus ends up being
    included when building most .c files. percpu.h includes slab.h which
    in turn includes gfp.h making everything defined by the two files
    universally available and complicating inclusion dependencies.

    percpu.h -> slab.h dependency is about to be removed. Prepare for
    this change by updating users of gfp and slab facilities include those
    headers directly instead of assuming availability. As this conversion
    needs to touch large number of source files, the following script is
    used as the basis of conversion.

    http://userweb.kernel.org/~tj/misc/slabh-sweep.py

    The script does the followings.

    * Scan files for gfp and slab usages and update includes such that
    only the necessary includes are there. ie. if only gfp is used,
    gfp.h, if slab is used, slab.h.

    * When the script inserts a new include, it looks at the include
    blocks and try to put the new include such that its order conforms
    to its surrounding. It's put in the include block which contains
    core kernel includes, in the same order that the rest are ordered -
    alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
    doesn't seem to be any matching order.

    * If the script can't find a place to put a new include (mostly
    because the file doesn't have fitting include block), it prints out
    an error message indicating which .h file needs to be added to the
    file.

    The conversion was done in the following steps.

    1. The initial automatic conversion of all .c files updated slightly
    over 4000 files, deleting around 700 includes and adding ~480 gfp.h
    and ~3000 slab.h inclusions. The script emitted errors for ~400
    files.

    2. Each error was manually checked. Some didn't need the inclusion,
    some needed manual addition while adding it to implementation .h or
    embedding .c file was more appropriate for others. This step added
    inclusions to around 150 files.

    3. The script was run again and the output was compared to the edits
    from #2 to make sure no file was left behind.

    4. Several build tests were done and a couple of problems were fixed.
    e.g. lib/decompress_*.c used malloc/free() wrappers around slab
    APIs requiring slab.h to be added manually.

    5. The script was run on all .h files but without automatically
    editing them as sprinkling gfp.h and slab.h inclusions around .h
    files could easily lead to inclusion dependency hell. Most gfp.h
    inclusion directives were ignored as stuff from gfp.h was usually
    wildly available and often used in preprocessor macros. Each
    slab.h inclusion directive was examined and added manually as
    necessary.

    6. percpu.h was updated not to include slab.h.

    7. Build test were done on the following configurations and failures
    were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
    distributed build env didn't work with gcov compiles) and a few
    more options had to be turned off depending on archs to make things
    build (like ipr on powerpc/64 which failed due to missing writeq).

    * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
    * powerpc and powerpc64 SMP allmodconfig
    * sparc and sparc64 SMP allmodconfig
    * ia64 SMP allmodconfig
    * s390 SMP allmodconfig
    * alpha SMP allmodconfig
    * um on x86_64 SMP allmodconfig

    8. percpu.h modifications were reverted so that it could be applied as
    a separate patch and serve as bisection point.

    Given the fact that I had only a couple of failures from tests on step
    6, I'm fairly confident about the coverage of this conversion patch.
    If there is a breakage, it's likely to be something in one of the arch
    headers which should be easily discoverable easily on most builds of
    the specific arch.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

24 Mar, 2010

2 commits


08 Mar, 2010

2 commits


02 Mar, 2010

1 commit

  • * 'for-2.6.34' of git://git.kernel.dk/linux-2.6-block: (38 commits)
    block: don't access jiffies when initialising io_context
    cfq: remove 8 bytes of padding from cfq_rb_root on 64 bit builds
    block: fix for "Consolidate phys_segment and hw_segment limits"
    cfq-iosched: quantum check tweak
    blktrace: perform cleanup after setup error
    blkdev: fix merge_bvec_fn return value checks
    cfq-iosched: requests "in flight" vs "in driver" clarification
    cciss: Fix problem with scatter gather elements in the scsi half of the driver
    cciss: eliminate unnecessary pointer use in cciss scsi code
    cciss: do not use void pointer for scsi hba data
    cciss: factor out scatter gather chain block mapping code
    cciss: fix scatter gather chain block dma direction kludge
    cciss: simplify scatter gather code
    cciss: factor out scatter gather chain block allocation and freeing
    cciss: detect bad alignment of scsi commands at build time
    cciss: clarify command list padding calculation
    cfq-iosched: rethink seeky detection for SSDs
    cfq-iosched: rework seeky detection
    block: remove padding from io_context on 64bit builds
    block: Consolidate phys_segment and hw_segment limits
    ...

    Linus Torvalds
     

27 Feb, 2010

4 commits

  • Signed-off-by: Alexey Dobriyan
    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Alexey Dobriyan
     
  • Flushing the dasd ccw request queue may stop the processing of the
    block device request queue. Destroy partitions may wait for
    outstanding requests and thus hang.
    Swapping dasd_destroy_partitions and dasd_flush_request_queue so that
    the request queue is empty before dasd_destroy_partitions is called.

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

    Stefan Haberland
     
  • The function dasd_device_from_cdev returns a reference to the dasd
    device and increases the refcount by one. If an exception occurs,
    the refcount was not decreased in all cases
    e.g. in dasd_discipline_show.
    Prevent the offline processing from hang by correcting two functions
    to decrease the refcount even if an error occured.

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

    Stefan Haberland
     
  • Setting a DASD online and offline in quick succession may cause
    a kernel panic or let the chhccwdev command wait forever.
    The Online process is split into two parts. After the first part
    is finished the offline process may be called. This may result
    in a situation where the second online processing part tries to
    set the DASD offline as well.
    Use a mutex to protect online and offline against each other.
    Also correct some checking.

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

    Stefan Haberland
     

26 Feb, 2010

2 commits


27 Jan, 2010

1 commit


14 Jan, 2010

2 commits


19 Dec, 2009

2 commits


16 Dec, 2009

2 commits

  • Makes use of skip_spaces() defined in lib/string.c for removing leading
    spaces from strings all over the tree.

    It decreases lib.a code size by 47 bytes and reuses the function tree-wide:
    text data bss dec hex filename
    64688 584 592 65864 10148 (TOTALS-BEFORE)
    64641 584 592 65817 10119 (TOTALS-AFTER)

    Also, while at it, if we see (*str && isspace(*str)), we can be sure to
    remove the first condition (*str) as the second one (isspace(*str)) also
    evaluates to 0 whenever *str == 0, making it redundant. In other words,
    "a char equals zero is never a space".

    Julia Lawall tried the semantic patch (http://coccinelle.lip6.fr) below,
    and found occurrences of this pattern on 3 more files:
    drivers/leds/led-class.c
    drivers/leds/ledtrig-timer.c
    drivers/video/output.c

    @@
    expression str;
    @@

    ( // ignore skip_spaces cases
    while (*str && isspace(*str)) { \(str++;\|++str;\) }
    |
    - *str &&
    isspace(*str)
    )

    Signed-off-by: André Goddard Rosa
    Cc: Julia Lawall
    Cc: Martin Schwidefsky
    Cc: Jeff Dike
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: "H. Peter Anvin"
    Cc: Richard Purdie
    Cc: Neil Brown
    Cc: Kyle McMartin
    Cc: Henrique de Moraes Holschuh
    Cc: David Howells
    Cc:
    Cc: Samuel Ortiz
    Cc: Patrick McHardy
    Cc: Takashi Iwai
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    André Goddard Rosa
     
  • Signed-off-by: Alexey Dobriyan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     

10 Dec, 2009

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (42 commits)
    tree-wide: fix misspelling of "definition" in comments
    reiserfs: fix misspelling of "journaled"
    doc: Fix a typo in slub.txt.
    inotify: remove superfluous return code check
    hdlc: spelling fix in find_pvc() comment
    doc: fix regulator docs cut-and-pasteism
    mtd: Fix comment in Kconfig
    doc: Fix IRQ chip docs
    tree-wide: fix assorted typos all over the place
    drivers/ata/libata-sff.c: comment spelling fixes
    fix typos/grammos in Documentation/edac.txt
    sysctl: add missing comments
    fs/debugfs/inode.c: fix comment typos
    sgivwfb: Make use of ARRAY_SIZE.
    sky2: fix sky2_link_down copy/paste comment error
    tree-wide: fix typos "couter" -> "counter"
    tree-wide: fix typos "offest" -> "offset"
    fix kerneldoc for set_irq_msi()
    spidev: fix double "of of" in comment
    comment typo fix: sybsystem -> subsystem
    ...

    Linus Torvalds
     

07 Dec, 2009

8 commits

  • Signed-off-by: Martin Schwidefsky

    Martin Schwidefsky
     
  • The first DASD that is set online for a specific logical control unit
    has to do certain setup steps on the storage server to make full use
    of it, for example it will enable PAV.
    The features and characteristics reported by the storage server will
    depend on this setup, so all other devices on the same LCU will need
    to wait for the setup to be finished.

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

    Stefan Weinhuber
     
  • Remove strings from s390 debugfeature entries that could lead to a
    crash when the data is read from dbf because the strings do not exist
    any more.

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

    Stefan Haberland
     
  • Most of the error conditions reported by a FICON storage server
    indicate situations which can be recovered. Sometimes the host just
    needs to retry an I/O request, but sometimes the recovery
    is more complex and requires the device driver to wait, choose
    a different path, etc.

    The DASD device driver has a fully featured error recovery
    for normal block layer I/O, but not for internal I/O request which
    are for example used during the device bring up.
    This can lead to situations where the IPL of a system fails because
    DASD devices are not properly recognized.
    This patch will extend the internal I/O handling to use the existing
    error recovery procedures.

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

    Stefan Weinhuber
     
  • The DASD device driver needs to explicitly enable the prefix command
    on the storage server, before it can be used. Originally we enabled
    this command along with others only if we wanted to support PAV.
    However, today we require this command for other features like
    High Performance FICON as well, so we need to always enable prefix.

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

    Stefan Weinhuber
     
  • the todclk.h header file is dead code. Remove it.

    Signed-off-by: Christian Borntraeger
    Signed-off-by: Martin Schwidefsky

    Christian Borntraeger
     
  • When a DASD device is used with the DIAG discipline, the DIAG
    initialization will indicate success or error with a respective
    return code. So far we have interpreted a return code of 4 as error,
    but it actually means that the initialization was successful, but
    the device is read-only. To allow read-only devices to be used with
    DIAG we need to accept a return code of 4 as success.

    Re-initialization of the DIAG access is also part of the DIAG error
    recovery. If we find that the access mode of a device has been
    changed from writable to read-only while the device was in use,
    we print an error message.

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

    Stefan Weinhuber
     
  • Split setting (driver wants feature enabled) and status (feature
    setup was successful) for PGID related ccw device features so that
    setup errors can be detected. Previously, incorrectly handled setup
    errors could in rare cases lead to erratic I/O behavior and
    permanently unusuable devices.

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

    Peter Oberparleiter
     

04 Dec, 2009

1 commit


14 Oct, 2009

2 commits


06 Oct, 2009

1 commit

  • There is a race while re-reading the device characteristics. After
    cleaning the memory area a cqr is build which reads the device
    characteristics. This may take a rather long time and the device
    characteristics structure is zero during this. Now it could be
    possible that the block tasklet starts working and a new cqr will be
    build. The build_cp command refers to the device characteristics
    structure and this may lead into a divide by zero exception.
    Fix this by re-reading the device characteristics into a temporary
    structur and copy the data to the original structure. Also take the
    ccwdev_lock.

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

    Stefan Haberland
     

24 Sep, 2009

1 commit

  • * 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6: (22 commits)
    [S390] Update default configuration.
    [S390] hibernate: Do real CPU swap at resume time
    [S390] dasd: tolerate devices that have no feature codes
    [S390] zcrypt: Do not add/remove devices in s/r callbacks
    [S390] hibernate: make sure pfn_is_nosave handles lowcore pages
    [S390] smp: introduce LC_ORDER and simplify lowcore handling
    [S390] ptrace: use common code for simple peek/poke operations
    [S390] fix disabled_wait inline assembly clobber list
    [S390] Change kernel_page_present coding style.
    [S390] hibernation: reset system after resume
    [S390] hibernation: fix guest page hinting related crash
    [S390] Get rid of init_module/delete_module compat functions.
    [S390] Convert sys_execve to function with parameters.
    [S390] Convert sys_clone to function with parameters.
    [S390] qdio: change state of all primed input buffers
    [S390] qdio: reduce per device debug messages
    [S390] cio: introduce consistent subchannel scanning
    [S390] cio: idset use actual number of ssids
    [S390] cio: dont kfree vmalloced memory
    [S390] cio: introduce css_settle
    ...

    Linus Torvalds
     

23 Sep, 2009

1 commit

  • The DASD device driver reads the feature codes of a device during
    device initialization. These codes are later used to determine the
    availability of advanced features like PAV or High Performance FICON.
    Some very old devices do not support the command to read feature
    codes and the initialization routine fails.
    As the feature codes are not necessary for basic DASD operations, we
    can support such devices by just ignoring missing feature codes.

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

    Stefan Weinhuber
     

22 Sep, 2009

2 commits

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (34 commits)
    trivial: fix typo in aic7xxx comment
    trivial: fix comment typo in drivers/ata/pata_hpt37x.c
    trivial: typo in kernel-parameters.txt
    trivial: fix typo in tracing documentation
    trivial: add __init/__exit macros in drivers/gpio/bt8xxgpio.c
    trivial: add __init macro/ fix of __exit macro location in ipmi_poweroff.c
    trivial: remove unnecessary semicolons
    trivial: Fix duplicated word "options" in comment
    trivial: kbuild: remove extraneous blank line after declaration of usage()
    trivial: improve help text for mm debug config options
    trivial: doc: hpfall: accept disk device to unload as argument
    trivial: doc: hpfall: reduce risk that hpfall can do harm
    trivial: SubmittingPatches: Fix reference to renumbered step
    trivial: fix typos "man[ae]g?ment" -> "management"
    trivial: media/video/cx88: add __init/__exit macros to cx88 drivers
    trivial: fix typo in CONFIG_DEBUG_FS in gcov doc
    trivial: fix missing printk space in amd_k7_smp_check
    trivial: fix typo s/ketymap/keymap/ in comment
    trivial: fix typo "to to" in multiple files
    trivial: fix typos in comments s/DGBU/DBGU/
    ...

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

    Alexey Dobriyan