[lkml]   [2009]   [Apr]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH 8/8] blk-map: reimplement blk_rq_map_user() using blk_rq_map_user_iov()
    On Wed,  1 Apr 2009 20:04:44 +0900
    Tejun Heo <> wrote:

    > Impact: subtle bugs fixed, cleanup
    > blk_rq_map_user() supported multi-bio mapping by calling
    > bio_map/copy_user() multiple times and linking the resulting bios into
    > rq; however, this had subtle bugs.
    > * Because each call to bio_map/copy_user() is independent, segment
    > limit check was done only per each bio, so it was possible to create
    > requests which are larger than the driver and hardware limits, which
    > could lead to disastrous outcome.

    What do you mean? blk_rq_append_bio properly checks the segment and
    limit, I think.

    > * Layers under FS may call blk_rq_map*() functions during request
    > processing. Under severe memory pressure and with enough bad luck,
    > this can lead to deadlock. As fs bvec pool is quite small, the
    > possibility isn't completely theoretical.
    > This patch reimplement blk_rq_map_user() in terms of
    > blk_rq_map_user_iov() which doesn't support multi-bio mappping and
    > drop multi bio handling from blk_rq_unmap_user(). Note that with the
    > previous patch to remove bio max size limit and to add null mapping
    > support to blk_rq_map_user_iov(), this change doesn't remove any
    > functionality.

    I don't think that we can drop multi bio handling from
    blk_rq_unmap_user(). It may make some users angry. Mike Christie added
    it because it was necessary.

     \ /
      Last update: 2009-04-01 14:47    [W:0.027 / U:6.136 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site