20 Nov, 2008

1 commit

  • kunmap() takes as argument the struct page that orginally got kmap()'d,
    however the sg_miter_stop() function passed it the kernel virtual address
    instead, resulting in weird stuff.

    Somehow I ended up fixing this bug by accident while looking for a bug in
    the same area.

    Reported-by: kerneloops.org
    Acked-by: Tejun Heo
    Signed-off-by: Arjan van de Ven
    Cc: Hugh Dickins
    Cc: [2.6.27.x]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     

12 Sep, 2008

1 commit

  • The callers of sg_copy_buffer must disable interrupts before calling
    it (since it uses kmap_atomic). Some callers use it on
    interrupt-disabled code but some need to take the trouble to disable
    interrupts just for this. No wonder they forget about it and we hit a
    bug like:

    http://bugzilla.kernel.org/show_bug.cgi?id=11529

    James said that it might be better to disable interrupts inside the
    function rather than risk the callers getting it wrong.

    Signed-off-by: FUJITA Tomonori
    Signed-off-by: Jens Axboe

    FUJITA Tomonori
     

23 Jul, 2008

1 commit

  • This is alternative implementation of sg content iterator introduced
    by commit 83e7d317... from Pierre Ossman in next-20080716. As there's
    already an sg iterator which iterates over sg entries themselves, name
    this sg_mapping_iterator.

    Slightly edited description from the original implementation follows.

    Iteration over a sg list is not that trivial when you take into
    account that memory pages might have to be mapped before being used.
    Unfortunately, that means that some parts of the kernel restrict
    themselves to directly accesible memory just to not have to deal with
    the mess.

    This patch adds a simple iterator system that allows any code to
    easily traverse an sg list and not have to deal with all the details.
    The user can decide to consume part of the iteration. Also, iteration
    can be stopped and resumed later if releasing the kmap between
    iteration steps is necessary. These features are useful to implement
    piecemeal sg copying for interrupt drive PIO for example.

    Signed-off-by: Tejun Heo
    Signed-off-by: Pierre Ossman

    Tejun Heo
     

08 Apr, 2008

1 commit

  • This patch adds new three helper functions to copy data between an SG
    list and a linear buffer.

    - sg_copy_from_buffer copies data from linear buffer to an SG list

    - sg_copy_to_buffer copies data from an SG list to a linear buffer

    When the APIs copy data from a linear buffer to an SG list,
    flush_kernel_dcache_page is called. It's not necessary for everyone
    but it's a no-op on most architectures and in general the API is not
    used in performance critical path.

    Signed-off-by: FUJITA Tomonori
    Acked-by: Jens Axboe
    Signed-off-by: James Bottomley

    FUJITA Tomonori
     

28 Jan, 2008

2 commits