From: Klaus Strebel <stb@ep-ag.com>
To: David Teigland <teigland@lcse.umn.edu>
Cc: linux-raid@vger.rutgers.edu, linux-lvm@msede.com, gfs-devel@lcse.umn.edu
Subject: Re: [linux-lvm] PATCH: volume drivers in ll_rw_block
Date: Tue, 10 Aug 1999 12:09:09 +0200 [thread overview]
Message-ID: <37AFFA45.FAF773E@ep-ag.com> (raw)
In-Reply-To: Pine.LNX.4.10.9908091418060.9796-100000@orinoco.lcse.umn.edu
David Teigland wrote:
> This eliminates repetitious driver-specific code and provides a clean way
> to make MD, LVM and Pool modular. MD devices can currently be used within
> LVM, but this patch, in a general sense, imposes no limit on the number or
> order in which volumes are built on one another.
>
> Unaddressed by this method is more than one stacked volume driver using
> makerq_fn. If stacking volume drivers, only the bottom one can use a
> make_request function.
>
> The patch below to 2.2.10+raid0145 implements the generic mapping. Two
> other patches can be found at ftp://globalfilesystem.org/pub/GFS/patches/
>
> - modular_md-2.2.10 adds module support for MD using this method.
> - lvm_map-0.7 allows LVM to be used with generic_map.
Hi all,
the lvm_map-0.7 lacks one thing in ll_rw_blk.c, i show below in
generic_map-2.2.10-raid what and where.
> --------------------Cut Here---------------- generic_map-2.2.10-raid
>
> diff -urN linux-raid-1/drivers/block/ll_rw_blk.c linux-raid-2/drivers/block/ll_rw_blk.c
> --- linux-raid-1/drivers/block/ll_rw_blk.c Mon Aug 16 14:42:42 1999
> +++ linux-raid-2/drivers/block/ll_rw_blk.c Mon Aug 16 14:46:08 1999
...
> @@ -619,15 +622,17 @@
> /* Md remaps blocks now */
> bh[i]->b_rdev = bh[i]->b_dev;
> bh[i]->b_rsector=bh[i]->b_blocknr*(bh[i]->b_size >> 9);
-#if defined CONFIG_BLK_DEV_LVM || defined CONFIG_BLK_DEV_LVM_MODULE
- major = MAJOR(bh[i]->b_dev);
- if ( major == LVM_BLK_MAJOR) {
- int ret;
-
- if ( lvm_map_ptr == NULL) {
- printk ( KERN_ERR
- "Bad lvm_map_ptr in ll_rw_block\n");
- goto sorry;
- }
- if ( ( ret = ( lvm_map_ptr) ( MINOR ( bh[i]->b_dev),
- &bh[i]->b_rdev,
- &bh[i]->b_rsector,
- bh[i]->b_size >> 9,
- rw)) != 0) {
- printk ( KERN_ERR
- "Bad lvm_map in ll_rw_block\n");
- goto sorry;
- }
- /* remap major too ... */
- major = MAJOR(bh[i]->b_rdev);
- }
-#endif
> -#ifdef CONFIG_BLK_DEV_MD
> - if (major==MD_MAJOR &&
> - md_map (bh[i]->b_dev, &bh[i]->b_rdev,
> - &bh[i]->b_rsector, bh[i]->b_size >> 9)) {
> - printk (KERN_ERR
> - "Bad md_map in ll_rw_block\n");
> - goto sorry;
> - }
> -#endif
> +
> + tdev = dev;
> + while (tdev->map_fn) {
> + if (tdev->map_fn (bh[i]->b_rdev, &bh[i]->b_rdev,
> + &bh[i]->b_rsector,
> + bh[i]->b_size >> 9)) {
> + printk (KERN_ERR "Bad map in ll_rw_block\n");
> + goto sorry;
> + }
> + tdev = blk_dev + MAJOR(bh[i]->b_rdev);
> + }
> }
>
> if ((rw == WRITE || rw == WRITEA) && is_read_only(bh[0]->b_dev)) {
or : in my 1st effort i just did this :
-#if defined CONFIG_BLK_DEV_LVM || defined CONFIG_BLK_DEV_LVM_MODULE
+#if defined CONFIG_BLK_DEV_LVM_NEVER || defined
CONFIG_BLK_DEV_LVM_MODULE_NEVER
at that place in ll_rw_block. Whithout it, you�ll get the "Bad lvm_map
in ll_rw_block" when fsck tries to read the superblock!
Ciao
Klaus
BTW: I use lvm since release 0.5alpha and had (almost ;-)) never any
problems with it!
--
Klaus Strebel
stb@ep-ag.com
EIGNER + PARTNER AG - The Engineering Warehouse Company -
<http://www.ep-ag.com>
-----------------------------------------------------------------------
next prev parent reply other threads:[~1999-08-10 10:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-08-09 19:52 [linux-lvm] PATCH: volume drivers in ll_rw_block David Teigland
1999-08-10 10:09 ` Klaus Strebel [this message]
1999-08-10 19:39 ` [linux-lvm] " David Teigland
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=37AFFA45.FAF773E@ep-ag.com \
--to=stb@ep-ag.com \
--cc=gfs-devel@lcse.umn.edu \
--cc=linux-lvm@msede.com \
--cc=linux-raid@vger.rutgers.edu \
--cc=teigland@lcse.umn.edu \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox