On Tue, Sep 28, 2010 at 23:19, richard -rw- weinberger
<richard.weinber...@gmail.com> wrote:
> On Tue, Sep 28, 2010 at 10:37 PM, Geert Uytterhoeven
> <ge...@linux-m68k.org> wrote:
>>
>> This changeset from 2007 indeed moved the update of req->sector.
>>
>> However, in the new code, before or after applying your patch, there's no 
>> update
>> of req->sector anymore. Everything is done in local variables.
>>
>> Is it possible that we only need the hunk below to fix the corruption?
>
> Yes, it seems so. So far all my test cases work fine.
> I'll submit a patch in a few minutes.

Thanks, good to know!

>> | diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
>> | index 5ff5546..655ed9e 100644
>> | --- a/arch/um/drivers/ubd_kern.c
>> | +++ b/arch/um/drivers/ubd_kern.c
>> | @@ -746,8 +746,12 @@ static int ubd_open_dev(struct ubd *ubd_dev)
>> |       }
>> |       ubd_dev->fd = fd;
>> |
>> | +     /* A setting higher than 1 sector currently (v2.6.33) generates
>> | +     data loss, both for raw and cow ubd. */
>> | +     blk_queue_max_sectors(ubd_dev->queue, 1 * sizeof(long));
>> | +     blk_queue_max_phys_segments(ubd_dev->queue, 1 * sizeof(long));
>> | +
>> |       if(ubd_dev->cow.file != NULL){
>> | -             blk_queue_max_sectors(ubd_dev->queue, 8 * sizeof(long));
>> |
>> |               err = -ENOMEM;
>> |               ubd_dev->cow.bitmap = vmalloc(ubd_dev->cow.bitmap_len);

So we can no longer process more than one sector? Why?

Could it be 4d6c84d91d1a539ebc47d1a36a35e9390ba11fdc (ubd: cleanup
completion path),
which is one of the three commits you pointed out?

Before 4d6c84d91d1a539ebc47d1a36a35e9390ba11fdc, blk_end_request() was
only called when
rq->nr_sectors reached zero.
Now it's called for each part.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

Reply via email to