12 Sep, 2013

1 commit

  • At one time we used to set the maximum number of scatter gather elements
    on all Smart Array controllers to 32. At some point in time the
    firmware began to write the "appropriate" value for each controller into
    the config table. The cciss driver would then read that and set
    h->maxsgentries.

    h->maxsgentries = readl(&(h->cfgtable->MaxSGElements);

    On the P600 that value is 544. Under some workloads a significant
    performance reduction may result. This patch forces the P600 to use
    only 32 scatter gather elements. Other controllers are not affected.

    Signed-off-by: Mike Miller
    Signed-off-by: Dwight (Bud) Brown
    Signed-off-by: Tomas Henzl
    Acked-by: Stephen M. Cameron
    Cc: Jens Axboe
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Miller
     

13 Jun, 2013

1 commit

  • If a new logical drive is added and the CCISS_REGNEWD ioctl is invoked
    (as is normal with the Array Configuration Utility) the process will
    hang as below. It attempts to acquire the same mutex twice, once in
    do_ioctl() and once in cciss_unlocked_open(). The BKL was recursive,
    the mutex isn't.

    Linux version 3.10.0-rc2 (scameron@localhost.localdomain) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC) ) #1 SMP Fri May 24 14:32:12 CDT 2013
    [...]
    acu D 0000000000000001 0 3246 3191 0x00000080
    Call Trace:
    schedule+0x29/0x70
    schedule_preempt_disabled+0xe/0x10
    __mutex_lock_slowpath+0x17b/0x220
    mutex_lock+0x2b/0x50
    cciss_unlocked_open+0x2f/0x110 [cciss]
    __blkdev_get+0xd3/0x470
    blkdev_get+0x5c/0x1e0
    register_disk+0x182/0x1a0
    add_disk+0x17c/0x310
    cciss_add_disk+0x13a/0x170 [cciss]
    cciss_update_drive_info+0x39b/0x480 [cciss]
    rebuild_lun_table+0x258/0x370 [cciss]
    cciss_ioctl+0x34f/0x470 [cciss]
    do_ioctl+0x49/0x70 [cciss]
    __blkdev_driver_ioctl+0x28/0x30
    blkdev_ioctl+0x200/0x7b0
    block_ioctl+0x3c/0x40
    do_vfs_ioctl+0x89/0x350
    SyS_ioctl+0xa1/0xb0
    system_call_fastpath+0x16/0x1b

    This mutex usage was added into the ioctl path when the big kernel lock
    was removed. As it turns out, these paths are all thread safe anyway
    (or can easily be made so) and we don't want ioctl() to be single
    threaded in any case.

    Signed-off-by: Stephen M. Cameron
    Cc: Jens Axboe
    Cc: Mike Miller
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen M. Cameron
     

09 May, 2013

1 commit

  • Pull block driver updates from Jens Axboe:
    "It might look big in volume, but when categorized, not a lot of
    drivers are touched. The pull request contains:

    - mtip32xx fixes from Micron.

    - A slew of drbd updates, this time in a nicer series.

    - bcache, a flash/ssd caching framework from Kent.

    - Fixes for cciss"

    * 'for-3.10/drivers' of git://git.kernel.dk/linux-block: (66 commits)
    bcache: Use bd_link_disk_holder()
    bcache: Allocator cleanup/fixes
    cciss: bug fix to prevent cciss from loading in kdump crash kernel
    cciss: add cciss_allow_hpsa module parameter
    drivers/block/mg_disk.c: add CONFIG_PM_SLEEP to suspend/resume functions
    mtip32xx: Workaround for unaligned writes
    bcache: Make sure blocksize isn't smaller than device blocksize
    bcache: Fix merge_bvec_fn usage for when it modifies the bvm
    bcache: Correctly check against BIO_MAX_PAGES
    bcache: Hack around stuff that clones up to bi_max_vecs
    bcache: Set ra_pages based on backing device's ra_pages
    bcache: Take data offset from the bdev superblock.
    mtip32xx: mtip32xx: Disable TRIM support
    mtip32xx: fix a smatch warning
    bcache: Disable broken btree fuzz tester
    bcache: Fix a format string overflow
    bcache: Fix a minor memory leak on device teardown
    bcache: Documentation updates
    bcache: Use WARN_ONCE() instead of __WARN()
    bcache: Add missing #include
    ...

    Linus Torvalds
     

07 May, 2013

1 commit


02 May, 2013

1 commit

  • Pull VFS updates from Al Viro,

    Misc cleanups all over the place, mainly wrt /proc interfaces (switch
    create_proc_entry to proc_create(), get rid of the deprecated
    create_proc_read_entry() in favor of using proc_create_data() and
    seq_file etc).

    7kloc removed.

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (204 commits)
    don't bother with deferred freeing of fdtables
    proc: Move non-public stuff from linux/proc_fs.h to fs/proc/internal.h
    proc: Make the PROC_I() and PDE() macros internal to procfs
    proc: Supply a function to remove a proc entry by PDE
    take cgroup_open() and cpuset_open() to fs/proc/base.c
    ppc: Clean up scanlog
    ppc: Clean up rtas_flash driver somewhat
    hostap: proc: Use remove_proc_subtree()
    drm: proc: Use remove_proc_subtree()
    drm: proc: Use minor->index to label things, not PDE->name
    drm: Constify drm_proc_list[]
    zoran: Don't print proc_dir_entry data in debug
    reiserfs: Don't access the proc_dir_entry in r_open(), r_start() r_show()
    proc: Supply an accessor for getting the data from a PDE's parent
    airo: Use remove_proc_subtree()
    rtl8192u: Don't need to save device proc dir PDE
    rtl8187se: Use a dir under /proc/net/r8180/
    proc: Add proc_mkdir_data()
    proc: Move some bits from linux/proc_fs.h to linux/{of.h,signal.h,tty.h}
    proc: Move PDE_NET() to fs/proc/proc_net.c
    ...

    Linus Torvalds
     

30 Apr, 2013

2 commits

  • By default the cciss driver supports all "older" HP Smart Array
    controllers and hpsa supports all controllers starting with the G6 family.
    There are module parameters that allow a user to override those defaults
    and use hpsa for any HP Smart Array controller.

    If the user does override the default behavior and uses hpsa for older
    controllers it is possible that cciss may try to load in a kdump crash
    kernel. This may happen if cciss is loaded first from the kdump initrd
    image. If cciss does load rather than hpsa and reset_devices is true we
    immediately call cciss_hard_reset_controller. This will result in a
    kernel panic and the core file cannot be created. This patch prevents
    cciss from trying to load in this scenario.

    Signed-off-by: Mike Miller
    Cc: Jens Axboe
    Signed-off-by: Andrew Morton
    Signed-off-by: Jens Axboe

    Mike Miller
     
  • Add the cciss_allow_hpsa modules parameter. This allows users to use the
    hpsa driver instead of cciss for older controllers.

    Signed-off-by: Mike Miller
    Cc: Jens Axboe
    Signed-off-by: Andrew Morton
    Signed-off-by: Jens Axboe

    Mike Miller
     

10 Apr, 2013

1 commit

  • The only part of proc_dir_entry the code outside of fs/proc
    really cares about is PDE(inode)->data. Provide a helper
    for that; static inline for now, eventually will be moved
    to fs/proc, along with the knowledge of struct proc_dir_entry
    layout.

    Signed-off-by: Al Viro

    Al Viro
     

23 Mar, 2013

1 commit


04 Jan, 2013

1 commit

  • CONFIG_HOTPLUG is going away as an option. As a result, the __dev*
    markings need to be removed.

    This change removes the use of __devinit, __devexit_p, __devinitdata,
    __devinitconst, and __devexit from these drivers.

    Based on patches originally written by Bill Pemberton, but redone by me
    in order to handle some of the coding style issues better, by hand.

    Cc: Bill Pemberton
    Cc: Mike Miller
    Cc: Chirag Kantharia
    Cc: Geoff Levand
    Cc: Jim Paris
    Cc: Rusty Russell
    Cc: "Michael S. Tsirkin"
    Cc: Grant Likely
    Cc: Matthew Wilcox
    Cc: Keith Busch
    Cc: "David S. Miller"
    Cc: Benjamin Herrenschmidt
    Cc: NeilBrown
    Cc: Jens Axboe
    Cc: Tao Guo
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

18 Dec, 2012

1 commit

  • Pull block driver update from Jens Axboe:
    "Now that the core bits are in, here are the driver bits for 3.8. The
    branch contains:

    - A huge pile of drbd bits that were dumped from the 3.7 merge
    window. Following that, it was both made perfectly clear that
    there is going to be no more over-the-wall pulls and how the
    situation on individual pulls can be improved.

    - A few cleanups from Akinobu Mita for drbd and cciss.

    - Queue improvement for loop from Lukas. This grew into adding a
    generic interface for waiting/checking an even with a specific
    lock, allowing this to be pulled out of md and now loop and drbd is
    also using it.

    - A few fixes for xen back/front block driver from Roger Pau Monne.

    - Partition improvements from Stephen Warren, allowing partiion UUID
    to be used as an identifier."

    * 'for-3.8/drivers' of git://git.kernel.dk/linux-block: (609 commits)
    drbd: update Kconfig to match current dependencies
    drbd: Fix drbdsetup wait-connect, wait-sync etc... commands
    drbd: close race between drbd_set_role and drbd_connect
    drbd: respect no-md-barriers setting also when changed online via disk-options
    drbd: Remove obsolete check
    drbd: fixup after wait_even_lock_irq() addition to generic code
    loop: Limit the number of requests in the bio list
    wait: add wait_event_lock_irq() interface
    xen-blkfront: free allocated page
    xen-blkback: move free persistent grants code
    block: partition: msdos: provide UUIDs for partitions
    init: reduce PARTUUID min length to 1 from 36
    block: store partition_meta_info.uuid as a string
    cciss: use check_signature()
    cciss: cleanup bitops usage
    drbd: use copy_highpage
    drbd: if the replication link breaks during handshake, keep retrying
    drbd: check return of kmalloc in receive_uuids
    drbd: Broadcast sync progress no more often than once per second
    drbd: don't try to clear bits once the disk has failed
    ...

    Linus Torvalds
     

23 Nov, 2012

2 commits

  • Use check_signature() to find a signature in the mmio address.

    Signed-off-by: Akinobu Mita
    Cc: Mike Miller
    Cc: Stephen M. Cameron
    Signed-off-by: Andrew Morton
    Signed-off-by: Jens Axboe

    Akinobu Mita
     
  • - Remove unnecessary correction of bit and address
    - Use BITS_TO_LONGS macro to calculate bitmap size
    - Use bitmap_zero()

    Signed-off-by: Akinobu Mita
    Cc: Mike Miller
    Cc: Stephen M. Cameron
    Signed-off-by: Andrew Morton
    Signed-off-by: Jens Axboe

    Akinobu Mita
     

30 Oct, 2012

1 commit

  • The memory return by kzalloc() or kmem_cache_zalloc() has already be set
    to zero, so remove useless memset(0).

    spatch with a semantic match is used to found this problem.
    (http://coccinelle.lip6.fr/)

    Signed-off-by: Wei Yongjun
    Cc: Mike Miller
    Cc: Jens Axboe
    Cc: Stephen M. Cameron
    Signed-off-by: Andrew Morton
    Signed-off-by: Jens Axboe

    Wei Yongjun
     

15 Jan, 2012

1 commit

  • Introduce a wrapper around scsi_cmd_ioctl that takes a block device.

    The function will then be enhanced to detect partition block devices
    and, in that case, subject the ioctls to whitelisting.

    Cc: linux-scsi@vger.kernel.org
    Cc: Jens Axboe
    Cc: James Bottomley
    Signed-off-by: Paolo Bonzini
    Signed-off-by: Linus Torvalds

    Paolo Bonzini
     

29 Nov, 2011

2 commits


16 Nov, 2011

1 commit

  • A long time ago, probably in 2002, one of the distros, or maybe more than
    one, loaded block drivers prior to loading the SCSI mid layer. This meant
    that the cciss driver, being a block driver, could not engage the SCSI mid
    layer at init time without panicking, and relied on being poked by a
    userland program after the system was up (and the SCSI mid layer was
    therefore present) to engage the SCSI mid layer.

    This is no longer the case, and cciss can safely rely on the SCSI mid
    layer being present at init time and engage the SCSI mid layer straight
    away. This means that users will see their tape drives and medium
    changers at driver load time without need for a script in /etc/rc.d that
    does this:

    for x in /proc/driver/cciss/cciss*
    do
    echo "engage scsi" > $x
    done

    However, if no tape drives or medium changers are detected, the SCSI mid
    layer will not be engaged. If a tape drive or medium change is later
    hot-added to the system it will then be necessary to use the above script
    or similar for the device(s) to be acceesible.

    Signed-off-by: Stephen M. Cameron
    Signed-off-by: Andrew Morton
    Signed-off-by: Jens Axboe

    Stephen M. Cameron
     

12 Nov, 2011

1 commit


21 Oct, 2011

1 commit


08 Aug, 2011

2 commits


06 May, 2011

15 commits


12 Mar, 2011

3 commits