[linux-lvm] Patch request 2.3.43

James Pattinson jamesp at subdimension.com
Fri Feb 11 01:11:39 UTC 2000


Hi -

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

[root at 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 at 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!

Cheers!

James
-------------- next part --------------
***************
*** 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


More information about the linux-lvm mailing list