21 Jul, 2016

1 commit

  • These two are confusing leftover of the old world order, combining
    values of the REQ_OP_ and REQ_ namespaces. For callers that don't
    special case we mostly just replace bi_rw with bio_data_dir or
    op_is_write, except for the few cases where a switch over the REQ_OP_
    values makes more sense. Any check for READA is replaced with an
    explicit check for REQ_RAHEAD. Also remove the READA alias for
    REQ_RAHEAD.

    Signed-off-by: Christoph Hellwig
    Reviewed-by: Johannes Thumshirn
    Reviewed-by: Mike Christie
    Signed-off-by: Jens Axboe

    Christoph Hellwig
     

19 Mar, 2016

1 commit


11 Feb, 2016

1 commit

  • If the LightNVM subsystem is not compiled into the kernel, and the
    null_blk device driver requests lightnvm to be initialized. The call to
    nvm_register fails and the null_add_dev function cleans up the
    initialization. However, at this point the null block device has
    already been added to the nullb_list and thus a second cleanup will
    occur when the function has returned, that leads to a double call to
    blk_cleanup_queue.

    Signed-off-by: Matias Bjørling
    Signed-off-by: Jens Axboe

    Matias Bjørling
     

05 Feb, 2016

1 commit

  • System block allows the device to initialize with its configured media
    manager. The system blocks is written to disk, and read again when media
    manager is determined. For this to work, the backend must store the
    data. Device drivers, such as null_blk, does not have any backend
    storage. This patch allows the media manager to be initialized without a
    storage backend.

    It also fix incorrect configuration of capabilities in null_blk, as it
    does not support get/set bad block interface.

    Signed-off-by: Matias Bjørling
    Signed-off-by: Jens Axboe

    Matias Bjørling
     

22 Jan, 2016

2 commits

  • Pull lightnvm fixes and updates from Jens Axboe:
    "This should have been part of the drivers branch, but it arrived a bit
    late and wasn't based on the official core block driver branch. So
    they got a small scolding, but got a pass since it's still new. Hence
    it's in a separate branch.

    This is mostly pure fixes, contained to lightnvm/, and minor feature
    additions"

    * 'for-4.5/lightnvm' of git://git.kernel.dk/linux-block: (26 commits)
    lightnvm: ensure that nvm_dev_ops can be used without CONFIG_NVM
    lightnvm: introduce factory reset
    lightnvm: use system block for mm initialization
    lightnvm: introduce ioctl to initialize device
    lightnvm: core on-disk initialization
    lightnvm: introduce mlc lower page table mappings
    lightnvm: add mccap support
    lightnvm: manage open and closed blocks separately
    lightnvm: fix missing grown bad block type
    lightnvm: reference rrpc lun in rrpc block
    lightnvm: introduce nvm_submit_ppa
    lightnvm: move rq->error to nvm_rq->error
    lightnvm: support multiple ppas in nvm_erase_ppa
    lightnvm: move the pages per block check out of the loop
    lightnvm: sectors first in ppa list
    lightnvm: fix locking and mempool in rrpc_lun_gc
    lightnvm: put block back to gc list on its reclaim fail
    lightnvm: check bi_error in gc
    lightnvm: return the get_bb_tbl return value
    lightnvm: refactor end_io functions for sync
    ...

    Linus Torvalds
     
  • Pull block driver updates from Jens Axboe:
    "This is the block driver pull request for 4.5, with the exception of
    NVMe, which is in a separate branch and will be posted after this one.

    This pull request contains:

    - A set of bcache stability fixes, which have been acked by Kent.
    These have been used and tested for more than a year by the
    community, so it's about time that they got in.

    - A set of drbd updates from the drbd team (Andreas, Lars, Philipp)
    and Markus Elfring, Oleg Drokin.

    - A set of fixes for xen blkback/front from the usual suspects, (Bob,
    Konrad) as well as community based fixes from Kiri, Julien, and
    Peng.

    - A 2038 time fix for sx8 from Shraddha, with a fix from me.

    - A small mtip32xx cleanup from Zhu Yanjun.

    - A null_blk division fix from Arnd"

    * 'for-4.5/drivers' of git://git.kernel.dk/linux-block: (71 commits)
    null_blk: use sector_div instead of do_div
    mtip32xx: restrict variables visible in current code module
    xen/blkfront: Fix crash if backend doesn't follow the right states.
    xen/blkback: Fix two memory leaks.
    xen/blkback: make st_ statistics per ring
    xen/blkfront: Handle non-indirect grant with 64KB pages
    xen-blkfront: Introduce blkif_ring_get_request
    xen-blkback: clear PF_NOFREEZE for xen_blkif_schedule()
    xen/blkback: Free resources if connect_ring failed.
    xen/blocks: Return -EXX instead of -1
    xen/blkback: make pool of persistent grants and free pages per-queue
    xen/blkback: get the number of hardware queues/rings from blkfront
    xen/blkback: pseudo support for multi hardware queues/rings
    xen/blkback: separate ring information out of struct xen_blkif
    xen/blkfront: correct setting for xen_blkif_max_ring_order
    xen/blkfront: make persistent grants pool per-queue
    xen/blkfront: Remove duplicate setting of ->xbdev.
    xen/blkfront: Cleanup of comments, fix unaligned variables, and syntax errors.
    xen/blkfront: negotiate number of queues/rings to be used with backend
    xen/blkfront: split per device io_lock
    ...

    Linus Torvalds
     

20 Jan, 2016

1 commit

  • Pull core block updates from Jens Axboe:
    "We don't have a lot of core changes this time around, it's mostly in
    drivers, which will come in a subsequent pull.

    The cores changes include:

    - blk-mq
    - Prep patch from Christoph, changing blk_mq_alloc_request() to
    take flags instead of just using gfp_t for sleep/nosleep.
    - Doc patch from me, clarifying the difference between legacy
    and blk-mq for timer usage.
    - Fixes from Raghavendra for memory-less numa nodes, and a reuse
    of CPU masks.

    - Cleanup from Geliang Tang, using offset_in_page() instead of open
    coding it.

    - From Ilya, rename request_queue slab to it reflects what it holds,
    and a fix for proper use of bdgrab/put.

    - A real fix for the split across stripe boundaries from Keith. We
    yanked a broken version of this from 4.4-rc final, this one works.

    - From Mike Krinkin, emit a trace message when we split.

    - From Wei Tang, two small cleanups, not explicitly clearing memory
    that is already cleared"

    * 'for-4.5/core' of git://git.kernel.dk/linux-block:
    block: use bd{grab,put}() instead of open-coding
    block: split bios to max possible length
    block: add call to split trace point
    blk-mq: Avoid memoryless numa node encoded in hctx numa_node
    blk-mq: Reuse hardware context cpumask for tags
    blk-mq: add a flags parameter to blk_mq_alloc_request
    Revert "blk-flush: Queue through IO scheduler when flush not required"
    block: clarify blk_add_timer() use case for blk-mq
    bio: use offset_in_page macro
    block: do not initialise statics to 0 or NULL
    block: do not initialise globals to 0 or NULL
    block: rename request_queue slab cache

    Linus Torvalds
     

14 Jan, 2016

1 commit

  • Dividing a sector_t number should be done using sector_div rather than do_div
    to optimize the 32-bit sector_t case, and with the latest do_div optimizations,
    we now get a compile-time warning for this:

    arch/arm/include/asm/div64.h:32:95: note: expected 'uint64_t * {aka long long unsigned int *}' but argument is of type 'sector_t * {aka long unsigned int *}'
    drivers/block/null_blk.c:521:81: warning: comparison of distinct pointer types lacks a cast

    This changes the newly added code to use sector_div. It is a simplified version
    of the original patch, as Linus Torvalds pointed out that we should not be using
    an expensive division function in the first place.

    This version was suggested by Matias Bjorling.

    Signed-off-by: Arnd Bergmann
    Cc: Matias Bjorling
    Fixes: b2b7e00148a2 ("null_blk: register as a LightNVM device")
    Signed-off-by: Jens Axboe

    Arnd Bergmann
     

12 Jan, 2016

1 commit

  • To implement sync I/O support within the LightNVM core, the end_io
    functions are refactored to take an end_io function pointer instead of
    testing for initialized media manager, followed by calling its end_io
    function.

    Sync I/O can then be implemented using a callback that signal I/O
    completion. This is similar to the logic found in blk_to_execute_io().
    By implementing it this way, the underlying device I/Os submission logic
    is abstracted away from core, targets, and media managers.

    Signed-off-by: Matias Bjørling
    Signed-off-by: Jens Axboe

    Matias Bjørling
     

29 Dec, 2015

1 commit

  • If null_blk is run in NULL_IRQ_TIMER mode and with queue_mode NULL_Q_RQ,
    we need to restart the queue from the hrtimer interrupt. We can't
    directly invoke the request_fn from that context, so punt the queue run
    to async kblockd context.

    Tested-by: Rabin Vincent
    Signed-off-by: Jens Axboe

    Jens Axboe
     

23 Dec, 2015

1 commit

  • blk_end_request_all may free request, so we need to save
    request_queue pointer before blk_end_request_all call.

    The problem was introduced in commit cf8ecc5a8455266f8d51
    ("null_blk: guarantee device restart in all irq modes")
    and causes general protection fault with slab poisoning
    enabled.

    Fixes: cf8ecc5a8455266f8d51 ("null_blk: guarantee device
    restart in all irq modes")

    Signed-off-by: Mike Krinkin
    Reviewed-by: Ming Lei
    Signed-off-by: Jens Axboe

    Mike Krinkin
     

09 Dec, 2015

1 commit


08 Dec, 2015

1 commit

  • In the case where a request queue is passed to the low lever lightnvm
    device drive integration, the device driver might pass its admin
    commands through another queue. Instead pass nvm_dev, and let the
    low level drive the appropriate queue.

    Reported-by: Christoph Hellwig
    Signed-off-by: Matias Bjørling
    Signed-off-by: Jens Axboe

    Matias Bjørling
     

02 Dec, 2015

4 commits

  • We already have the reserved flag, and a nowait flag awkwardly encoded as
    a gfp_t. Add a real flags argument to make the scheme more extensible and
    allow for a nicer calling convention.

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

    Christoph Hellwig
     
  • This commit at least doubles the maximum value for
    completion_nsec. This helps in special cases where one wants/needs to
    emulate an extremely slow I/O (for example to spot bugs).

    Signed-off-by: Paolo Valente
    Signed-off-by: Arianna Avanzini
    Signed-off-by: Jens Axboe

    Arianna Avanzini
     
  • In single-queue (block layer) mode,the function null_rq_prep_fn stops
    the device if alloc_cmd fails. Then, once stopped, the device must be
    restarted on the next command completion, so that the request(s) for
    which alloc_cmd failed can be requeued. Otherwise the device hangs.

    Unfortunately, device restart is currently performed only for delayed
    completions, i.e., in irqmode==2. This fact causes hangs, for the
    above reasons, with the other irqmodes in combination with single-queue
    block layer.

    This commits addresses this issue by making sure that, if stopped, the
    device is properly restarted for all irqmodes on completions.

    Signed-off-by: Paolo Valente
    Signed-off-by: Arianna AVanzini
    Signed-off-by: Jens Axboe

    Arianna Avanzini
     
  • For the Timer IRQ mode (i.e., when command completions are delayed),
    there is one timer for each CPU. Each of these timers
    . has a completion queue associated with it, containing all the
    command completions to be executed when the timer fires;
    . is set, and a new completion-to-execute is inserted into its
    completion queue, every time the dispatch code for a new command
    happens to be executed on the CPU related to the timer.

    This implies that, if the dispatch of a new command happens to be
    executed on a CPU whose timer has already been set, but has not yet
    fired, then the timer is set again, to the completion time of the
    newly arrived command. When the timer eventually fires, all its queued
    completions are executed.

    This way of handling delayed command completions entails the following
    problem: if more than one command completion is inserted into the
    queue of a timer before the timer fires, then the expiration time for
    the timer is moved forward every time each of these completions is
    enqueued. As a consequence, only the last completion enqueued enjoys a
    correct execution time, while all previous completions are unjustly
    delayed until the last completion is executed (and at that time they
    are executed all together).

    Specifically, if all the above completions are enqueued almost at the
    same time, then the problem is negligible. On the opposite end, if
    every completion is enqueued a while after the previous completion was
    enqueued (in the extreme case, it is enqueued only right before the
    timer would have expired), then every enqueued completion, except for
    the last one, experiences an inflated delay, proportional to the number
    of completions enqueued after it. In the end, commands, and thus I/O
    requests, may be completed at an arbitrarily lower rate than the
    desired one.

    This commit addresses this issue by replacing per-CPU timers with
    per-command timers, i.e., by associating an individual timer with each
    command.

    Signed-off-by: Paolo Valente
    Signed-off-by: Arianna Avanzini
    Signed-off-by: Jens Axboe

    Paolo Valente
     

20 Nov, 2015

3 commits


17 Nov, 2015

1 commit

  • Add support for registering as a LightNVM device. This allows us to
    evaluate the performance of the LightNVM subsystem.

    In /drivers/Makefile, LightNVM is moved above block device drivers
    to make sure that the LightNVM media managers have been initialized
    before drivers under /drivers/block are initialized.

    Signed-off-by: Matias Bjørling
    Fix by Jens Axboe to remove unneeded slab cache and the following
    memory leak.
    Signed-off-by: Jens Axboe

    Matias Bjørling
     

08 Nov, 2015

1 commit


01 Oct, 2015

1 commit

  • blk_mq_complete_request may be a no-op if the request has already
    been completed by others means (e.g. a timeout or cancellation), but
    currently drivers have to set rq->errors before calling
    blk_mq_complete_request, which might leave us with the wrong error value.

    Add an error parameter to blk_mq_complete_request so that we can
    defer setting rq->errors until we known we won the race to complete the
    request.

    Signed-off-by: Christoph Hellwig
    Reviewed-by: Sagi Grimberg
    Signed-off-by: Jens Axboe

    Christoph Hellwig
     

03 Sep, 2015

3 commits

  • set_capacity() sets device's capacity using 512 bytes sectors.
    null_blk calculates the number of sectors by size / bs, which
    set_capacity is called with. This led to null_blk exposing the
    wrong number of sectors when bs is not 512 bytes.

    Signed-off-by: Matias Bjørling
    Reviewed-by: Ross Zwisler
    Signed-off-by: Jens Axboe

    Matias Bjørling
     
  • Driver was not freeing the memory allocated for internal nullb queues.
    This patch frees the memory during driver unload.

    Signed-off-by: Matias Bjørling
    Signed-off-by: Jens Axboe

    Matias Bjørling
     
  • Pull core block updates from Jens Axboe:
    "This first core part of the block IO changes contains:

    - Cleanup of the bio IO error signaling from Christoph. We used to
    rely on the uptodate bit and passing around of an error, now we
    store the error in the bio itself.

    - Improvement of the above from myself, by shrinking the bio size
    down again to fit in two cachelines on x86-64.

    - Revert of the max_hw_sectors cap removal from a revision again,
    from Jeff Moyer. This caused performance regressions in various
    tests. Reinstate the limit, bump it to a more reasonable size
    instead.

    - Make /sys/block//queue/discard_max_bytes writeable, by me.
    Most devices have huge trim limits, which can cause nasty latencies
    when deleting files. Enable the admin to configure the size down.
    We will look into having a more sane default instead of UINT_MAX
    sectors.

    - Improvement of the SGP gaps logic from Keith Busch.

    - Enable the block core to handle arbitrarily sized bios, which
    enables a nice simplification of bio_add_page() (which is an IO hot
    path). From Kent.

    - Improvements to the partition io stats accounting, making it
    faster. From Ming Lei.

    - Also from Ming Lei, a basic fixup for overflow of the sysfs pending
    file in blk-mq, as well as a fix for a blk-mq timeout race
    condition.

    - Ming Lin has been carrying Kents above mentioned patches forward
    for a while, and testing them. Ming also did a few fixes around
    that.

    - Sasha Levin found and fixed a use-after-free problem introduced by
    the bio->bi_error changes from Christoph.

    - Small blk cgroup cleanup from Viresh Kumar"

    * 'for-4.3/core' of git://git.kernel.dk/linux-block: (26 commits)
    blk: Fix bio_io_vec index when checking bvec gaps
    block: Replace SG_GAPS with new queue limits mask
    block: bump BLK_DEF_MAX_SECTORS to 2560
    Revert "block: remove artifical max_hw_sectors cap"
    blk-mq: fix race between timeout and freeing request
    blk-mq: fix buffer overflow when reading sysfs file of 'pending'
    Documentation: update notes in biovecs about arbitrarily sized bios
    block: remove bio_get_nr_vecs()
    fs: use helper bio_add_page() instead of open coding on bi_io_vec
    block: kill merge_bvec_fn() completely
    md/raid5: get rid of bio_fits_rdev()
    md/raid5: split bio for chunk_aligned_read
    block: remove split code in blkdev_issue_{discard,write_same}
    btrfs: remove bio splitting and merge_bvec_fn() calls
    bcache: remove driver private bio splitting code
    block: simplify bio_add_page()
    block: make generic_make_request handle arbitrarily sized bios
    blk-cgroup: Drop unlikely before IS_ERR(_OR_NULL)
    block: don't access bio->bi_error after bio_put()
    block: shrink struct bio down to 2 cache lines again
    ...

    Linus Torvalds
     

29 Jul, 2015

1 commit

  • Currently we have two different ways to signal an I/O error on a BIO:

    (1) by clearing the BIO_UPTODATE flag
    (2) by returning a Linux errno value to the bi_end_io callback

    The first one has the drawback of only communicating a single possible
    error (-EIO), and the second one has the drawback of not beeing persistent
    when bios are queued up, and are not passed along from child to parent
    bio in the ever more popular chaining scenario. Having both mechanisms
    available has the additional drawback of utterly confusing driver authors
    and introducing bugs where various I/O submitters only deal with one of
    them, and the others have to add boilerplate code to deal with both kinds
    of error returns.

    So add a new bi_error field to store an errno value directly in struct
    bio and remove the existing mechanisms to clean all this up.

    Signed-off-by: Christoph Hellwig
    Reviewed-by: Hannes Reinecke
    Reviewed-by: NeilBrown
    Signed-off-by: Jens Axboe

    Christoph Hellwig
     

23 Jul, 2015

1 commit

  • end_cmd finishes request associated with nullb_cmd struct, so we
    should save pointer to request_queue in a local variable before
    calling end_cmd.

    The problem was causes general protection fault with slab poisoning
    enabled.

    Fixes: 8b70f45e2eb2 ("null_blk: restart request processing on completion handler")
    Tested-by: Akinobu Mita
    Signed-off-by: Mike Krinkin
    Signed-off-by: Jens Axboe

    Mike Krinkin
     

02 Jul, 2015

1 commit

  • Pull module updates from Rusty Russell:
    "Main excitement here is Peter Zijlstra's lockless rbtree optimization
    to speed module address lookup. He found some abusers of the module
    lock doing that too.

    A little bit of parameter work here too; including Dan Streetman's
    breaking up the big param mutex so writing a parameter can load
    another module (yeah, really). Unfortunately that broke the usual
    suspects, !CONFIG_MODULES and !CONFIG_SYSFS, so those fixes were
    appended too"

    * tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux: (26 commits)
    modules: only use mod->param_lock if CONFIG_MODULES
    param: fix module param locks when !CONFIG_SYSFS.
    rcu: merge fix for Convert ACCESS_ONCE() to READ_ONCE() and WRITE_ONCE()
    module: add per-module param_lock
    module: make perm const
    params: suppress unused variable error, warn once just in case code changes.
    modules: clarify CONFIG_MODULE_COMPRESS help, suggest 'N'.
    kernel/module.c: avoid ifdefs for sig_enforce declaration
    kernel/workqueue.c: remove ifdefs over wq_power_efficient
    kernel/params.c: export param_ops_bool_enable_only
    kernel/params.c: generalize bool_enable_only
    kernel/module.c: use generic module param operaters for sig_enforce
    kernel/params: constify struct kernel_param_ops uses
    sysfs: tightened sysfs permission checks
    module: Rework module_addr_{min,max}
    module: Use __module_address() for module_address_lookup()
    module: Make the mod_tree stuff conditional on PERF_EVENTS || TRACING
    module: Optimize __module_address() using a latched RB-tree
    rbtree: Implement generic latch_tree
    seqlock: Introduce raw_read_seqcount_latch()
    ...

    Linus Torvalds
     

02 Jun, 2015

2 commits

  • When irqmode=2 (IRQ completion handler is timer) and queue_mode=1
    (Block interface to use is rq), the completion handler should restart
    request handling for any pending requests on a queue because request
    processing stops when the number of commands are queued more than
    hw_queue_depth (null_rq_prep_fn returns BLKPREP_DEFER).

    Without this change, the following command cannot finish.

    # modprobe null_blk irqmode=2 queue_mode=1 hw_queue_depth=1
    # fio --name=t --rw=read --size=1g --direct=1 \
    --ioengine=libaio --iodepth=64 --filename=/dev/nullb0

    Signed-off-by: Akinobu Mita
    Cc: Jens Axboe
    Signed-off-by: Jens Axboe

    Akinobu Mita
     
  • When irqmode=2 (IRQ completion handler is timer), timer handler should
    be called on the same CPU where the timer has been started.

    Since completion_queues are per-cpu and the completion handler only
    touches completion_queue for local CPU, we need to prevent the handler
    from running on a different CPU where the timer has been started.
    Otherwise, the IO cannot be completed until another completion handler
    is executed on that CPU.

    Signed-off-by: Akinobu Mita
    Cc: Jens Axboe
    Signed-off-by: Jens Axboe

    Akinobu Mita
     

28 May, 2015

1 commit

  • Most code already uses consts for the struct kernel_param_ops,
    sweep the kernel for the last offending stragglers. Other than
    include/linux/moduleparam.h and kernel/params.c all other changes
    were generated with the following Coccinelle SmPL patch. Merge
    conflicts between trees can be handled with Coccinelle.

    In the future git could get Coccinelle merge support to deal with
    patch --> fail --> grammar --> Coccinelle --> new patch conflicts
    automatically for us on patches where the grammar is available and
    the patch is of high confidence. Consider this a feature request.

    Test compiled on x86_64 against:

    * allnoconfig
    * allmodconfig
    * allyesconfig

    @ const_found @
    identifier ops;
    @@

    const struct kernel_param_ops ops = {
    };

    @ const_not_found depends on !const_found @
    identifier ops;
    @@

    -struct kernel_param_ops ops = {
    +const struct kernel_param_ops ops = {
    };

    Generated-by: Coccinelle SmPL
    Cc: Rusty Russell
    Cc: Junio C Hamano
    Cc: Andrew Morton
    Cc: Kees Cook
    Cc: Tejun Heo
    Cc: Ingo Molnar
    Cc: cocci@systeme.lip6.fr
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Luis R. Rodriguez
    Signed-off-by: Rusty Russell

    Luis R. Rodriguez
     

17 Jan, 2015

1 commit

  • null_blk is partitionable, but it doesn't store any of the info. When
    it is loaded, you would normally see:

    [1226739.343608] nullb0: unknown partition table
    [1226739.343746] nullb1: unknown partition table

    which can confuse some people. Add the appropriate gendisk flag
    to suppress this info.

    Signed-off-by: Jens Axboe

    Jens Axboe
     

03 Jan, 2015

1 commit


27 Nov, 2014

1 commit

  • When either queue_mode or irq_mode parameter is set outside its
    boundaries, the driver will not complete requests. This stalls driver
    initialization when partitions are probed. Fix by setting out of bound
    values to the parameters default.

    Signed-off-by: Matias Bjørling

    Updated by me to have the parse+check in just one function.

    Signed-off-by: Jens Axboe

    Matias Bjorling
     

19 Nov, 2014

1 commit


30 Oct, 2014

1 commit

  • Since we have the notion of a 'last' request in a chain, we can use
    this to have the hardware optimize the issuing of requests. Add
    a list_head parameter to queue_rq that the driver can use to
    temporarily store hw commands for issue when 'last' is true. If we
    are doing a chain of requests, pass in a NULL list for the first
    request to force issue of that immediately, then batch the remainder
    for deferred issue until the last request has been sent.

    Instead of adding yet another argument to the hot ->queue_rq path,
    encapsulate the passed arguments in a blk_mq_queue_data structure.
    This is passed as a constant, and has been tested as faster than
    passing 4 (or even 3) args through ->queue_rq. Update drivers for
    the new ->queue_rq() prototype. There are no functional changes
    in this patch for drivers - if they don't use the passed in list,
    then they will just queue requests individually like before.

    Signed-off-by: Jens Axboe

    Jens Axboe
     

22 Oct, 2014

1 commit

  • When creation of queues fails in init_driver_queues(), we free the
    queues. But null_add_dev() doesn't test for this failure and continues
    with the setup leading to strange consequences, likely oops. Fix the
    problem by testing whether init_driver_queues() failed and do proper
    error cleanup.

    Coverity-id: 1148005
    Signed-off-by: Jan Kara
    Signed-off-by: Jens Axboe

    Jan Kara
     

19 Oct, 2014

1 commit

  • Pull block layer driver update from Jens Axboe:
    "This is the block driver pull request for 3.18. Not a lot in there
    this round, and nothing earth shattering.

    - A round of drbd fixes from the linbit team, and an improvement in
    asender performance.

    - Removal of deprecated (and unused) IRQF_DISABLED flag in rsxx and
    hd from Michael Opdenacker.

    - Disable entropy collection from flash devices by default, from Mike
    Snitzer.

    - A small collection of xen blkfront/back fixes from Roger Pau Monné
    and Vitaly Kuznetsov"

    * 'for-3.18/drivers' of git://git.kernel.dk/linux-block:
    block: disable entropy contributions for nonrot devices
    xen, blkfront: factor out flush-related checks from do_blkif_request()
    xen-blkback: fix leak on grant map error path
    xen/blkback: unmap all persistent grants when frontend gets disconnected
    rsxx: Remove deprecated IRQF_DISABLED
    block: hd: remove deprecated IRQF_DISABLED
    drbd: use RB_DECLARE_CALLBACKS() to define augment callbacks
    drbd: compute the end before rb_insert_augmented()
    drbd: Add missing newline in resync progress display in /proc/drbd
    drbd: reduce lock contention in drbd_worker
    drbd: Improve asender performance
    drbd: Get rid of the WORK_PENDING macro
    drbd: Get rid of the __no_warn and __cond_lock macros
    drbd: Avoid inconsistent locking warning
    drbd: Remove superfluous newline from "resync_extents" debugfs entry.
    drbd: Use consistent names for all the bi_end_io callbacks
    drbd: Use better variable names

    Linus Torvalds
     

05 Oct, 2014

1 commit

  • Clear QUEUE_FLAG_ADD_RANDOM in all block drivers that set
    QUEUE_FLAG_NONROT.

    Historically, all block devices have automatically made entropy
    contributions. But as previously stated in commit e2e1a148 ("block: add
    sysfs knob for turning off disk entropy contributions"):
    - On SSD disks, the completion times aren't as random as they
    are for rotational drives. So it's questionable whether they
    should contribute to the random pool in the first place.
    - Calling add_disk_randomness() has a lot of overhead.

    There are more reliable sources for randomness than non-rotational block
    devices. From a security perspective it is better to err on the side of
    caution than to allow entropy contributions from unreliable "random"
    sources.

    Signed-off-by: Mike Snitzer
    Signed-off-by: Jens Axboe

    Mike Snitzer