lkml.org 
[lkml]   [2011]   [Jan]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[34-longterm 038/260] staging: hv: Fixed bounce kmap problem by using correct index
    Date
    From: Hank Janssen <hjanssen@microsoft.com>

    commit 0c47a70a9a8a6d1ec37a53d2f9cb82f8b8ef8aa2 upstream.

    Fixed bounce offset kmap problem by using correct index.
    The symptom of the problem is that in some NAS appliances this problem
    represents Itself by a unresponsive VM under a load with many clients writing
    small files.

    Signed-off-by:Hank Janssen <hjanssen@microsoft.com>
    Signed-off-by:Haiyang Zhang <haiyangz@microsoft.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
    Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
    ---
    drivers/staging/hv/storvsc_drv.c | 4 ++--
    1 files changed, 2 insertions(+), 2 deletions(-)

    diff --git a/drivers/staging/hv/storvsc_drv.c b/drivers/staging/hv/storvsc_drv.c
    index 8a58272..060da9e 100644
    --- a/drivers/staging/hv/storvsc_drv.c
    +++ b/drivers/staging/hv/storvsc_drv.c
    @@ -524,7 +524,7 @@ static unsigned int copy_to_bounce_buffer(struct scatterlist *orig_sgl,

    ASSERT(orig_sgl[i].offset + orig_sgl[i].length <= PAGE_SIZE);

    - if (j == 0)
    + if (bounce_addr == 0)
    bounce_addr = (unsigned long)kmap_atomic(sg_page((&bounce_sgl[j])), KM_IRQ0);

    while (srclen) {
    @@ -585,7 +585,7 @@ static unsigned int copy_from_bounce_buffer(struct scatterlist *orig_sgl,
    destlen = orig_sgl[i].length;
    ASSERT(orig_sgl[i].offset + orig_sgl[i].length <= PAGE_SIZE);

    - if (j == 0)
    + if (bounce_addr == 0)
    bounce_addr = (unsigned long)kmap_atomic(sg_page((&bounce_sgl[j])), KM_IRQ0);

    while (destlen) {
    --
    1.7.3.3


    \
     
     \ /
      Last update: 2011-01-02 09:13    [W:2.419 / U:0.260 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site