13 Sep, 2013

1 commit


12 Sep, 2013

22 commits

  • Fix thinkos where pkt_ needs a valid pktcdvd_device * and the
    pointer is known to be NULL.

    Signed-off-by: Joe Perches
    Reported-by: Dan Carpenter (go smatch!)
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Allow the device name to be emitted with pkt_err when logging the sense
    data.

    Signed-off-by: Joe Perches
    Cc: Jiri Kosina
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Add a new pkt_info macro to prefix the name to the logging output.

    Signed-off-by: Joe Perches
    Cc: Jiri Kosina
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Add a new pkt_notice macro to prefix the name to the logging output.

    Signed-off-by: Joe Perches
    Cc: Jiri Kosina
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Add a new pkt_err macro to prefix the name to the logging output. Convert
    pr_err where there is a non-null struct pktcdvd_device.

    Includes improvements from Andy Shevchenko.

    Signed-off-by: Joe Perches
    Cc: Andy Shevchenko
    Cc: Jiri Kosina
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Add pd->name to output for these debugging messages.

    Remove normally compiled out pkt_dbg(2, ...) function entry tracing
    equivalents as it's better done via the function tracer.

    Signed-off-by: Joe Perches
    Cc: Jiri Kosina
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Use the more common pkt_dbg(level, fmt, ...) form.

    These messages are emitted at KERN_NOTICE.

    Always emit function name with pkt_dbg(2, ...) uses and remove the
    sometimes abbreviated embedded function name.

    This form always verifies the format and arguments.

    Signed-off-by: Joe Perches
    Cc: Jiri Kosina
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Use a more current logging style and add messages levels to the logging
    messages.

    Simplify pkt_dump_sense by using %*ph and adding a simple function to emit
    the sense string.

    Includes improvements from Andy Shevchenko and Dan Carpenter.

    Signed-off-by: Joe Perches
    Cc: Andy Shevchenko
    Cc: Dan Carpenter
    Cc: Jiri Kosina
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Macros should be converted to functions where feasible to
    verify arguments and the like.

    Signed-off-by: Joe Perches
    Cc: Jiri Kosina
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • If the system has trouble allocating memory for the creation of the aoe
    debugfs directory or of a file inside it, the debugfs member of an aoedev
    can be NULL.

    Do not treat a NULL debugfs pointer as a BUG on aoedev shutdown, avoiding
    the user impact of an unecessary panic.

    Signed-off-by: Ed Cashin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ed Cashin
     
  • This patch fixes following compiler warnings:

    drivers/block/aoe/aoecmd.c: In function `aoecmd_ata_rw':
    drivers/block/aoe/aoecmd.c:383:17: warning: variable `t' set but not used [-Wunused-but-set-variable]
    struct aoetgt *t;
    ^
    drivers/block/aoe/aoecmd.c: In function `resend':
    drivers/block/aoe/aoecmd.c:488:21: warning: variable `ah' set but not used [-Wunused-but-set-variable]
    struct aoe_atahdr *ah;
    ^

    Signed-off-by: Andy Shevchenko
    Cc: Ed Cashin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Shevchenko
     
  • In the kernel we have a nice helper that may be used here. This patch
    substitutes the custom implementation by the native function call.

    Signed-off-by: Andy Shevchenko
    Cc: Ed Cashin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Shevchenko
     
  • Signed-off-by: Ed Cashin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ed Cashin
     
  • Signed-off-by: Ed Cashin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ed Cashin
     
  • This information is presented in a compact format that has evolved for
    easy routine scanning by expert humans, mostly developers and support
    technicians helping to troubleshoot or test AoE-based systems.

    Signed-off-by: Ed Cashin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ed Cashin
     
  • The place holder in the file contents is filled out in the following
    patch.

    Signed-off-by: Ed Cashin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ed Cashin
     
  • Signed-off-by: Ed Cashin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ed Cashin
     
  • This series adds the debugging information that the coraid.com-distributed
    aoe driver exports via sysfs, but instead of sysfs, it uses debugfs.

    With these patches applied, even without AoE targets on the network, KEDR
    reports new possible memory leaks, but these are from callers outside the
    aoe driver that have used aoe_devnode to get the name of the character
    devices through the aoe_class->devnode callback, and I believe they're
    responsible for freeing that memory.

    This patch:

    Create and destroy the debugfs directory.

    Signed-off-by: Ed Cashin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ed Cashin
     
  • The driver core clears the driver data to NULL after device_release or
    on probe failure. Thus, it is not needed to manually clear the device
    driver data to NULL.

    Signed-off-by: Jingoo Han
    Cc: Jean Delvare
    Cc: Jens Axboe
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han
     
  • 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
     
  • mg_times_out() is used only in this file. Fix the following sparse
    warning:

    drivers/block/mg_disk.c:639:6: warning: symbol 'mg_times_out' was not declared. Should it be static?

    Signed-off-by: Jingoo Han
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han
     
  • The use of strict_strtoul() is not preferred, because strict_strtoul() is
    obsolete. Thus, kstrtoul() should be used.

    Signed-off-by: Jingoo Han
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han
     

10 Sep, 2013

1 commit

  • Pull ceph updates from Sage Weil:
    "This includes both the first pile of Ceph patches (which I sent to
    torvalds@vger, sigh) and a few new patches that add support for
    fscache for Ceph. That includes a few fscache core fixes that David
    Howells asked go through the Ceph tree. (Thanks go to Milosz Tanski
    for putting this feature together)

    This first batch of patches (included here) had (has) several
    important RBD bug fixes, hole punch support, several different
    cleanups in the page cache interactions, improvements in the truncate
    code (new truncate mutex to avoid shenanigans with i_mutex), and a
    series of fixes in the synchronous striping read/write code.

    On top of that is a random collection of small fixes all across the
    tree (error code checks and error path cleanup, obsolete wq flags,
    etc)"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: (43 commits)
    ceph: use d_invalidate() to invalidate aliases
    ceph: remove ceph_lookup_inode()
    ceph: trivial buildbot warnings fix
    ceph: Do not do invalidate if the filesystem is mounted nofsc
    ceph: page still marked private_2
    ceph: ceph_readpage_to_fscache didn't check if marked
    ceph: clean PgPrivate2 on returning from readpages
    ceph: use fscache as a local presisent cache
    fscache: Netfs function for cleanup post readpages
    FS-Cache: Fix heading in documentation
    CacheFiles: Implement interface to check cache consistency
    FS-Cache: Add interface to check consistency of a cached object
    rbd: fix null dereference in dout
    rbd: fix buffer size for writes to images with snapshots
    libceph: use pg_num_mask instead of pgp_num_mask for pg.seed calc
    rbd: fix I/O error propagation for reads
    ceph: use vfs __set_page_dirty_nobuffers interface instead of doing it inside filesystem
    ceph: allow sync_read/write return partial successed size of read/write.
    ceph: fix bugs about handling short-read for sync read mode.
    ceph: remove useless variable revoked_rdcache
    ...

    Linus Torvalds
     

08 Sep, 2013

1 commit

  • Pull NVM Express driver update from Matthew Wilcox.

    * git://git.infradead.org/users/willy/linux-nvme:
    NVMe: Merge issue on character device bring-up
    NVMe: Handle ioremap failure
    NVMe: Add pci suspend/resume driver callbacks
    NVMe: Use normal shutdown
    NVMe: Separate controller init from disk discovery
    NVMe: Separate queue alloc/free from create/delete
    NVMe: Group pci related actions in functions
    NVMe: Disk stats for read/write commands only
    NVMe: Bring up cdev on set feature failure
    NVMe: Fix checkpatch issues
    NVMe: Namespace IDs are unsigned
    NVMe: Update nvme_id_power_state with latest spec
    NVMe: Split header file into user-visible and kernel-visible pieces
    NVMe: Call nvme_process_cq from submission path
    NVMe: Remove "process_cq did something" message
    NVMe: Return correct value from interrupt handler
    NVMe: Disk IO statistics
    NVMe: Restructure MSI / MSI-X setup
    NVMe: Use kzalloc instead of kmalloc+memset

    Linus Torvalds
     

07 Sep, 2013

2 commits

  • A recent patch made it possible to bring up the character handle when the
    device is responsive but not accepting a set-features command. Another
    recent patch moved the initialization that requires we move where the
    checks for this condition occur. This patch merges these two ideas so
    it works much as before.

    Signed-off-by: Keith Busch
    Signed-off-by: Matthew Wilcox

    Keith Busch
     
  • Pull trivial tree from Jiri Kosina:
    "The usual trivial updates all over the tree -- mostly typo fixes and
    documentation updates"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (52 commits)
    doc: Documentation/cputopology.txt fix typo
    treewide: Convert retrun typos to return
    Fix comment typo for init_cma_reserved_pageblock
    Documentation/trace: Correcting and extending tracepoint documentation
    mm/hotplug: fix a typo in Documentation/memory-hotplug.txt
    power: Documentation: Update s2ram link
    doc: fix a typo in Documentation/00-INDEX
    Documentation/printk-formats.txt: No casts needed for u64/s64
    doc: Fix typo "is is" in Documentations
    treewide: Fix printks with 0x%#
    zram: doc fixes
    Documentation/kmemcheck: update kmemcheck documentation
    doc: documentation/hwspinlock.txt fix typo
    PM / Hibernate: add section for resume options
    doc: filesystems : Fix typo in Documentations/filesystems
    scsi/megaraid fixed several typos in comments
    ppc: init_32: Fix error typo "CONFIG_START_KERNEL"
    treewide: Add __GFP_NOWARN to k.alloc calls with v.alloc fallbacks
    page_isolation: Fix a comment typo in test_pages_isolated()
    doc: fix a typo about irq affinity
    ...

    Linus Torvalds
     

04 Sep, 2013

13 commits

  • The order parameter is sometimes NULL in _rbd_dev_v2_snap_size(), but
    the dout() always derefences it. Move this to another dout() protected
    by a check that order is non-NULL.

    Signed-off-by: Josh Durgin
    Reviewed-by: Sage Weil
    Reviewed-by: Alex Elder

    Josh Durgin
     
  • rbd_osd_req_create() needs to know the snapshot context size to create
    a buffer large enough to send it with the message front. It gets this
    from the img_request, which was not set for the obj_request yet. This
    resulted in trying to write past the end of the front payload, hitting
    this BUG:

    libceph: BUG_ON(p > msg->front.iov_base + msg->front.iov_len);

    Fix this by associating the obj_request with its img_request
    immediately after it's created, before the osd request is created.

    Fixes: http://tracker.ceph.com/issues/5760
    Suggested-by: Alex Elder
    Signed-off-by: Josh Durgin
    Reviewed-by: Alex Elder

    Josh Durgin
     
  • When a request returns an error, the driver needs to report the entire
    extent of the request as completed. Writes already did this, since
    they always set xferred = length, but reads were skipping that step if
    an error other than -ENOENT occurred. Instead, rbd would end up
    passing 0 xferred to blk_end_request(), which would always report
    needing more data. This resulted in an assert failing when more data
    was required by the block layer, but all the object requests were
    done:

    [ 1868.719077] rbd: obj_request read result -108 xferred 0
    [ 1868.719077]
    [ 1868.719518] end_request: I/O error, dev rbd1, sector 0
    [ 1868.719739]
    [ 1868.719739] Assertion failure in rbd_img_obj_callback() at line 1736:
    [ 1868.719739]
    [ 1868.719739] rbd_assert(more ^ (which == img_request->obj_request_count));

    Without this assert, reads that hit errors would hang forever, since
    the block layer considered them incomplete.

    Fixes: http://tracker.ceph.com/issues/5647
    CC: stable@vger.kernel.org # v3.10
    Signed-off-by: Josh Durgin
    Reviewed-by: Alex Elder

    Josh Durgin
     
  • Decrement the number of queues required for doorbell remapping until
    the memory is successfully mapped for that size.

    Additional checks are done so that we don't call free_irq if it has
    already been freed.

    Signed-off-by: Keith Busch
    Signed-off-by: Matthew Wilcox

    Keith Busch
     
  • Used for going in and out of low power states. Resuming reuses the IO
    queues from the previous initialization, freeing any allocated queues
    that are no longer usable.

    Signed-off-by: Keith Busch
    Signed-off-by: Matthew Wilcox

    Keith Busch
     
  • The NVMe spec recommends using the shutdown normal sequence when safely
    taking the controller offline instead of hitting CC.EN on the next
    start-up to reset the controller. The spec recommends a minimum of 1
    second for the shutdown complete. This patch waits 2 seconds to be on
    the safe side.

    Signed-off-by: Keith Busch
    Signed-off-by: Matthew Wilcox

    Keith Busch
     
  • This combines the controller initialization into one function, removing
    IO queue setup from namespace discovery, and creates symetric functions
    for device removal. The controller start and shutdown functions can now
    be called from resume/suspend context as well as probe/remove.

    Signed-off-by: Keith Busch
    Signed-off-by: Matthew Wilcox

    Keith Busch
     
  • This separates nvme queue allocation from creation, and queue deletion
    from freeing. This is so that we may in the future temporarily disable
    queues and reuse the same memory when bringing them back online, like
    coming back from suspend state.

    Signed-off-by: Keith Busch
    Signed-off-by: Matthew Wilcox

    Keith Busch
     
  • This will make it easier to reuse these outside probe/remove.

    Signed-off-by: Keith Busch
    Signed-off-by: Matthew Wilcox

    Keith Busch
     
  • Flush and discard requests would previously mess up the accounting.

    Signed-off-by: Keith Busch
    Signed-off-by: Matthew Wilcox

    Keith Busch
     
  • This patch creates the character device as long as a device's admin queues
    are usable so a user has an opprotunity to perform administration tasks.
    A device may be in a state that does not allow IO and setting the queue
    count feature in such a state returns an error. Previously the driver
    would bail and the controller would be unusable.

    Signed-off-by: Keith Busch

    Keith Busch
     
  • Signed-off-by: Keith Busch

    Keith Busch
     
  • The 'Number of Namespaces' read from the device was being treated as
    signed, which would cause us to not scan any namespaces for a device
    with more than 2 billion namespaces. That led to noticing that the
    namespace ID was also being treated as signed, which could lead to the
    result from NVME_IOCTL_ID being treated as an error code.

    Signed-off-by: Matthew Wilcox

    Matthew Wilcox