linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] Patch request 2.3.43
@ 2000-02-11  1:11 James Pattinson
  2000-02-11 15:20 ` Heinz Mauelshagen
  0 siblings, 1 reply; 2+ messages in thread
From: James Pattinson @ 2000-02-11  1:11 UTC (permalink / raw)
  To: linux-lvm

[-- Attachment #1: Type: TEXT/PLAIN, Size: 668 bytes --]

Hi -

Just tried applying patch-2.3.40-LVM-0.8i to 2.3.43 and it don't work:

[root@greebo][linux]# patch -p1 -s --dry-run < /root/patch-2.3.40-LVM-0.8i 
2 out of 3 hunks FAILED -- saving rejects to
Documentation/Configure.help.rej
4 out of 10 hunks FAILED -- saving rejects to
drivers/block/ll_rw_blk.c.rej
[root@greebo][linux]#

Ok so I don't care /too/ much about Configure.help but I guess ll_rw_blk.c
is kind of important! *g*

I had a look@the reject file (attached, if anyone cares) and it looks
like some of it could be redundant stuff anyway. However given the amount
of changes between 2.3.40 and 2.3.43 perhaps a new merge needs to be done!

Cheers!

James

[-- Attachment #2: Type: TEXT/PLAIN, Size: 3906 bytes --]

***************
*** 582,587 ****
  		/* MD and loop can't handle plugging without deadlocking */
  		if (major != MD_MAJOR && major != LOOP_MAJOR && 
  		    major != DDV_MAJOR && major != NBD_MAJOR
  		    && q->use_plug)
  			plug_device(q); /* is atomic */
  	} else switch (major) {
--- 596,602 ----
  		/* MD and loop can't handle plugging without deadlocking */
  		if (major != MD_MAJOR && major != LOOP_MAJOR && 
  		    major != DDV_MAJOR && major != NBD_MAJOR
+                     && major != LVM_BLK_MAJOR
  		    && q->use_plug)
  			plug_device(q); /* is atomic */
  	} else switch (major) {
***************
*** 770,781 ****
  			goto sorry;
  		}
  
- 		/* 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);
  #ifdef CONFIG_BLK_DEV_MD
  		if (major==MD_MAJOR &&
- 		    md_map (MINOR(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");
--- 786,819 ----
  			goto sorry;
  		}
  
+ 		/* LVM and MD remap 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) {
+                    if ( lvm_map_ptr == NULL) {
+                               printk ( KERN_ERR
+                                "Bad lvm_map_ptr in ll_rw_block\n");
+                       goto sorry;
+                    }
+                    if ( ( 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 &&
+                     /* changed             v   to allow LVM to remap */
+                     md_map (MINOR(bh[i]->b_rdev), &bh[i]->b_rdev,
  			    &bh[i]->b_rsector, bh[i]->b_size >> 9)) {
  		        printk (KERN_ERR
  				"Bad md_map in ll_rw_block\n");
***************
*** 793,803 ****
  	for (i = 0; i < nr; i++) {
  		set_bit(BH_Req, &bh[i]->b_state);
  #ifdef CONFIG_BLK_DEV_MD
- 		if (MAJOR(bh[i]->b_dev) == MD_MAJOR) {
- 			md_make_request(MINOR (bh[i]->b_dev), rw, bh[i]);
  			continue;
  		}
  #endif
  		__make_request(q, MAJOR(bh[i]->b_rdev), rw, bh[i]);
  	}
  
--- 831,851 ----
  	for (i = 0; i < nr; i++) {
  		set_bit(BH_Req, &bh[i]->b_state);
  #ifdef CONFIG_BLK_DEV_MD
+ 		if (MAJOR(bh[i]->b_rdev) == MD_MAJOR) {
+                         /* remap device for MD too      v */
+ 			md_make_request(MINOR (bh[i]->b_rdev), rw, bh[i]);
  			continue;
  		}
  #endif
+         	/* get correct device request queue after
+                    LVM and/or MD have remapped this buffer */
+ 		if (!(q = get_queue(bh[i]->b_rdev))) {
+ 			printk(KERN_ERR
+ 			"ll_rw_block: Trying to access nonexistent "
+ 	       		"block-device %s (%ld)\n",
+ 			kdevname(bh[0]->b_rdev), bh[0]->b_rsector>>1);
+ 			goto sorry;
+ 		}
  		__make_request(q, MAJOR(bh[i]->b_rdev), rw, bh[i]);
  	}
  
***************
*** 818,826 ****
  	return;
  }
  
- #ifdef CONFIG_STRAM_SWAP
- extern int stram_device_init( void );
- #endif
  
  /*
   * First step of what used to be end_request
--- 866,871 ----
  	return;
  }
  
  
  /*
   * First step of what used to be end_request

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [linux-lvm] Patch request 2.3.43
  2000-02-11  1:11 [linux-lvm] Patch request 2.3.43 James Pattinson
@ 2000-02-11 15:20 ` Heinz Mauelshagen
  0 siblings, 0 replies; 2+ messages in thread
From: Heinz Mauelshagen @ 2000-02-11 15:20 UTC (permalink / raw)
  To: James Pattinson; +Cc: mge, linux-lvm

> Hi -
> 
> Just tried applying patch-2.3.40-LVM-0.8i to 2.3.43 and it don't work:
> 
> [root@greebo][linux]# patch -p1 -s --dry-run < /root/patch-2.3.40-LVM-0.8i 
> 2 out of 3 hunks FAILED -- saving rejects to
> Documentation/Configure.help.rej
> 4 out of 10 hunks FAILED -- saving rejects to
> drivers/block/ll_rw_blk.c.rej
> [root@greebo][linux]#
> 
> Ok so I don't care /too/ much about Configure.help but I guess ll_rw_blk.c
> is kind of important! *g*
> 
> I had a look at the reject file (attached, if anyone cares) and it looks
> like some of it could be redundant stuff anyway. However given the amount
> of changes between 2.3.40 and 2.3.43 perhaps a new merge needs to be done!

Yes, give me a chance at the weekend ;-{)

Heinz

> 
> Cheers!
> 
> James
Content-Description: 

[Attachment, skipping...]


-- 

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Systemmanagement CS-TS                           T-Nova
                                                 Entwicklungszentrum Darmstadt
Heinz Mauelshagen                                Otto-Roehm-Strasse 71c
Senior Systems Engineer                          Postfach 10 05 41
                                                 64205 Darmstadt
mge@EZ-Darmstadt.Telekom.de                      Germany
                                                 +49 6151 886-425
                                                          FAX-386
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-02-11 15:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-02-11  1:11 [linux-lvm] Patch request 2.3.43 James Pattinson
2000-02-11 15:20 ` Heinz Mauelshagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).