17 Jun, 2014

1 commit


12 Jun, 2014

1 commit


29 May, 2014

2 commits


28 May, 2014

2 commits


01 May, 2014

1 commit

  • entry(cmd->ll_list) may belong to new request once end_cmd()
    returns, so fix the bug with the patch.

    Without the change, it is easy to observe oops when
    doing null_blk(timer) test.

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

    Ming Lei
     

16 Apr, 2014

2 commits


11 Feb, 2014

1 commit


08 Feb, 2014

1 commit

  • The completion queue is implemented using lockless list.

    The llist_add is adds the events to the list head which is a push operation.
    The processing of the completion elements is done by disconnecting all the
    pushed elements and iterating over the disconnected list. The problem is
    that the processing is done in reverse order w.r.t order of the insertion
    i.e. LIFO processing. By reversing the disconnected list which is done in
    linear time the desired FIFO processing is achieved.

    Signed-off-by: Shlomo Pongratz
    Signed-off-by: Jens Axboe

    Shlomo Pongratz
     

31 Jan, 2014

1 commit

  • 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
     

22 Jan, 2014

1 commit

  • If we load the null_blk module with bs=8k we get following oops:
    [ 3819.812190] BUG: unable to handle kernel NULL pointer dereference at 0000000000000008
    [ 3819.812387] IP: [] create_empty_buffers+0x28/0xaf
    [ 3819.812527] PGD 219244067 PUD 215a06067 PMD 0
    [ 3819.812640] Oops: 0000 [#1] SMP
    [ 3819.812772] Modules linked in: null_blk(+)

    Fix that by resetting block size to PAGE_SIZE if it is greater than PAGE_SIZE

    Reported-by: Sumanth
    Signed-off-by: Raghavendra K T
    Reviewed-by: Matias Bjorling
    Signed-off-by: Jens Axboe

    Raghavendra K T
     

12 Jan, 2014

1 commit

  • When queue_mode is NULL_Q_MQ and null_blk is being removed,
    blk_cleanup_queue() isn't called to cleanup queue, so the queue
    allocated won't be freed.

    This patch calls blk_cleanup_queue() for MQ to drain all pending
    requests first and release the reference counter of queue kobject, then
    blk_mq_free_queue() will be called in queue kobject's release handler
    when queue kobject's reference counter drops to zero.

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

    Ming Lei
     

25 Dec, 2013

1 commit

  • Pull block fixes from Jens Axboe:
    - fix for a memory leak on certain unplug events
    - a collection of bcache fixes from Kent and Nicolas
    - a few null_blk fixes and updates form Matias
    - a marking of static of functions in the stec pci-e driver

    * 'for-linus' of git://git.kernel.dk/linux-block:
    null_blk: support submit_queues on use_per_node_hctx
    null_blk: set use_per_node_hctx param to false
    null_blk: corrections to documentation
    null_blk: warning on ignored submit_queues param
    null_blk: refactor init and init errors code paths
    null_blk: documentation
    null_blk: mem garbage on NUMA systems during init
    drivers: block: Mark the functions as static in skd_main.c
    bcache: New writeback PD controller
    bcache: bugfix for race between moving_gc and bucket_invalidate
    bcache: fix for gc and writeback race
    bcache: bugfix - moving_gc now moves only correct buckets
    bcache: fix for gc crashing when no sectors are used
    bcache: Fix heap_peek() macro
    bcache: Fix for can_attach_cache()
    bcache: Fix dirty_data accounting
    bcache: Use uninterruptible sleep in writeback
    bcache: kthread don't set writeback task to INTERUPTIBLE
    block: fix memory leaks on unplugging block device
    bcache: fix sparse non static symbol warning

    Linus Torvalds
     

22 Dec, 2013

2 commits

  • In the case of both the submit_queues param and use_per_node_hctx param
    are used. We limit the number af submit_queues to the number of online
    nodes.

    If the submit_queues is a multiple of nr_online_nodes, its trivial. Simply map
    them to the nodes. For example: 8 submit queues are mapped as node0[0,1],
    node1[2,3], ...
    If uneven, we are left with an uneven number of submit_queues that must be
    mapped. These are mapped toward the first node and onward. E.g. 5
    submit queues mapped onto 4 nodes are mapped as node0[0,1], node1[2], ...

    Signed-off-by: Matias Bjorling
    Signed-off-by: Jens Axboe

    Matias Bjørling
     
  • The defaults for the module is to instantiate itself with blk-mq and a
    submit queue for each CPU node in the system.

    To save resources, initialize instead with a single submit queue.

    Signed-off-by: Matias Bjorling
    Signed-off-by: Jens Axboe

    Matias Bjørling
     

19 Dec, 2013

3 commits

  • Let the user know when the number of submission queues are being
    ignored.

    Signed-off-by: Matias Bjorling
    Signed-off-by: Jens Axboe

    Matias Bjorling
     
  • Simplify the initialization logic of the three block-layers.

    - The queue initialization is split into two parts. This allows reuse of
    code when initializing the sq-, bio- and mq-based layers.
    - Set submit_queues default value to 0 and always set it at init time.
    - Simplify the init error code paths.

    Signed-off-by: Matias Bjorling
    Signed-off-by: Jens Axboe

    Matias Bjorling
     
  • For NUMA systems, initializing the blk-mq layer and using per node hctx.
    We initialize submit queues to 1, while blk-mq nr_hw_queues is
    initialized to the number of NUMA nodes.

    This makes the null_init_hctx function overwrite memory outside of what
    it allocated. In my case it lead to writing garbage into struct
    request_queue's mq_map.

    Signed-off-by: Matias Bjorling
    Cc: Jens Axboe
    Signed-off-by: Linus Torvalds

    Matias Bjorling
     

16 Dec, 2013

1 commit

  • For NUMA systems, initializing the blk-mq layer and using per node hctx.
    We initialize submit queues to 1, while blk-mq nr_hw_queues is
    initialized to the number of NUMA nodes.

    This makes the null_init_hctx function overwrite memory outside of what
    it allocated. In my case it lead to writing garbage into struct
    request_queue's mq_map.

    Signed-off-by: Matias Bjorling
    Cc: Jens Axboe
    Signed-off-by: Linus Torvalds

    Matias Bjorling
     

22 Nov, 2013

1 commit


25 Oct, 2013

1 commit