LVM + Raid5 + make_request

From: Brian Kress (kressb@icp.siemens.com)
Date: Sat May 27 2000 - 10:37:33 EST


        I'm trying to get the LVM driver working over a raid5
under 2.4.0-test1-ac2. There seems to be a problem with the
LVM and raid5 make_request functions.

"What we have here is a failure to comunnicate."

        LVM remaps the blocks by changing bh->b_rsector.
Raid5 then ignores that field and looks at bh->b_blocknr.
As a result, LVM LVs on a raid5 are broken. Seems this
could be fixed one of three ways:

1) Have LVM change bh->b_blocknr.
2) Have Raid5 use bh->b_rsector instead of computing
    the sector from bh->b_blocknr.
3) Something else.

        Which of these is the Right Way (TM)? I went with
option two. Near the beginning of raid5_make_request, I
changed:

new_sector = raid5_compute_sector(bh->b_blocknr*(bh->b_size>>9),

        To:

new_sector = raid5_compute_sector(bh->b_rsector,

        This seems to work. Is this the right way to fix
this? Or should I do something else? If this is the right
way, can someone make this change?

Brian Kress
kressb@icp.siemens.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed May 31 2000 - 21:00:17 EST