From: Andrew Morton <akpm@linux-foundation.org>
To: Richard Weinberger <richard@nod.at>
Cc: linux-kernel@vger.kernel.org, jdike@addtoit.com,
user-mode-linux-devel@lists.sourceforge.net,
user-mode-linux-user@lists.sourceforge.net, janjaap@bos.nl,
geert@linux-m68k.org, jaxboe@fusionio.com,
martin.petersen@oracle.com, adobriyan@gmail.com,
cdfrey@foursquare.net
Subject: Re: [PATCH 1/1] um: ubd: Fix data corruption
Date: Tue, 28 Sep 2010 15:00:00 -0700 [thread overview]
Message-ID: <20100928150000.f007f43e.akpm@linux-foundation.org> (raw)
In-Reply-To: <1285710456-4435-1-git-send-email-richard@nod.at>
On Tue, 28 Sep 2010 23:47:36 +0200
Richard Weinberger <richard@nod.at> wrote:
> Under high load the file system gets corrupted.
> This patch fixes the issue.
>
> Many thanks to Janjaap Bos <janjaap@bos.nl>!
>
> LKML-Reference: <AANLkTi=PTp7YW_eYxtF-H2QSxgei3whWH59wU0C9oCkz () mail ! gmail ! com>
> Signed-off-by: Richard Weinberger <richard@nod.at>
> ---
> arch/um/drivers/ubd_kern.c | 7 +++++--
> 1 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
> index 1bcd208..2874b83 100644
> --- a/arch/um/drivers/ubd_kern.c
> +++ b/arch/um/drivers/ubd_kern.c
> @@ -748,9 +748,12 @@ static int ubd_open_dev(struct ubd *ubd_dev)
> }
> ubd_dev->fd = fd;
>
> - if(ubd_dev->cow.file != NULL){
> - blk_queue_max_hw_sectors(ubd_dev->queue, 8 * sizeof(long));
> + /* A setting higher than 1 sector currently (>= v2.6.31) generates
> + data loss, both for raw and cow ubd. */
> + blk_queue_max_hw_sectors(ubd_dev->queue, 1 * sizeof(long));
> + blk_queue_max_segments(ubd_dev->queue, 1 * sizeof(long));
>
> + if (ubd_dev->cow.file != NULL) {
> err = -ENOMEM;
> ubd_dev->cow.bitmap = vmalloc(ubd_dev->cow.bitmap_len);
> if(ubd_dev->cow.bitmap == NULL){
This is a workaround, I think? Do we know what the actual bug is?
From the comment it appears to be a regression?
WARNING: multiple messages have this Message-ID (diff)
From: Andrew Morton <akpm@linux-foundation.org>
To: Richard Weinberger <richard@nod.at>
Cc: linux-kernel@vger.kernel.org, jdike@addtoit.com,
user-mode-linux-devel@lists.sourceforge.net,
user-mode-linux-user@lists.sourceforge.net, janjaap@bos.nl,
geert@linux-m68k.org, jaxboe@fusionio.com,
martin.petersen@oracle.com, adobriyan@gmail.com,
cdfrey@foursquare.net
Subject: Re: [PATCH 1/1] um: ubd: Fix data corruption
Date: Tue, 28 Sep 2010 15:00:00 -0700 [thread overview]
Message-ID: <20100928150000.f007f43e.akpm@linux-foundation.org> (raw)
In-Reply-To: <1285710456-4435-1-git-send-email-richard@nod.at>
On Tue, 28 Sep 2010 23:47:36 +0200
Richard Weinberger <richard@nod.at> wrote:
> Under high load the file system gets corrupted.
> This patch fixes the issue.
>
> Many thanks to Janjaap Bos <janjaap@bos.nl>!
>
> LKML-Reference: <AANLkTi=PTp7YW_eYxtF-H2QSxgei3whWH59wU0C9oCkz () mail ! gmail ! com>
> Signed-off-by: Richard Weinberger <richard@nod.at>
> ---
> arch/um/drivers/ubd_kern.c | 7 +++++--
> 1 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
> index 1bcd208..2874b83 100644
> --- a/arch/um/drivers/ubd_kern.c
> +++ b/arch/um/drivers/ubd_kern.c
> @@ -748,9 +748,12 @@ static int ubd_open_dev(struct ubd *ubd_dev)
> }
> ubd_dev->fd = fd;
>
> - if(ubd_dev->cow.file != NULL){
> - blk_queue_max_hw_sectors(ubd_dev->queue, 8 * sizeof(long));
> + /* A setting higher than 1 sector currently (>= v2.6.31) generates
> + data loss, both for raw and cow ubd. */
> + blk_queue_max_hw_sectors(ubd_dev->queue, 1 * sizeof(long));
> + blk_queue_max_segments(ubd_dev->queue, 1 * sizeof(long));
>
> + if (ubd_dev->cow.file != NULL) {
> err = -ENOMEM;
> ubd_dev->cow.bitmap = vmalloc(ubd_dev->cow.bitmap_len);
> if(ubd_dev->cow.bitmap == NULL){
This is a workaround, I think? Do we know what the actual bug is?
>From the comment it appears to be a regression?
next prev parent reply other threads:[~2010-09-28 22:00 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-28 21:47 [PATCH 1/1] um: ubd: Fix data corruption Richard Weinberger
2010-09-28 22:00 ` Andrew Morton [this message]
2010-09-28 22:00 ` Andrew Morton
2010-09-28 22:13 ` Richard Weinberger
2010-09-28 22:52 ` Chris Frey
2010-09-28 23:10 ` Jens Axboe
2010-09-29 0:48 ` Janjaap Bos
2010-09-29 1:29 ` Chris Frey
2010-09-29 5:21 ` Jens Axboe
2010-09-29 6:34 ` Chris Frey
2010-10-04 16:37 ` Tejun Heo
2010-10-04 19:51 ` Chris Frey
2010-10-05 8:23 ` Tejun Heo
2010-10-05 20:31 ` Chris Frey
2010-10-07 7:58 ` Jens Axboe
2010-10-07 20:23 ` Chris Frey
2010-10-14 13:14 ` Tejun Heo
2010-10-14 14:20 ` richard -rw- weinberger
2010-10-14 18:03 ` Tejun Heo
2010-10-14 21:24 ` Richard Weinberger
2010-10-15 4:47 ` Chris Frey
2010-10-02 17:27 ` richard -rw- weinberger
2010-09-29 3:30 ` Chris Frey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100928150000.f007f43e.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=adobriyan@gmail.com \
--cc=cdfrey@foursquare.net \
--cc=geert@linux-m68k.org \
--cc=janjaap@bos.nl \
--cc=jaxboe@fusionio.com \
--cc=jdike@addtoit.com \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=richard@nod.at \
--cc=user-mode-linux-devel@lists.sourceforge.net \
--cc=user-mode-linux-user@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.