Re: data corruption using raid0+lvm2+jfs with 2.6.0-test3

Christophe Saout
2003-08-12T21:09:18Z

Am Di, 2003-08-12 um 22.45 schrieb Tupshin Harper:

> I have an LVM2 setup with four lvm groups. One of those groups sits on
> top of a two disk raid 0 array. When writing to JFS partitions on that
> lvm group, I get frequent, reproducible data corruption. This same setup
> works fine with 2.4.22-pre kernels. The JFS may or may not be relevant,
> since I haven't had a chance to use other filesystems as a control.
> There are a number of instances of the following message associated with
> the data corruption:
>
> raid0_make_request bug: can't convert block across chunks or bigger than
> 8k 12436792 8
>
> The 12436792 varies widely, the rest is always the same. The error is
> coming from drivers/md/raid0.c.

Why don't you try using an LVM2 stripe? That's the same as raid0 does.
And I'm sure it doesn't suffer from such problems because it's handling
bios in a very generic and flexible manner.

Looking at the code:

chunk_size = mddev->chunk_size >> 10;
block = bio->bi_sector >> 1;
if (unlikely(chunk_size < (block & (chunk_size - 1)) + (bio->bi_size >>
10))) { ...
/* Sanity check -- queue functions should prevent this happening */
if (bio->bi_vcnt != 1 ||
bio->bi_idx != 0)
goto bad_map; /* -> error message */

So, it looks like queue functions don't prevent this from happening.

md.c:
blk_queue_max_sectors(mddev->queue, chunk_size >> 9);
blk_queue_segment_boundary(mddev->queue, (chunk_size>>1) - 1);

I'm wondering, why can't there be more than one bvec?

--
Christophe Saout <christophe@saout.de>
Please avoid sending me Word or PowerPoint attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html