22 Sep, 2016

1 commit

  • bio_free_pages is introduced in commit 1dfa0f68c040
    ("block: add a helper to free bio bounce buffer pages"),
    we can reuse the func in other modules after it was
    imported.

    Cc: Christoph Hellwig
    Cc: Jens Axboe
    Cc: Mike Snitzer
    Cc: Shaohua Li
    Signed-off-by: Guoqing Jiang
    Acked-by: Kent Overstreet
    Signed-off-by: Jens Axboe

    Guoqing Jiang
     

19 Aug, 2016

3 commits

  • The original error was thought to be corruption, but was actually caused by:
    make-bcache --data-offset N
    where N was in bytes and should have been in sectors. While userspace
    tools should be updated to check --data-offset beyond end of volume,
    hopefully this will help others that might not have noticed the units.

    Signed-off-by: Eric Wheeler
    Cc: Kent Overstreet

    Eric Wheeler
     
  • This patch fixes a cachedev registration-time allocation deadlock.
    This can deadlock on boot if your initrd auto-registeres bcache devices:

    Allocator thread:
    [ 720.727614] INFO: task bcache_allocato:3833 blocked for more than 120 seconds.
    [ 720.732361] [] schedule+0x37/0x90
    [ 720.732963] [] bch_bucket_alloc+0x188/0x360 [bcache]
    [ 720.733538] [] ? prepare_to_wait_event+0xf0/0xf0
    [ 720.734137] [] bch_prio_write+0x19d/0x340 [bcache]
    [ 720.734715] [] bch_allocator_thread+0x3ff/0x470 [bcache]
    [ 720.735311] [] ? __schedule+0x2dc/0x950
    [ 720.735884] [] ? invalidate_buckets+0x980/0x980 [bcache]

    Registration thread:
    [ 720.710403] INFO: task bash:3531 blocked for more than 120 seconds.
    [ 720.715226] [] schedule+0x37/0x90
    [ 720.715805] [] __bch_btree_map_nodes+0x12d/0x150 [bcache]
    [ 720.716409] [] ? bch_btree_insert_check_key+0x1c0/0x1c0 [bcache]
    [ 720.717008] [] bch_btree_insert+0xf4/0x170 [bcache]
    [ 720.717586] [] ? prepare_to_wait_event+0xf0/0xf0
    [ 720.718191] [] bch_journal_replay+0x14a/0x290 [bcache]
    [ 720.718766] [] ? ttwu_do_activate.constprop.94+0x5d/0x70
    [ 720.719369] [] ? try_to_wake_up+0x1d4/0x350
    [ 720.719968] [] run_cache_set+0x580/0x8e0 [bcache]
    [ 720.720553] [] register_bcache+0xe2e/0x13b0 [bcache]
    [ 720.721153] [] kobj_attr_store+0xf/0x20
    [ 720.721730] [] sysfs_kf_write+0x3d/0x50
    [ 720.722327] [] kernfs_fop_write+0x12a/0x180
    [ 720.722904] [] __vfs_write+0x37/0x110
    [ 720.723503] [] ? __sb_start_write+0x58/0x110
    [ 720.724100] [] ? security_file_permission+0x23/0xa0
    [ 720.724675] [] vfs_write+0xa9/0x1b0
    [ 720.725275] [] ? do_audit_syscall_entry+0x6c/0x70
    [ 720.725849] [] SyS_write+0x55/0xd0
    [ 720.726451] [] ? do_page_fault+0x30/0x80
    [ 720.727045] [] system_call_fastpath+0x12/0x71

    The fifo code in upstream bcache can't use the last element in the buffer,
    which was the cause of the bug: if you asked for a power of two size,
    it'd give you a fifo that could hold one less than what you asked for
    rather than allocating a buffer twice as big.

    Signed-off-by: Kent Overstreet
    Tested-by: Eric Wheeler
    Cc: stable@vger.kernel.org

    Kent Overstreet
     
  • register_cache() is supposed to return an error string on error so that
    register_bcache() will will blkdev_put and cleanup other user counters,
    but it does not set 'char *err' when cache_alloc() fails (eg, due to
    memory pressure) and thus register_bcache() performs no cleanup.

    register_bcache() register_cache() | cache_alloc() ---/
    Cc: Kent Overstreet
    Cc: stable@vger.kernel.org

    Eric Wheeler
     

08 Aug, 2016

1 commit

  • Since commit 63a4cc24867d, bio->bi_rw contains flags in the lower
    portion and the op code in the higher portions. This means that
    old code that relies on manually setting bi_rw is most likely
    going to be broken. Instead of letting that brokeness linger,
    rename the member, to force old and out-of-tree code to break
    at compile time instead of at runtime.

    No intended functional changes in this commit.

    Signed-off-by: Jens Axboe

    Jens Axboe
     

21 Jul, 2016

1 commit

  • Instead of a flag and an index just make sure an index of 0 means
    no need to free the bvec array. Also move the constants related
    to the bvec pools together and use a consistent naming scheme for
    them.

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

    Christoph Hellwig
     

06 Jul, 2016

3 commits


12 Jun, 2016

1 commit

  • alloc_workqueue replaces deprecated create_workqueue().

    Dedicated workqueues have been used since bcache_wq and moving_gc_wq
    are workqueues for writes and are being used on a memory reclaim path.
    WQ_MEM_RECLAIM has been set to ensure forward progress under memory
    pressure.
    Since there are only a fixed number of work items, explicit concurrency
    limit is unnecessary here.

    Signed-off-by: Bhaktipriya Shridhar
    Acked-by: Tejun Heo
    Signed-off-by: Jens Axboe

    Bhaktipriya Shridhar
     

08 Jun, 2016

4 commits

  • To avoid confusion between REQ_OP_FLUSH, which is handled by
    request_fn drivers, and upper layers requesting the block layer
    perform a flush sequence along with possibly a WRITE, this patch
    renames REQ_FLUSH to REQ_PREFLUSH.

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

    Mike Christie
     
  • Separate the op from the rq_flag_bits and have bcache
    set/get the bio using bio_set_op_attrs/bio_op.

    Signed-off-by: Mike Christie
    Reviewed-by: Hannes Reinecke
    Signed-off-by: Jens Axboe

    Mike Christie
     
  • We currently set REQ_WRITE/WRITE for all non READ IOs
    like discard, flush, writesame, etc. In the next patches where we
    no longer set up the op as a bitmap, we will not be able to
    detect a operation direction like writesame by testing if REQ_WRITE is
    set.

    This has bcache use the op_is_write helper which will do the right
    thing.

    Signed-off-by: Mike Christie
    Reviewed-by: Hannes Reinecke
    Signed-off-by: Jens Axboe

    Mike Christie
     
  • This has callers of submit_bio/submit_bio_wait set the bio->bi_rw
    instead of passing it in. This makes that use the same as
    generic_make_request and how we set the other bio fields.

    Signed-off-by: Mike Christie

    Fixed up fs/ext4/crypto.c

    Signed-off-by: Jens Axboe

    Mike Christie
     

24 May, 2016

3 commits

  • bch_gc_thread() doesn't mark itself freezable, so calling try_to_freeze()
    in its context is just an expensive no-op.

    Signed-off-by: Jiri Kosina
    Signed-off-by: Jens Axboe

    Jiri Kosina
     
  • bch_allocator_thread() is calling try_to_freeze(), but that's just an
    expensive no-op given the fact that the thread is not marked freezable.

    Bucket allocator has to be up and running to the very last stages of the
    suspend, as the bcache I/O that's in flight (think of writing an
    hibernation image to a swap device served by bcache).

    Signed-off-by: Jiri Kosina
    Signed-off-by: Jens Axboe

    Jiri Kosina
     
  • bch_writeback_thread() is calling try_to_freeze(), but that's just an
    expensive no-op given the fact that the thread is not marked freezable.

    I/O helper kthreads, exactly such as the bcache writeback thread, actually
    shouldn't be freezable, because they are potentially necessary for
    finalizing the image write-out.

    Signed-off-by: Jiri Kosina
    Signed-off-by: Jens Axboe

    Jiri Kosina
     

13 Apr, 2016

1 commit


09 Mar, 2016

3 commits

  • When bch_cache_set_alloc() fails to kzalloc the cache_set, the
    asyncronous closure handling tries to dereference a cache_set that
    hadn't yet been allocated inside of cache_set_flush() which is called
    by __cache_set_unregister() during cleanup. This appears to happen only
    during an OOM condition on bcache_register.

    Signed-off-by: Eric Wheeler
    Cc: stable@vger.kernel.org

    Eric Wheeler
     
  • Fix null pointer dereference by changing register_cache() to return an int
    instead of being void. This allows it to return -ENOMEM or -ENODEV and
    enables upper layers to handle the OOM case without NULL pointer issues.

    See this thread:
    http://thread.gmane.org/gmane.linux.kernel.bcache.devel/3521

    Fixes this error:
    gargamel:/sys/block/md5/bcache# echo /dev/sdh2 > /sys/fs/bcache/register

    bcache: register_cache() error opening sdh2: cannot allocate memory
    BUG: unable to handle kernel NULL pointer dereference at 00000000000009b8
    IP: [] cache_set_flush+0x102/0x15c [bcache]
    PGD 120dff067 PUD 1119a3067 PMD 0
    Oops: 0000 [#1] SMP
    Modules linked in: veth ip6table_filter ip6_tables
    (...)
    CPU: 4 PID: 3371 Comm: kworker/4:3 Not tainted 4.4.2-amd64-i915-volpreempt-20160213bc1 #3
    Hardware name: System manufacturer System Product Name/P8H67-M PRO, BIOS 3904 04/27/2013
    Workqueue: events cache_set_flush [bcache]
    task: ffff88020d5dc280 ti: ffff88020b6f8000 task.ti: ffff88020b6f8000
    RIP: 0010:[] [] cache_set_flush+0x102/0x15c [bcache]

    Signed-off-by: Eric Wheeler
    Tested-by: Marc MERLIN
    Cc:

    Eric Wheeler
     
  • The bch_writeback_thread might BUG_ON in read_dirty() if
    dc->sb==BDEV_STATE_DIRTY and bch_sectors_dirty_init has not yet completed
    its related initialization. This patch downs the dc->writeback_lock until
    after initialization is complete, thus preventing bch_writeback_thread
    from proceeding prematurely.

    See this thread:
    http://thread.gmane.org/gmane.linux.kernel.bcache.devel/3453

    Signed-off-by: Eric Wheeler
    Tested-by: Marc MERLIN
    Cc:
    Signed-off-by: Jens Axboe

    Eric Wheeler
     

22 Jan, 2016

1 commit

  • 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
     

04 Jan, 2016

1 commit


31 Dec, 2015

8 commits

  • Previously, it would only scan the entire disk if it was starting from
    the very start of the disk - i.e. if the previous scan got to the end.

    This was broken by refill_full_stripes(), which updates last_scanned so
    that refill_dirty was never triggering the searched_from_start path.

    But if we change refill_dirty() to always scan the entire disk if
    necessary, regardless of what last_scanned was, the code gets cleaner
    and we fix that bug too.

    Signed-off-by: Kent Overstreet
    Cc: stable@vger.kernel.org
    Signed-off-by: Jens Axboe

    Kent Overstreet
     
  • Added a safeguard in the shutdown case. At least while not being
    attached it is also possible to trigger a kernel bug by writing into
    writeback_running. This change adds the same check before trying to
    wake up the thread for that case.

    Signed-off-by: Stefan Bader
    Cc: Kent Overstreet
    Cc: stable@vger.kernel.org
    Signed-off-by: Jens Axboe

    Stefan Bader
     
  • Allows to use register, not register_quiet in udev to avoid "device_busy" error.
    The initial patch proposed at https://lkml.org/lkml/2013/8/26/549 by Gabriel de Perthuis
    does not unlock the mutex and hangs the kernel.

    See http://thread.gmane.org/gmane.linux.kernel.bcache.devel/2594 for the discussion.

    Cc: Denis Bychkov
    Cc: Kent Overstreet
    Cc: Eric Wheeler
    Cc: Gabriel de Perthuis
    Cc: stable@vger.kernel.org

    Signed-off-by: Jens Axboe

    Gabriel de Perthuis
     
  • In bcache_init() function it forgot to unregister reboot notifier if
    bcache fails to unregister a block device. This commit fixes this.

    Signed-off-by: Zheng Liu
    Tested-by: Joshua Schmid
    Tested-by: Eric Wheeler
    Cc: Kent Overstreet
    Cc: stable@vger.kernel.org
    Signed-off-by: Jens Axboe

    Zheng Liu
     
  • Signed-off-by: Al Viro
    Tested-by: Joshua Schmid
    Tested-by: Eric Wheeler
    Cc: Kent Overstreet
    Cc: stable@vger.kernel.org
    Signed-off-by: Jens Axboe

    Al Viro
     
  • This bug can be reproduced by the following script:

    #!/bin/bash

    bcache_sysfs="/sys/fs/bcache"

    function clear_cache()
    {
    if [ ! -e $bcache_sysfs ]; then
    echo "no bcache sysfs"
    exit
    fi

    cset_uuid=$(ls -l $bcache_sysfs|head -n 2|tail -n 1|awk '{print $9}')
    sudo sh -c "echo $cset_uuid > /sys/block/sdb/sdb1/bcache/detach"
    sleep 5
    sudo sh -c "echo $cset_uuid > /sys/block/sdb/sdb1/bcache/attach"
    }

    for ((i=0;i] ? warn_slowpath_common+0x87/0xc0
    [ 276.122650] [] ? warn_slowpath_fmt+0x46/0x50
    [ 276.139361] [] ? sysfs_add_one+0xb8/0xd0
    [ 276.156012] [] ? sysfs_do_create_link+0x12b/0x170
    [ 276.172682] [] ? sysfs_create_link+0x13/0x20
    [ 276.189282] [] ? bcache_device_link+0xc1/0x110 [bcache]
    [ 276.205993] [] ? bch_cached_dev_attach+0x478/0x4f0 [bcache]
    [ 276.222794] [] ? bch_cached_dev_store+0x627/0x780 [bcache]
    [ 276.239680] [] ? alloc_pages_current+0xaa/0x110
    [ 276.256594] [] ? sysfs_write_file+0xe5/0x170
    [ 276.273364] [] ? vfs_write+0xb8/0x1a0
    [ 276.290133] [] ? sys_write+0x51/0x90
    [ 276.306368] [] ? system_call_fastpath+0x16/0x1b
    [ 276.322301] ---[ end trace 9f5d4fcdd0c3edfb ]---
    [ 276.338241] ------------[ cut here ]------------
    [ 276.354109] WARNING: at /home/wenqing.lz/bcache/bcache/super.c:720
    bcache_device_link+0xdf/0x110 [bcache]() (Tainted: P W --------------- )
    [ 276.386017] Hardware name: Tecal RH2285
    [ 276.401430] Couldn't create device cache set symlinks
    [ 276.401759] Modules linked in: bcache tcp_diag inet_diag ipmi_devintf ipmi_si ipmi_msghandler
    bonding 8021q garp stp llc ipv6 ext3 jbd loop sg iomemory_vsl(P) bnx2 microcode serio_raw i2c_i801
    i2c_core iTCO_wdt iTCO_vendor_support i7core_edac edac_core shpchp ext4 jbd2 mbcache megaraid_sas
    pata_acpi ata_generic ata_piix dm_mod [last unloaded: scsi_wait_scan]
    [ 276.465477] Pid: 2765, comm: sh Tainted: P W --------------- 2.6.32 #1
    [ 276.482169] Call Trace:
    [ 276.498610] [] ? warn_slowpath_common+0x87/0xc0
    [ 276.515405] [] ? warn_slowpath_fmt+0x46/0x50
    [ 276.532059] [] ? bcache_device_link+0xdf/0x110 [bcache]
    [ 276.548808] [] ? bch_cached_dev_attach+0x478/0x4f0 [bcache]
    [ 276.565569] [] ? bch_cached_dev_store+0x627/0x780 [bcache]
    [ 276.582418] [] ? alloc_pages_current+0xaa/0x110
    [ 276.599341] [] ? sysfs_write_file+0xe5/0x170
    [ 276.616142] [] ? vfs_write+0xb8/0x1a0
    [ 276.632607] [] ? sys_write+0x51/0x90
    [ 276.648671] [] ? system_call_fastpath+0x16/0x1b
    [ 276.664756] ---[ end trace 9f5d4fcdd0c3edfc ]---

    We forget to clear BCACHE_DEV_UNLINK_DONE flag in bcache_device_attach()
    function when we attach a backing device first time. After detaching this
    backing device, this flag will be true and sysfs_remove_link() isn't called in
    bcache_device_unlink(). Then when we attach this backing device again,
    sysfs_create_link() will return EEXIST error in bcache_device_link().

    So the fix is trival and we clear this flag in bcache_device_link().

    Signed-off-by: Zheng Liu
    Tested-by: Joshua Schmid
    Tested-by: Eric Wheeler
    Cc: Kent Overstreet
    Cc: stable@vger.kernel.org
    Signed-off-by: Jens Axboe

    Zheng Liu
     
  • Signed-off-by: Takashi Iwai
    Tested-by: Eric Wheeler
    Cc: Kent Overstreet
    Cc: stable@vger.kernel.org
    Signed-off-by: Jens Axboe

    Kent Overstreet
     
  • Subject : [PATCH v2] bcache: fix a livelock in btree lock
    Date : Wed, 25 Feb 2015 20:32:09 +0800 (02/25/2015 04:32:09 AM)

    This commit tries to fix a livelock in bcache. This livelock might
    happen when we causes a huge number of cache misses simultaneously.

    When we get a cache miss, bcache will execute the following path.

    ->cached_dev_make_request()
    ->cached_dev_read()
    ->cached_lookup()
    ->bch->btree_map_keys()
    ->btree_root() bch_btree_map_keys_recurse() |
    ->cache_lookup_fn() |
    ->cached_dev_cache_miss() |
    ->bch_btree_insert_check_key() -|
    [If btree->seq is not equal to seq + 1, we should return
    EINTR and traverse btree again.]

    In bch_btree_insert_check_key() function we first need to check upgrade
    flag (op->lock == -1), and when this flag is true we need to release
    read btree->lock and try to take write btree->lock. During taking and
    releasing this write lock, btree->seq will be monotone increased in
    order to prevent other threads modify this in cache miss (see btree.h:74).
    But if there are some cache misses caused by some requested, we could
    meet a livelock because btree->seq is always changed by others. Thus no
    one can make progress.

    This commit will try to take write btree->lock if it encounters a race
    when we traverse btree. Although it sacrifice the scalability but we
    can ensure that only one can modify the btree.

    Signed-off-by: Zheng Liu
    Tested-by: Joshua Schmid
    Tested-by: Eric Wheeler
    Cc: Joshua Schmid
    Cc: Zhu Yanhai
    Cc: Kent Overstreet
    Cc: stable@vger.kernel.org
    Signed-off-by: Jens Axboe

    Zheng Liu
     

11 Nov, 2015

1 commit

  • Pull block IO poll support from Jens Axboe:
    "Various groups have been doing experimentation around IO polling for
    (really) fast devices. The code has been reviewed and has been
    sitting on the side for a few releases, but this is now good enough
    for coordinated benchmarking and further experimentation.

    Currently O_DIRECT sync read/write are supported. A framework is in
    the works that allows scalable stats tracking so we can auto-tune
    this. And we'll add libaio support as well soon. Fow now, it's an
    opt-in feature for test purposes"

    * 'for-4.4/io-poll' of git://git.kernel.dk/linux-block:
    direct-io: be sure to assign dio->bio_bdev for both paths
    directio: add block polling support
    NVMe: add blk polling support
    block: add block polling support
    blk-mq: return tag/queue combo in the make_request_fn handlers
    block: change ->make_request_fn() and users to return a queue cookie

    Linus Torvalds
     

08 Nov, 2015

2 commits

  • Pull trivial updates from Jiri Kosina:
    "Trivial stuff from trivial tree that can be trivially summed up as:

    - treewide drop of spurious unlikely() before IS_ERR() from Viresh
    Kumar

    - cosmetic fixes (that don't really affect basic functionality of the
    driver) for pktcdvd and bcache, from Julia Lawall and Petr Mladek

    - various comment / printk fixes and updates all over the place"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial:
    bcache: Really show state of work pending bit
    hwmon: applesmc: fix comment typos
    Kconfig: remove comment about scsi_wait_scan module
    class_find_device: fix reference to argument "match"
    debugfs: document that debugfs_remove*() accepts NULL and error values
    net: Drop unlikely before IS_ERR(_OR_NULL)
    mm: Drop unlikely before IS_ERR(_OR_NULL)
    fs: Drop unlikely before IS_ERR(_OR_NULL)
    drivers: net: Drop unlikely before IS_ERR(_OR_NULL)
    drivers: misc: Drop unlikely before IS_ERR(_OR_NULL)
    UBI: Update comments to reflect UBI_METAONLY flag
    pktcdvd: drop null test before destroy functions

    Linus Torvalds
     
  • No functional changes in this patch, but it prepares us for returning
    a more useful cookie related to the IO that was queued up.

    Signed-off-by: Jens Axboe
    Acked-by: Christoph Hellwig
    Acked-by: Keith Busch

    Jens Axboe
     

06 Nov, 2015

1 commit

  • WORK_STRUCT_PENDING is a mask for testing the pending bit.
    test_bit() expects the number of the bit and we need to
    use WORK_STRUCT_PENDING_BIT there.

    Also work_data_bits() is defined in workqueues.h now.

    I have noticed this just by chance when looking how
    WORK_STRUCT_PENDING_BIT is used. The change is compile
    tested.

    Signed-off-by: Petr Mladek
    Signed-off-by: Jiri Kosina

    Petr Mladek
     

14 Aug, 2015

1 commit

  • The bcache driver has always accepted arbitrarily large bios and split
    them internally. Now that every driver must accept arbitrarily large
    bios this code isn't nessecary anymore.

    Cc: linux-bcache@vger.kernel.org
    Signed-off-by: Kent Overstreet
    [dpark: add more description in commit message]
    Signed-off-by: Dongsu Park
    Signed-off-by: Ming Lin
    Signed-off-by: Jens Axboe

    Kent Overstreet
     

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
     

17 Jul, 2015

1 commit


11 Jul, 2015

1 commit


01 Jul, 2015

1 commit