21 Apr, 2017

1 commit


24 Mar, 2017

1 commit


01 Feb, 2017

1 commit

  • Instead of keeping two levels of indirection for requests types, fold it
    all into the operations. The little caveat here is that previously
    cmd_type only applied to struct request, while the request and bio op
    fields were set to plain REQ_OP_READ/WRITE even for passthrough
    operations.

    Instead this patch adds new REQ_OP_* for SCSI passthrough and driver
    private requests, althought it has to add two for each so that we
    can communicate the data in/out nature of the request.

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

    Christoph Hellwig
     

12 Jan, 2017

1 commit

  • The raw_cmd_copyin() function does a kmalloc() with GFP_USER, although the
    allocated structure is obviously not mapped to userspace, just copied from/to.
    In this case GFP_KERNEL is more appropriate, so let's use it, although in the
    current implementation this does not manifest as any error.

    Reported-by: Matthew Wilcox
    Signed-off-by: Vlastimil Babka
    Signed-off-by: Jiri Kosina

    Vlastimil Babka
     

22 Nov, 2016

2 commits

  • Signed-off-by: Ming Lei
    Reviewed-by: Christoph Hellwig
    Signed-off-by: Jens Axboe

    Ming Lei
     
  • Some drivers often use external bvec table, so introduce
    this helper for this case. It is always safe to access the
    bio->bi_io_vec in this way for this case.

    After converting to this usage, it will becomes a bit easier
    to evaluate the remaining direct access to bio->bi_io_vec,
    so it can help to prepare for the following multipage bvec
    support.

    Signed-off-by: Ming Lei
    Reviewed-by: Christoph Hellwig

    Fixed up the new O_DIRECT cases.

    Signed-off-by: Jens Axboe

    Ming Lei
     

25 Aug, 2016

2 commits


05 Aug, 2016

1 commit

  • Commit 09954bad4 ("floppy: refactor open() flags handling"), as a
    side-effect, causes open(/dev/fdX, O_ACCMODE) to fail. It turns out that
    this is being used setfdprm userspace for ioctl-only open().

    Reintroduce back the original behavior wrt !(FMODE_READ|FMODE_WRITE)
    modes, while still keeping the original O_NDELAY bug fixed.

    Cc: stable@vger.kernel.org # v4.5+
    Reported-by: Wim Osterholt
    Tested-by: Wim Osterholt
    Signed-off-by: Jiri Kosina
    Signed-off-by: Jens Axboe

    Jiri Kosina
     

28 Jun, 2016

1 commit

  • For block drivers that specify a parent device, convert them to use
    device_add_disk().

    This conversion was done with the following semantic patch:

    @@
    struct gendisk *disk;
    expression E;
    @@

    - disk->driverfs_dev = E;
    ...
    - add_disk(disk);
    + device_add_disk(E, disk);

    @@
    struct gendisk *disk;
    expression E1, E2;
    @@

    - disk->driverfs_dev = E1;
    ...
    E2 = disk;
    ...
    - add_disk(E2);
    + device_add_disk(E1, E2);

    ...plus some manual fixups for a few missed conversions.

    Cc: Jens Axboe
    Cc: Keith Busch
    Cc: Michael S. Tsirkin
    Cc: David Woodhouse
    Cc: David S. Miller
    Cc: James Bottomley
    Cc: Ross Zwisler
    Cc: Konrad Rzeszutek Wilk
    Cc: Martin K. Petersen
    Reviewed-by: Christoph Hellwig
    Reviewed-by: Johannes Thumshirn
    Signed-off-by: Dan Williams

    Dan Williams
     

08 Jun, 2016

2 commits

  • This patch converts the simple bi_rw use cases in the block,
    drivers, mm and fs code to set/get the bio operation using
    bio_set_op_attrs/bio_op

    These should be simple one or two liner cases, so I just did them
    in one patch. The next patches handle the more complicated
    cases in a module per patch.

    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
     

07 Feb, 2016

1 commit

  • In case /dev/fdX is open with O_NDELAY / O_NONBLOCK, floppy_open() immediately
    succeeds, without performing any further media / controller preparations.
    That's "correct" wrt. the NODELAY flag, but is hardly correct wrt. the rest
    of the floppy driver, that is not really O_NONBLOCK ready, at all. Therefore
    it's not too surprising, that subsequent attempts to work with the
    filedescriptor produce bad results. Namely, syzkaller tool has been able
    to livelock mmap() on the returned fd to keep waiting on the page unlock
    bit forever.

    Quite frankly, I have trouble defining what non-blocking behavior would be for
    floppies. Is waiting ages for the driver to actually succeed reading a sector
    blocking operation? Is waiting for drive motor to start blocking operation? How
    about in case of virtualized floppies?

    One option would be returning EWOULDBLOCK in case O_NDLEAY / O_NONBLOCK is
    being passed to open(). That has a theoretical potential of breaking some
    arcane and archaic userspace though.

    Let's take a more conservative aproach, and accept the O_NDLEAY flag, and let
    the driver behave as usual.

    While at it, clean up a bit handling of !(mode & (FMODE_READ|FMODE_WRITE))
    case and return EINVAL instead of succeeding as well.

    Spotted by syzkaller tool.

    Reported-by: Dmitry Vyukov
    Tested-by: Dmitry Vyukov
    Signed-off-by: Jiri Kosina

    Jiri Kosina
     

02 Feb, 2016

1 commit


01 Feb, 2016

1 commit

  • floppy_revalidate() doesn't perform any error handling on lock_fdc()
    result. lock_fdc() might actually be interrupted by a signal (it waits for
    fdc becoming non-busy interruptibly). In such case, floppy_revalidate()
    proceeds as if it had claimed the lock, but it fact it doesn't.

    In case of multiple threads trying to open("/dev/fdX"), this leads to
    serious corruptions all over the place, because all of a sudden there is
    no critical section protection (that'd otherwise be guaranteed by locked
    fd) whatsoever.

    While at this, fix the fact that the 'interruptible' parameter to
    lock_fdc() doesn't make any sense whatsoever, because we always wait
    interruptibly anyway.

    Most of the lock_fdc() callsites do properly handle error (and propagate
    EINTR), but floppy_revalidate() and floppy_check_events() don't. Fix this.

    Spotted by 'syzkaller' tool.

    Reported-by: Dmitry Vyukov
    Tested-by: Dmitry Vyukov
    Signed-off-by: Jiri Kosina

    Jiri Kosina
     

08 Dec, 2015

1 commit

  • There's no reason for temparea to be static, since it's only used for
    temporary sprintf output. It's not immediately obvious that the output
    will always fit (in the worst case, the output including '\0' is
    exactly 32 bytes), so save a future reader from worrying about that.

    Signed-off-by: Rasmus Villemoes
    Signed-off-by: Jiri Kosina

    Rasmus Villemoes
     

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
     

03 Feb, 2015

1 commit


19 Jun, 2014

1 commit


18 Jun, 2014

1 commit


03 Jun, 2014

2 commits

  • Pull block driver changes from Jens Axboe:
    "Now that the core bits are in, here's the pull request for the driver
    related changes for 3.16. Nothing out of the ordinary here, mostly
    business as usual. There are a few pulls of for-3.16/core into this
    branch, which were done when the blk-mq was modified after the
    mtip32xx conversion was put in.

    The pull request contains:

    - skd and cciss converted to use pci_enable_msix_exact(). From
    Alexander Gordeev.

    - A few mtip32xx fixes from Asai @ Micron.

    - The conversion of mtip32xx from make_request_fn to blk-mq, and a
    later small fix for that conversion on quiescing for non-queued IO.
    From me.

    - A fix for bsg to use an exported function to check whether this
    driver is request based or not. Needed updating for blk-mq, which
    is request based, but does not have a request_fn hook. From me.

    - Small floppy bug fix from Jiri.

    - A series of cleanups for the cdrom uniform layer from Joe Perches.
    Gets rid of various old ugly macros, making the code conform more
    to the modern coding style.

    - A series of patches for drbd from the drbd crew (Lars Ellenberg and
    Philipp Reisner).

    - A use-after-free fix for null_blk from Ming Lei.

    - Also from Ming Lei is a performance patch for virtio-blk, which can
    net us a 3x win on kvm platforms where world notification is
    expensive.

    - Ming Lei also fixed a stall issue in virtio-blk, due to a race
    between queue start/stop and resource limits.

    - A small batch of fixes for xen-blk{back,front} from Olaf Hering and
    Valentin Priescu"

    * 'for-3.16/drivers' of git://git.kernel.dk/linux-block: (54 commits)
    block: virtio_blk: don't hold spin lock during world switch
    xen-blkback: defer freeing blkif to avoid blocking xenwatch
    xen blkif.h: fix comment typo in discard-alignment
    xen/blkback: disable discard feature if requested by toolstack
    xen-blkfront: remove type check from blkfront_setup_discard
    floppy: do not corrupt bio.bi_flags when reading block 0
    mtip32xx: move error handling to service thread
    virtio_blk: fix race between start and stop queue
    mtip32xx: stop block hardware queues before quiescing IO
    mtip32xx: blk_mq_init_queue() returns an ERR_PTR
    mtip32xx: convert to use blk-mq
    cdrom: Remove unnecessary prototype for cdrom_get_disc_info
    cdrom: Remove unnecessary prototype for cdrom_mrw_exit
    cdrom: Remove cdrom_count_tracks prototype
    cdrom: Remove cdrom_get_next_writeable prototype
    cdrom: Remove cdrom_get_last_written prototype
    cdrom: Move mmc_ioctls above cdrom_ioctl to remove unnecessary prototype
    cdrom: Remove unnecessary sanitize_format prototype
    cdrom: Remove unnecessary check_for_audio_disc prototype
    cdrom: Remove prototype for open_for_data
    ...

    Linus Torvalds
     
  • Pull block core updates from Jens Axboe:
    "It's a big(ish) round this time, lots of development effort has gone
    into blk-mq in the last 3 months. Generally we're heading to where
    3.16 will be a feature complete and performant blk-mq. scsi-mq is
    progressing nicely and will hopefully be in 3.17. A nvme port is in
    progress, and the Micron pci-e flash driver, mtip32xx, is converted
    and will be sent in with the driver pull request for 3.16.

    This pull request contains:

    - Lots of prep and support patches for scsi-mq have been integrated.
    All from Christoph.

    - API and code cleanups for blk-mq from Christoph.

    - Lots of good corner case and error handling cleanup fixes for
    blk-mq from Ming Lei.

    - A flew of blk-mq updates from me:

    * Provide strict mappings so that the driver can rely on the CPU
    to queue mapping. This enables optimizations in the driver.

    * Provided a bitmap tagging instead of percpu_ida, which never
    really worked well for blk-mq. percpu_ida relies on the fact
    that we have a lot more tags available than we really need, it
    fails miserably for cases where we exhaust (or are close to
    exhausting) the tag space.

    * Provide sane support for shared tag maps, as utilized by scsi-mq

    * Various fixes for IO timeouts.

    * API cleanups, and lots of perf tweaks and optimizations.

    - Remove 'buffer' from struct request. This is ancient code, from
    when requests were always virtually mapped. Kill it, to reclaim
    some space in struct request. From me.

    - Remove 'magic' from blk_plug. Since we store these on the stack
    and since we've never caught any actual bugs with this, lets just
    get rid of it. From me.

    - Only call part_in_flight() once for IO completion, as includes two
    atomic reads. Hopefully we'll get a better implementation soon, as
    the part IO stats are now one of the more expensive parts of doing
    IO on blk-mq. From me.

    - File migration of block code from {mm,fs}/ to block/. This
    includes bio.c, bio-integrity.c, bounce.c, and ioprio.c. From me,
    from a discussion on lkml.

    That should describe the meat of the pull request. Also has various
    little fixes and cleanups from Dave Jones, Shaohua Li, Duan Jiong,
    Fengguang Wu, Fabian Frederick, Randy Dunlap, Robert Elliott, and Sam
    Bradshaw"

    * 'for-3.16/core' of git://git.kernel.dk/linux-block: (100 commits)
    blk-mq: push IPI or local end_io decision to __blk_mq_complete_request()
    blk-mq: remember to start timeout handler for direct queue
    block: ensure that the timer is always added
    blk-mq: blk_mq_unregister_hctx() can be static
    blk-mq: make the sysfs mq/ layout reflect current mappings
    blk-mq: blk_mq_tag_to_rq should handle flush request
    block: remove dead code in scsi_ioctl:blk_verify_command
    blk-mq: request initialization optimizations
    block: add queue flag for disabling SG merging
    block: remove 'magic' from struct blk_plug
    blk-mq: remove alloc_hctx and free_hctx methods
    blk-mq: add file comments and update copyright notices
    blk-mq: remove blk_mq_alloc_request_pinned
    blk-mq: do not use blk_mq_alloc_request_pinned in blk_mq_map_request
    blk-mq: remove blk_mq_wait_for_tags
    blk-mq: initialize request in __blk_mq_alloc_request
    blk-mq: merge blk_mq_alloc_reserved_request into blk_mq_alloc_request
    blk-mq: add helper to insert requests from irq context
    blk-mq: remove stale comment for blk_mq_complete_request()
    blk-mq: allow non-softirq completions
    ...

    Linus Torvalds
     

28 May, 2014

1 commit

  • Commit 41a55b4de39 ("floppy: silence warning during disk test") caused
    bio.bi_flags being overwritten, and its initialization to BIO_UPTODATE
    in bio_init() to be lost.

    This was unnoticed until 7b7b68bba5 ("floppy: bail out in open() if
    drive is not responding to block0 read"), because the error value wasn't
    checked for in the bio completion callback.

    Now we are actually looking at the error, and the loss of BIO_UPTODATE
    causes EIO to be wrongly passed to the callback, which confuses the
    FD_OPEN_SHOULD_FAIL_BIT logic.

    Fix this by not destroying previous value of bi_flags when setting
    BIO_QUIET.

    Cc: Stephen Hemminger
    Reported-by: Takashi Iwai
    Signed-off-by: Jiri Kosina

    Jiri Kosina
     

05 May, 2014

2 commits


16 Apr, 2014

1 commit

  • This was used in the olden days, back when onions were proper
    yellow. Basically it mapped to the current buffer to be
    transferred. With highmem being added more than a decade ago,
    most drivers map pages out of a bio, and rq->buffer isn't
    pointing at anything valid.

    Convert old style drivers to just use bio_data().

    For the discard payload use case, just reference the page
    in the bio.

    Signed-off-by: Jens Axboe

    Jens Axboe
     

07 Mar, 2014

1 commit

  • PREPARE_[DELAYED_]WORK() are being phased out. They have few users
    and a nasty surprise in terms of reentrancy guarantee as workqueue
    considers work items to be different if they don't have the same work
    function.

    floppy has been multiplexing floppy_work and fd_timer with multiple
    work functions. Introduce floppy_work_workfn() and fd_timer_workfn()
    which invoke floppy_work_fn and fd_timer_fn respectively and always
    use the two functions as the work functions and update the users to
    set floppy_work_fn and fd_timer_fn instead of overriding work
    functions using PREPARE_[DELAYED_]WORK().

    It would probably be best to route this with other related updates
    through the workqueue tree.

    Lightly tested using qemu.

    Signed-off-by: Tejun Heo
    Acked-by: Jiri Kosina

    Tejun Heo
     

17 Jan, 2014

1 commit

  • In case reading of block 0 during open() fails, it is not the right thing
    to let open() succeed.

    Fix this by introducing FD_OPEN_SHOULD_FAIL_BIT flag, and setting it in
    case the bio callback encounters an error while trying to read block 0.

    As a bonus, this works around certain broken userspace (blkid), which is
    not able to properly handle read()s returning IO errors. Hence be nice to
    those, and bail out during open() already; if block 0 is not readable,
    read()s are not going to provide any meaningful data anyway.

    Signed-off-by: Jiri Kosina

    Jiri Kosina
     

24 Nov, 2013

2 commits

  • 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
     

25 Oct, 2013

1 commit


09 May, 2013

1 commit

  • Pull block core updates from Jens Axboe:

    - Major bit is Kents prep work for immutable bio vecs.

    - Stable candidate fix for a scheduling-while-atomic in the queue
    bypass operation.

    - Fix for the hang on exceeded rq->datalen 32-bit unsigned when merging
    discard bios.

    - Tejuns changes to convert the writeback thread pool to the generic
    workqueue mechanism.

    - Runtime PM framework, SCSI patches exists on top of these in James'
    tree.

    - A few random fixes.

    * 'for-3.10/core' of git://git.kernel.dk/linux-block: (40 commits)
    relay: move remove_buf_file inside relay_close_buf
    partitions/efi.c: replace useless kzalloc's by kmalloc's
    fs/block_dev.c: fix iov_shorten() criteria in blkdev_aio_read()
    block: fix max discard sectors limit
    blkcg: fix "scheduling while atomic" in blk_queue_bypass_start
    Documentation: cfq-iosched: update documentation help for cfq tunables
    writeback: expose the bdi_wq workqueue
    writeback: replace custom worker pool implementation with unbound workqueue
    writeback: remove unused bdi_pending_list
    aoe: Fix unitialized var usage
    bio-integrity: Add explicit field for owner of bip_buf
    block: Add an explicit bio flag for bios that own their bvec
    block: Add bio_alloc_pages()
    block: Convert some code to bio_for_each_segment_all()
    block: Add bio_for_each_segment_all()
    bounce: Refactor __blk_queue_bounce to not use bi_io_vec
    raid1: use bio_copy_data()
    pktcdvd: Use bio_reset() in disabled code to kill bi_idx usage
    pktcdvd: use bio_copy_data()
    block: Add bio_copy_data()
    ...

    Linus Torvalds
     

07 May, 2013

1 commit


24 Mar, 2013

1 commit

  • For immutable bvecs, all bi_idx usage needs to be audited - so here
    we're removing all the unnecessary uses.

    Most of these are places where it was being initialized on a bio that
    was just allocated, a few others are conversions to standard macros.

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

    Kent Overstreet
     

23 Nov, 2012

1 commit

  • We need to first destroy the floppy_wq workqueue before cleaning up
    the queue. Otherwise we might race with still pending work with the
    workqueue, but all the block queue already gone. This might lead to
    various oopses, such as

    CPU 0
    Pid: 6, comm: kworker/u:0 Not tainted 3.7.0-rc4 #1 Bochs Bochs
    RIP: 0010:[] [] blk_peek_request+0xd5/0x1c0
    RSP: 0000:ffff88000dc7dd88 EFLAGS: 00010092
    RAX: 0000000000000001 RBX: 0000000000000000 RCX: 0000000000000000
    RDX: ffff88000f602688 RSI: ffffffff81fd95d8 RDI: 6b6b6b6b6b6b6b6b
    RBP: ffff88000dc7dd98 R08: ffffffff81fd95c8 R09: 0000000000000000
    R10: ffffffff81fd9480 R11: 0000000000000001 R12: 6b6b6b6b6b6b6b6b
    R13: ffff88000dc7dfd8 R14: ffff88000dc7dfd8 R15: 0000000000000000
    FS: 0000000000000000(0000) GS:ffffffff81e21000(0000) knlGS:0000000000000000
    CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
    CR2: 0000000000000000 CR3: 0000000001e11000 CR4: 00000000000006f0
    DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
    Process kworker/u:0 (pid: 6, threadinfo ffff88000dc7c000, task ffff88000dc5ecc0)
    Stack:
    0000000000000000 0000000000000000 ffff88000dc7ddb8 ffffffff8134efee
    ffff88000dc7ddb8 0000000000000000 ffff88000dc7dde8 ffffffff814aef3c
    ffffffff81e75d80 ffff88000dc0c640 ffff88000fbfb000 ffffffff814aed90
    Call Trace:
    [] blk_fetch_request+0xe/0x30
    [] redo_fd_request+0x1ac/0x400
    [] ? start_motor+0x130/0x130
    [] process_one_work+0x136/0x450
    [] ? manage_workers+0x205/0x2e0
    [] worker_thread+0x14d/0x420
    [] ? rescuer_thread+0x1a0/0x1a0
    [] kthread+0xba/0xc0
    [] ? __kthread_parkme+0x80/0x80
    [] ret_from_fork+0x7a/0xb0
    [] ? __kthread_parkme+0x80/0x80
    Code: 0f 84 c0 00 00 00 83 f8 01 0f 85 e2 00 00 00 81 4b 40 00 00 80 00 48 89 df e8 58 f8 ff ff be fb ff ff ff
    fe ff ff 8b 1c 24 49 39 dc 0f 85 2e ff ff ff 41 0f b6 84 24 28 04 00
    RIP [] blk_peek_request+0xd5/0x1c0
    RSP

    Reported-by: Fengguang Wu
    Tested-by: Fengguang Wu
    Signed-off-by: Jiri Kosina
    Signed-off-by: Jens Axboe

    Jiri Kosina
     

30 Oct, 2012

5 commits