01 Feb, 2014

1 commit

  • Pull SCSI target updates from Nicholas Bellinger:
    "The highlights this round include:

    - add support for SCSI Referrals (Hannes)
    - add support for T10 DIF into target core (nab + mkp)
    - add support for T10 DIF emulation in FILEIO + RAMDISK backends (Sagi + nab)
    - add support for T10 DIF -> bio_integrity passthrough in IBLOCK backend (nab)
    - prep changes to iser-target for >= v3.15 T10 DIF support (Sagi)
    - add support for qla2xxx N_Port ID Virtualization - NPIV (Saurav + Quinn)
    - allow percpu_ida_alloc() to receive task state bitmask (Kent)
    - fix >= v3.12 iscsi-target session reset hung task regression (nab)
    - fix >= v3.13 percpu_ref se_lun->lun_ref_active race (nab)
    - fix a long-standing network portal creation race (Andy)"

    * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (51 commits)
    target: Fix percpu_ref_put race in transport_lun_remove_cmd
    target/iscsi: Fix network portal creation race
    target: Report bad sector in sense data for DIF errors
    iscsi-target: Convert gfp_t parameter to task state bitmask
    iscsi-target: Fix connection reset hang with percpu_ida_alloc
    percpu_ida: Make percpu_ida_alloc + callers accept task state bitmask
    iscsi-target: Pre-allocate more tags to avoid ack starvation
    qla2xxx: Configure NPIV fc_vport via tcm_qla2xxx_npiv_make_lport
    qla2xxx: Enhancements to enable NPIV support for QLOGIC ISPs with TCM/LIO.
    qla2xxx: Fix scsi_host leak on qlt_lport_register callback failure
    IB/isert: pass scatterlist instead of cmd to fast_reg_mr routine
    IB/isert: Move fastreg descriptor creation to a function
    IB/isert: Avoid frwr notation, user fastreg
    IB/isert: seperate connection protection domains and dma MRs
    tcm_loop: Enable DIF/DIX modes in SCSI host LLD
    target/rd: Add DIF protection into rd_execute_rw
    target/rd: Add support for protection SGL setup + release
    target/rd: Refactor rd_build_device_space + rd_release_device_space
    target/file: Add DIF protection support to fd_execute_rw
    target/file: Add DIF protection init/format support
    ...

    Linus Torvalds
     

31 Jan, 2014

2 commits

  • Pull block IO driver changes from Jens Axboe:

    - bcache update from Kent Overstreet.

    - two bcache fixes from Nicholas Swenson.

    - cciss pci init error fix from Andrew.

    - underflow fix in the parallel IDE pg_write code from Dan Carpenter.
    I'm sure the 1 (or 0) users of that are now happy.

    - two PCI related fixes for sx8 from Jingoo Han.

    - floppy init fix for first block read from Jiri Kosina.

    - pktcdvd error return miss fix from Julia Lawall.

    - removal of IRQF_SHARED from the SEGA Dreamcast CD-ROM code from
    Michael Opdenacker.

    - comment typo fix for the loop driver from Olaf Hering.

    - potential oops fix for null_blk from Raghavendra K T.

    - two fixes from Sam Bradshaw (Micron) for the mtip32xx driver, fixing
    an OOM problem and a problem with handling security locked conditions

    * 'for-3.14/drivers' of git://git.kernel.dk/linux-block: (47 commits)
    mg_disk: Spelling s/finised/finished/
    null_blk: Null pointer deference problem in alloc_page_buffers
    mtip32xx: Correctly handle security locked condition
    mtip32xx: Make SGL container per-command to eliminate high order dma allocation
    drivers/block/loop.c: fix comment typo in loop_config_discard
    drivers/block/cciss.c:cciss_init_one(): use proper errnos
    drivers/block/paride/pg.c: underflow bug in pg_write()
    drivers/block/sx8.c: remove unnecessary pci_set_drvdata()
    drivers/block/sx8.c: use module_pci_driver()
    floppy: bail out in open() if drive is not responding to block0 read
    bcache: Fix auxiliary search trees for key size > cacheline size
    bcache: Don't return -EINTR when insert finished
    bcache: Improve bucket_prio() calculation
    bcache: Add bch_bkey_equal_header()
    bcache: update bch_bkey_try_merge
    bcache: Move insert_fixup() to btree_keys_ops
    bcache: Convert sorting to btree_keys
    bcache: Convert debug code to btree_keys
    bcache: Convert btree_iter to struct btree_keys
    bcache: Refactor bset_tree sysfs stats
    ...

    Linus Torvalds
     
  • Pull core block IO changes from Jens Axboe:
    "The major piece in here is the immutable bio_ve series from Kent, the
    rest is fairly minor. It was supposed to go in last round, but
    various issues pushed it to this release instead. The pull request
    contains:

    - Various smaller blk-mq fixes from different folks. Nothing major
    here, just minor fixes and cleanups.

    - Fix for a memory leak in the error path in the block ioctl code
    from Christian Engelmayer.

    - Header export fix from CaiZhiyong.

    - Finally the immutable biovec changes from Kent Overstreet. This
    enables some nice future work on making arbitrarily sized bios
    possible, and splitting more efficient. Related fixes to immutable
    bio_vecs:

    - dm-cache immutable fixup from Mike Snitzer.
    - btrfs immutable fixup from Muthu Kumar.

    - bio-integrity fix from Nic Bellinger, which is also going to stable"

    * 'for-3.14/core' of git://git.kernel.dk/linux-block: (44 commits)
    xtensa: fixup simdisk driver to work with immutable bio_vecs
    block/blk-mq-cpu.c: use hotcpu_notifier()
    blk-mq: for_each_* macro correctness
    block: Fix memory leak in rw_copy_check_uvector() handling
    bio-integrity: Fix bio_integrity_verify segment start bug
    block: remove unrelated header files and export symbol
    blk-mq: uses page->list incorrectly
    blk-mq: use __smp_call_function_single directly
    btrfs: fix missing increment of bi_remaining
    Revert "block: Warn and free bio if bi_end_io is not set"
    block: Warn and free bio if bi_end_io is not set
    blk-mq: fix initializing request's start time
    block: blk-mq: don't export blk_mq_free_queue()
    block: blk-mq: make blk_sync_queue support mq
    block: blk-mq: support draining mq queue
    dm cache: increment bi_remaining when bi_end_io is restored
    block: fixup for generic bio chaining
    block: Really silence spurious compiler warnings
    block: Silence spurious compiler warnings
    block: Kill bio_pair_split()
    ...

    Linus Torvalds
     

29 Jan, 2014

1 commit


24 Jan, 2014

1 commit

  • This patch changes percpu_ida_alloc() + callers to accept task state
    bitmask for prepare_to_wait() for code like target/iscsi that needs
    it for interruptible sleep, that is provided in a subsequent patch.

    It now expects TASK_UNINTERRUPTIBLE when the caller is able to sleep
    waiting for a new tag, or TASK_RUNNING when the caller cannot sleep,
    and is forced to return a negative value when no tags are available.

    v2 changes:
    - Include blk-mq + tcm_fc + vhost/scsi + target/iscsi changes
    - Drop signal_pending_state() call
    v3 changes:
    - Only call prepare_to_wait() + finish_wait() when != TASK_RUNNING
    (PeterZ)

    Reported-by: Linus Torvalds
    Cc: Linus Torvalds
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: Jens Axboe
    Signed-off-by: Kent Overstreet
    Cc: #3.12+
    Signed-off-by: Nicholas Bellinger

    Kent Overstreet
     

22 Jan, 2014

3 commits

  • Fix a memory leak in the error handling path of function sg_io()
    that is used during the processing of scsi ioctl. Memory already
    allocated by rw_copy_check_uvector() needs to be freed correctly.
    Detected by Coverity: CID 1128953.

    Signed-off-by: Christian Engelmayer
    Signed-off-by: Jens Axboe

    Christian Engelmayer
     
  • Fix up the following items:

    - remove unrelated header files.
    - export interface function.
    - modify function cmdline_parts_parse return value, this will make
    it more friendly for the caller.

    Signed-off-by: CaiZhiyong
    Cc: Ezequiel Garcia
    CC: Brian Norris
    Cc: "Wanglin (Albert)"
    Cc: Artem Bityutskiy
    Cc: Karel Zak
    Cc: Shmulik Ladkani
    Cc: David Woodhouse
    Cc: Jens Axboe
    Signed-off-by: Andrew Morton
    Signed-off-by: Jens Axboe

    CaiZhiyong
     
  • Pull cgroup updates from Tejun Heo:
    "The bulk of changes are cleanups and preparations for the upcoming
    kernfs conversion.

    - cgroup_event mechanism which is and will be used only by memcg is
    moved to memcg.

    - pidlist handling is updated so that it can be served by seq_file.

    Also, the list is not sorted if sane_behavior. cgroup
    documentation explicitly states that the file is not sorted but it
    has been for quite some time.

    - All cgroup file handling now happens on top of seq_file. This is
    to prepare for kernfs conversion. In addition, all operations are
    restructured so that they map 1-1 to kernfs operations.

    - Other cleanups and low-pri fixes"

    * 'for-3.14' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: (40 commits)
    cgroup: trivial style updates
    cgroup: remove stray references to css_id
    doc: cgroups: Fix typo in doc/cgroups
    cgroup: fix fail path in cgroup_load_subsys()
    cgroup: fix missing unlock on error in cgroup_load_subsys()
    cgroup: remove for_each_root_subsys()
    cgroup: implement for_each_css()
    cgroup: factor out cgroup_subsys_state creation into create_css()
    cgroup: combine css handling loops in cgroup_create()
    cgroup: reorder operations in cgroup_create()
    cgroup: make for_each_subsys() useable under cgroup_root_mutex
    cgroup: css iterations and css_from_dir() are safe under cgroup_mutex
    cgroup: unify pidlist and other file handling
    cgroup: replace cftype->read_seq_string() with cftype->seq_show()
    cgroup: attach cgroup_open_file to all cgroup files
    cgroup: generalize cgroup_pidlist_open_file
    cgroup: unify read path so that seq_file is always used
    cgroup: unify cgroup_write_X64() and cgroup_write_string()
    cgroup: remove cftype->read(), ->read_map() and ->write()
    hugetlb_cgroup: convert away from cftype->read()
    ...

    Linus Torvalds
     

09 Jan, 2014

3 commits

  • 'struct page' has two list_head fields: 'lru' and 'list'. Conveniently,
    they are unioned together. This means that code can use them
    interchangably, which gets horribly confusing.

    The blk-mq made the logical decision to try to use page->list. But, that
    field was actually introduced just for the slub code. ->lru is the right
    field to use outside of slab/slub.

    Signed-off-by: Dave Hansen
    Acked-by: David Rientjes
    Acked-by: Kirill A. Shutemov
    Cc: Jens Axboe
    Signed-off-by: Andrew Morton
    Signed-off-by: Jens Axboe

    Dave Hansen
     
  • __smp_call_function_single already avoids multiple IPIs by internally
    queing up the items, and now also is available for non-SMP builds as
    a trivially correct stub, so there is no need to wrap it. If the
    additional lock roundtrip cause problems my patch to convert the
    generic IPI code to llists is waiting to get merged will fix it.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Jens Axboe

    Christoph Hellwig
     
  • Now that we've got code for raid5/6 stripe awareness, bcache just needs
    to know about the stripes and when writing partial stripes is expensive
    - we probably don't want to enable this optimization for raid1 or 10,
    even though they have stripes. So add a flag to queue_limits.

    Signed-off-by: Kent Overstreet

    Kent Overstreet
     

04 Jan, 2014

1 commit

  • blk_rq_init() is called in req's complete handler to initialize
    the request, so the members of start_time and start_time_ns might
    become inaccurate when it is allocated in future.

    The patch initializes the two members in blk_mq_rq_ctx_init() to
    fix the problem.

    Signed-off-by: Ming Lei
    Signed-off-by: Jens Axboe

    Ming Lei
     

01 Jan, 2014

4 commits


07 Dec, 2013

1 commit

  • All objects, which are allocated in blk_mq_register_disk, must be
    released in blk_mq_unregister_disk.

    I use a KVM virtual machine and virtio disk to reproduce this issue.

    kmemleak: 18 new suspected memory leaks (see /sys/kernel/debug/kmemleak)
    $ cat /sys/kernel/debug/kmemleak | head -n 30
    unreferenced object 0xffff8800b6636150 (size 8):
    comm "kworker/0:2", pid 65, jiffies 4294809903 (age 86.358s)
    hex dump (first 8 bytes):
    76 69 72 74 69 6f 34 00 virtio4.
    backtrace:
    [] kmemleak_alloc+0x4e/0xb0
    [] __kmalloc_track_caller+0xf5/0x260
    [] kstrdup+0x31/0x60
    [] sysfs_new_dirent+0x2e/0x140
    [] create_dir+0x38/0xe0
    [] sysfs_create_dir_ns+0x73/0xc0
    [] kobject_add_internal+0xc9/0x340
    [] kobject_add+0x65/0xb0
    [] device_add+0x128/0x660
    [] device_register+0x1a/0x20
    [] register_virtio_device+0x98/0xe0
    [] virtio_pci_probe+0x12e/0x1c0
    [] local_pci_probe+0x45/0xa0
    [] pci_device_probe+0x121/0x130
    [] driver_probe_device+0x87/0x390
    [] __device_attach+0x3b/0x40
    unreferenced object 0xffff8800b65aa1d8 (size 144):

    Fixes: 320ae51feed5 (blk-mq: new multi-queue block IO queueing mechanism)
    Cc: Jens Axboe
    Signed-off-by: Andrey Vagin
    Signed-off-by: Jens Axboe

    Andrey Vagin
     

06 Dec, 2013

3 commits

  • Pull block layer fixes from Jens Axboe:
    "A small collection of fixes for the current series. It contains:

    - A fix for a use-after-free of a request in blk-mq. From Ming Lei

    - A fix for a blk-mq bug that could attempt to dereference a NULL rq
    if allocation failed

    - Two xen-blkfront small fixes

    - Cleanup of submit_bio_wait() type uses in the kernel, unifying
    that. From Kent

    - A fix for 32-bit blkg_rwstat reading. I apologize for this one
    looking mangled in the shortlog, it's entirely my fault for missing
    an empty line between the description and body of the text"

    * 'for-linus' of git://git.kernel.dk/linux-block:
    blk-mq: fix use-after-free of request
    blk-mq: fix dereference of rq->mq_ctx if allocation fails
    block: xen-blkfront: Fix possible NULL ptr dereference
    xen-blkfront: Silence pfn maybe-uninitialized warning
    block: submit_bio_wait() conversions
    Update of blkg_stat and blkg_rwstat may happen in bh context

    Linus Torvalds
     
  • If accounting is on, we will do the IO completion accounting after
    we have freed the request. Fix that by moving it sooner instead.

    Signed-off-by: Jens Axboe

    Ming Lei
     
  • In preparation of conversion to kernfs, cgroup file handling is
    updated so that it can be easily mapped to kernfs. This patch
    replaces cftype->read_seq_string() with cftype->seq_show() which is
    not limited to single_open() operation and will map directcly to
    kernfs seq_file interface.

    The conversions are mechanical. As ->seq_show() doesn't have @css and
    @cft, the functions which make use of them are converted to use
    seq_css() and seq_cft() respectively. In several occassions, e.f. if
    it has seq_string in its name, the function name is updated to fit the
    new method better.

    This patch does not introduce any behavior changes.

    Signed-off-by: Tejun Heo
    Acked-by: Aristeu Rozanski
    Acked-by: Vivek Goyal
    Acked-by: Michal Hocko
    Acked-by: Daniel Wagner
    Acked-by: Li Zefan
    Cc: Jens Axboe
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: Johannes Weiner
    Cc: Balbir Singh
    Cc: KAMEZAWA Hiroyuki
    Cc: Neil Horman

    Tejun Heo
     

04 Dec, 2013

2 commits


27 Nov, 2013

1 commit


25 Nov, 2013

1 commit


24 Nov, 2013

5 commits

  • bio_iovec_idx() and __bio_iovec() don't have any valid uses anymore -
    previous users have been converted to bio_iovec_iter() or other methods.

    __BVEC_END() has to go too - the bvec array can't be used directly for
    the last biovec because we might only be using the first portion of it,
    we have to iterate over the bvec array with bio_for_each_segment() which
    checks against the current value of bi_iter.bi_size.

    Signed-off-by: Kent Overstreet
    Cc: Jens Axboe

    Kent Overstreet
     
  • The bio integrity is also stored in a bvec array, so if we use the bvec
    iter code we just added, the integrity code won't need to implement its
    own iteration stuff (bio_integrity_mark_head(), bio_integrity_mark_tail())

    Signed-off-by: Kent Overstreet
    Cc: Jens Axboe
    Cc: "Martin K. Petersen"
    Cc: "James E.J. Bottomley"

    Kent Overstreet
     
  • More prep work for immutable biovecs - with immutable bvecs drivers
    won't be able to use the biovec directly, they'll need to use helpers
    that take into account bio->bi_iter.bi_bvec_done.

    This updates callers for the new usage without changing the
    implementation yet.

    Signed-off-by: Kent Overstreet
    Cc: Jens Axboe
    Cc: Geert Uytterhoeven
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: "Ed L. Cashin"
    Cc: Nick Piggin
    Cc: Lars Ellenberg
    Cc: Jiri Kosina
    Cc: Paul Clements
    Cc: Jim Paris
    Cc: Geoff Levand
    Cc: Yehuda Sadeh
    Cc: Sage Weil
    Cc: Alex Elder
    Cc: ceph-devel@vger.kernel.org
    Cc: Joshua Morris
    Cc: Philip Kelleher
    Cc: Konrad Rzeszutek Wilk
    Cc: Jeremy Fitzhardinge
    Cc: Neil Brown
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: linux390@de.ibm.com
    Cc: Nagalakshmi Nandigama
    Cc: Sreekanth Reddy
    Cc: support@lsi.com
    Cc: "James E.J. Bottomley"
    Cc: Greg Kroah-Hartman
    Cc: Alexander Viro
    Cc: Steven Whitehouse
    Cc: Herton Ronaldo Krzesinski
    Cc: Tejun Heo
    Cc: Andrew Morton
    Cc: Guo Chao
    Cc: Asai Thambi S P
    Cc: Selvan Mani
    Cc: Sam Bradshaw
    Cc: Matthew Wilcox
    Cc: Keith Busch
    Cc: Stephen Hemminger
    Cc: Quoc-Son Anh
    Cc: Sebastian Ott
    Cc: Nitin Gupta
    Cc: Minchan Kim
    Cc: Jerome Marchand
    Cc: Seth Jennings
    Cc: "Martin K. Petersen"
    Cc: Mike Snitzer
    Cc: Vivek Goyal
    Cc: "Darrick J. Wong"
    Cc: Chris Metcalf
    Cc: Jan Kara
    Cc: linux-m68k@lists.linux-m68k.org
    Cc: linuxppc-dev@lists.ozlabs.org
    Cc: drbd-user@lists.linbit.com
    Cc: nbd-general@lists.sourceforge.net
    Cc: cbe-oss-dev@lists.ozlabs.org
    Cc: xen-devel@lists.xensource.com
    Cc: virtualization@lists.linux-foundation.org
    Cc: linux-raid@vger.kernel.org
    Cc: linux-s390@vger.kernel.org
    Cc: DL-MPTFusionLinux@lsi.com
    Cc: linux-scsi@vger.kernel.org
    Cc: devel@driverdev.osuosl.org
    Cc: linux-fsdevel@vger.kernel.org
    Cc: cluster-devel@redhat.com
    Cc: linux-mm@kvack.org
    Acked-by: Geoff Levand

    Kent Overstreet
     
  • Immutable biovecs are going to require an explicit iterator. To
    implement immutable bvecs, a later patch is going to add a bi_bvec_done
    member to this struct; for now, this patch effectively just renames
    things.

    Signed-off-by: Kent Overstreet
    Cc: Jens Axboe
    Cc: Geert Uytterhoeven
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: "Ed L. Cashin"
    Cc: Nick Piggin
    Cc: Lars Ellenberg
    Cc: Jiri Kosina
    Cc: Matthew Wilcox
    Cc: Geoff Levand
    Cc: Yehuda Sadeh
    Cc: Sage Weil
    Cc: Alex Elder
    Cc: ceph-devel@vger.kernel.org
    Cc: Joshua Morris
    Cc: Philip Kelleher
    Cc: Rusty Russell
    Cc: "Michael S. Tsirkin"
    Cc: Konrad Rzeszutek Wilk
    Cc: Jeremy Fitzhardinge
    Cc: Neil Brown
    Cc: Alasdair Kergon
    Cc: Mike Snitzer
    Cc: dm-devel@redhat.com
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: linux390@de.ibm.com
    Cc: Boaz Harrosh
    Cc: Benny Halevy
    Cc: "James E.J. Bottomley"
    Cc: Greg Kroah-Hartman
    Cc: "Nicholas A. Bellinger"
    Cc: Alexander Viro
    Cc: Chris Mason
    Cc: "Theodore Ts'o"
    Cc: Andreas Dilger
    Cc: Jaegeuk Kim
    Cc: Steven Whitehouse
    Cc: Dave Kleikamp
    Cc: Joern Engel
    Cc: Prasad Joshi
    Cc: Trond Myklebust
    Cc: KONISHI Ryusuke
    Cc: Mark Fasheh
    Cc: Joel Becker
    Cc: Ben Myers
    Cc: xfs@oss.sgi.com
    Cc: Steven Rostedt
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Len Brown
    Cc: Pavel Machek
    Cc: "Rafael J. Wysocki"
    Cc: Herton Ronaldo Krzesinski
    Cc: Ben Hutchings
    Cc: Andrew Morton
    Cc: Guo Chao
    Cc: Tejun Heo
    Cc: Asai Thambi S P
    Cc: Selvan Mani
    Cc: Sam Bradshaw
    Cc: Wei Yongjun
    Cc: "Roger Pau Monné"
    Cc: Jan Beulich
    Cc: Stefano Stabellini
    Cc: Ian Campbell
    Cc: Sebastian Ott
    Cc: Christian Borntraeger
    Cc: Minchan Kim
    Cc: Jiang Liu
    Cc: Nitin Gupta
    Cc: Jerome Marchand
    Cc: Joe Perches
    Cc: Peng Tao
    Cc: Andy Adamson
    Cc: fanchaoting
    Cc: Jie Liu
    Cc: Sunil Mushran
    Cc: "Martin K. Petersen"
    Cc: Namjae Jeon
    Cc: Pankaj Kumar
    Cc: Dan Magenheimer
    Cc: Mel Gorman 6

    Kent Overstreet
     
  • It was being open coded in a few places.

    Signed-off-by: Kent Overstreet
    Cc: Jens Axboe
    Cc: Joern Engel
    Cc: Prasad Joshi
    Cc: Neil Brown
    Cc: Chris Mason
    Acked-by: NeilBrown

    Kent Overstreet
     

22 Nov, 2013

1 commit

  • Use ARRAY_SIZE instead of sizeof to get proper max for label length.

    Since this is just a read out of bounds it's not that bad, but the
    problem becomes user-visible eg if one tries to use DEBUG_PAGEALLOC and
    DEBUG_RODATA, at least with some enhancements from Hiroshi. Of course
    the destination array can contain garbage when we read beyond the end of
    source array so that would be another user-visible problem.

    Signed-off-by: Antti P Miettinen
    Reviewed-by: Hiroshi Doyu
    Tested-by: Hiroshi Doyu
    Cc: Will Drewry
    Cc: Matt Fleming
    Acked-by: Davidlohr Bueso
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Antti P Miettinen
     

21 Nov, 2013

1 commit


20 Nov, 2013

2 commits


16 Nov, 2013

1 commit

  • Pull second round of block driver updates from Jens Axboe:
    "As mentioned in the original pull request, the bcache bits were pulled
    because of their dependency on the immutable bio vecs. Kent re-did
    this part and resubmitted it, so here's the 2nd round of (mostly)
    driver updates for 3.13. It contains:

    - The bcache work from Kent.

    - Conversion of virtio-blk to blk-mq. This removes the bio and request
    path, and substitutes with the blk-mq path instead. The end result
    almost 200 deleted lines. Patch is acked by Asias and Christoph, who
    both did a bunch of testing.

    - A removal of bootmem.h include from Grygorii Strashko, part of a
    larger series of his killing the dependency on that header file.

    - Removal of __cpuinit from blk-mq from Paul Gortmaker"

    * 'for-linus' of git://git.kernel.dk/linux-block: (56 commits)
    virtio_blk: blk-mq support
    blk-mq: remove newly added instances of __cpuinit
    bcache: defensively handle format strings
    bcache: Bypass torture test
    bcache: Delete some slower inline asm
    bcache: Use ida for bcache block dev minor
    bcache: Fix sysfs splat on shutdown with flash only devs
    bcache: Better full stripe scanning
    bcache: Have btree_split() insert into parent directly
    bcache: Move spinlock into struct time_stats
    bcache: Kill sequential_merge option
    bcache: Kill bch_next_recurse_key()
    bcache: Avoid deadlocking in garbage collection
    bcache: Incremental gc
    bcache: Add make_btree_freeing_key()
    bcache: Add btree_node_write_sync()
    bcache: PRECEDING_KEY()
    bcache: bch_(btree|extent)_ptr_invalid()
    bcache: Don't bother with bucket refcount for btree node allocations
    bcache: Debug code improvements
    ...

    Linus Torvalds
     

15 Nov, 2013

1 commit


14 Nov, 2013

4 commits

  • The new blk-mq code added new instances of __cpuinit usage.
    We removed this a couple versions ago; we now want to remove
    the compat no-op stubs. Introducing new users is not what
    we want to see at this point in time, as it will break once
    the stubs are gone.

    Signed-off-by: Paul Gortmaker
    Signed-off-by: Jens Axboe

    Paul Gortmaker
     
  • Pull core locking changes from Ingo Molnar:
    "The biggest changes:

    - add lockdep support for seqcount/seqlocks structures, this
    unearthed both bugs and required extra annotation.

    - move the various kernel locking primitives to the new
    kernel/locking/ directory"

    * 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (21 commits)
    block: Use u64_stats_init() to initialize seqcounts
    locking/lockdep: Mark __lockdep_count_forward_deps() as static
    lockdep/proc: Fix lock-time avg computation
    locking/doc: Update references to kernel/mutex.c
    ipv6: Fix possible ipv6 seqlock deadlock
    cpuset: Fix potential deadlock w/ set_mems_allowed
    seqcount: Add lockdep functionality to seqcount/seqlock structures
    net: Explicitly initialize u64_stats_sync structures for lockdep
    locking: Move the percpu-rwsem code to kernel/locking/
    locking: Move the lglocks code to kernel/locking/
    locking: Move the rwsem code to kernel/locking/
    locking: Move the rtmutex code to kernel/locking/
    locking: Move the semaphore core to kernel/locking/
    locking: Move the spinlock code to kernel/locking/
    locking: Move the lockdep code to kernel/locking/
    locking: Move the mutex code to kernel/locking/
    hung_task debugging: Add tracepoint to report the hang
    x86/locking/kconfig: Update paravirt spinlock Kconfig description
    lockstat: Report avg wait and hold times
    lockdep, x86/alternatives: Drop ancient lockdep fixup message
    ...

    Linus Torvalds
     
  • Pull block IO core updates from Jens Axboe:
    "This is the pull request for the core changes in the block layer for
    3.13. It contains:

    - The new blk-mq request interface.

    This is a new and more scalable queueing model that marries the
    best part of the request based interface we currently have (which
    is fully featured, but scales poorly) and the bio based "interface"
    which the new drivers for high IOPS devices end up using because
    it's much faster than the request based one.

    The bio interface has no block layer support, since it taps into
    the stack much earlier. This means that drivers end up having to
    implement a lot of functionality on their own, like tagging,
    timeout handling, requeue, etc. The blk-mq interface provides all
    these. Some drivers even provide a switch to select bio or rq and
    has code to handle both, since things like merging only works in
    the rq model and hence is faster for some workloads. This is a
    huge mess. Conversion of these drivers nets us a substantial code
    reduction. Initial results on converting SCSI to this model even
    shows an 8x improvement on single queue devices. So while the
    model was intended to work on the newer multiqueue devices, it has
    substantial improvements for "classic" hardware as well. This code
    has gone through extensive testing and development, it's now ready
    to go. A pull request is coming to convert virtio-blk to this
    model will be will be coming as well, with more drivers scheduled
    for 3.14 conversion.

    - Two blktrace fixes from Jan and Chen Gang.

    - A plug merge fix from Alireza Haghdoost.

    - Conversion of __get_cpu_var() from Christoph Lameter.

    - Fix for sector_div() with 64-bit divider from Geert Uytterhoeven.

    - A fix for a race between request completion and the timeout
    handling from Jeff Moyer. This is what caused the merge conflict
    with blk-mq/core, in case you are looking at that.

    - A dm stacking fix from Mike Snitzer.

    - A code consolidation fix and duplicated code removal from Kent
    Overstreet.

    - A handful of block bug fixes from Mikulas Patocka, fixing a loop
    crash and memory corruption on blk cg.

    - Elevator switch bug fix from Tomoki Sekiyama.

    A heads-up that I had to rebase this branch. Initially the immutable
    bio_vecs had been queued up for inclusion, but a week later, it became
    clear that it wasn't fully cooked yet. So the decision was made to
    pull this out and postpone it until 3.14. It was a straight forward
    rebase, just pruning out the immutable series and the later fixes of
    problems with it. The rest of the patches applied directly and no
    further changes were made"

    * 'for-3.13/core' of git://git.kernel.dk/linux-block: (31 commits)
    block: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO
    block: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO
    block: Do not call sector_div() with a 64-bit divisor
    kernel: trace: blktrace: remove redundent memcpy() in compat_blk_trace_setup()
    block: Consolidate duplicated bio_trim() implementations
    block: Use rw_copy_check_uvector()
    block: Enable sysfs nomerge control for I/O requests in the plug list
    block: properly stack underlying max_segment_size to DM device
    elevator: acquire q->sysfs_lock in elevator_change()
    elevator: Fix a race in elevator switching and md device initialization
    block: Replace __get_cpu_var uses
    bdi: test bdi_init failure
    block: fix a probe argument to blk_register_region
    loop: fix crash if blk_alloc_queue fails
    blk-core: Fix memory corruption if blkcg_init_queue fails
    block: fix race between request completion and timeout handling
    blktrace: Send BLK_TN_PROCESS events to all running traces
    blk-mq: don't disallow request merges for req->special being set
    blk-mq: mq plug list breakage
    blk-mq: fix for flush deadlock
    ...

    Linus Torvalds
     
  • Pull DMA mask updates from Russell King:
    "This series cleans up the handling of DMA masks in a lot of drivers,
    fixing some bugs as we go.

    Some of the more serious errors include:
    - drivers which only set their coherent DMA mask if the attempt to
    set the streaming mask fails.
    - drivers which test for a NULL dma mask pointer, and then set the
    dma mask pointer to a location in their module .data section -
    which will cause problems if the module is reloaded.

    To counter these, I have introduced two helper functions:
    - dma_set_mask_and_coherent() takes care of setting both the
    streaming and coherent masks at the same time, with the correct
    error handling as specified by the API.
    - dma_coerce_mask_and_coherent() which resolves the problem of
    drivers forcefully setting DMA masks. This is more a marker for
    future work to further clean these locations up - the code which
    creates the devices really should be initialising these, but to fix
    that in one go along with this change could potentially be very
    disruptive.

    The last thing this series does is prise away some of Linux's addition
    to "DMA addresses are physical addresses and RAM always starts at
    zero". We have ARM LPAE systems where all system memory is above 4GB
    physical, hence having DMA masks interpreted by (eg) the block layers
    as describing physical addresses in the range 0..DMAMASK fails on
    these platforms. Santosh Shilimkar addresses this in this series; the
    patches were copied to the appropriate people multiple times but were
    ignored.

    Fixing this also gets rid of some ARM weirdness in the setup of the
    max*pfn variables, and brings ARM into line with every other Linux
    architecture as far as those go"

    * 'for-linus-dma-masks' of git://git.linaro.org/people/rmk/linux-arm: (52 commits)
    ARM: 7805/1: mm: change max*pfn to include the physical offset of memory
    ARM: 7797/1: mmc: Use dma_max_pfn(dev) helper for bounce_limit calculations
    ARM: 7796/1: scsi: Use dma_max_pfn(dev) helper for bounce_limit calculations
    ARM: 7795/1: mm: dma-mapping: Add dma_max_pfn(dev) helper function
    ARM: 7794/1: block: Rename parameter dma_mask to max_addr for blk_queue_bounce_limit()
    ARM: DMA-API: better handing of DMA masks for coherent allocations
    ARM: 7857/1: dma: imx-sdma: setup dma mask
    DMA-API: firmware/google/gsmi.c: avoid direct access to DMA masks
    DMA-API: dcdbas: update DMA mask handing
    DMA-API: dma: edma.c: no need to explicitly initialize DMA masks
    DMA-API: usb: musb: use platform_device_register_full() to avoid directly messing with dma masks
    DMA-API: crypto: remove last references to 'static struct device *dev'
    DMA-API: crypto: fix ixp4xx crypto platform device support
    DMA-API: others: use dma_set_coherent_mask()
    DMA-API: staging: use dma_set_coherent_mask()
    DMA-API: usb: use new dma_coerce_mask_and_coherent()
    DMA-API: usb: use dma_set_coherent_mask()
    DMA-API: parport: parport_pc.c: use dma_coerce_mask_and_coherent()
    DMA-API: net: octeon: use dma_coerce_mask_and_coherent()
    DMA-API: net: nxp/lpc_eth: use dma_coerce_mask_and_coherent()
    ...

    Linus Torvalds
     

13 Nov, 2013

1 commit

  • Now that seqcounts are lockdep enabled objects, we need to explicitly
    initialize runtime allocated seqcounts so that lockdep can track them.

    Without this patch, Fengguang was seeing:

    [ 4.127282] INFO: trying to register non-static key.
    [ 4.128027] the code is fine but needs lockdep annotation.
    [ 4.128027] turning off the locking correctness validator.
    [ 4.128027] CPU: 0 PID: 96 Comm: kworker/u4:1 Not tainted 3.12.0-next-20131108-10601-gbad570d #2
    [ 4.128027] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
    [ ... ]
    [ 4.128027] Call Trace:
    [ 4.128027] [] ? console_unlock+0x353/0x380
    [ 4.128027] [] dump_stack+0x48/0x60
    [ 4.128027] [] __lock_acquire.isra.26+0x7e3/0xceb
    [ 4.128027] [] lock_acquire+0x71/0x9a
    [ 4.128027] [] ? blk_throtl_bio+0x1c3/0x485
    [ 4.128027] [] throtl_update_dispatch_stats+0x7c/0x153
    [ 4.128027] [] ? blk_throtl_bio+0x1c3/0x485
    [ 4.128027] [] blk_throtl_bio+0x1c3/0x485
    ...

    Use u64_stats_init() for all affected data structures, which initializes
    the seqcount.

    Reported-and-Tested-by: Fengguang Wu
    Cc: Vivek Goyal
    Cc: Jens Axboe
    Signed-off-by: Peter Zijlstra
    [ Folded in another fix from the mailing list as well as a fix to that fix. Tweaked commit message. ]
    Signed-off-by: John Stultz
    Signed-off-by: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1384314134-6895-1-git-send-email-john.stultz@linaro.org
    [ So I actually think that the two SOBs from PeterZ are the right depiction of the patch route. ]
    Signed-off-by: Ingo Molnar

    Peter Zijlstra