[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [linux-lvm] Old problem cropping up again with 0.9 lvm tools?



On Tue, Nov 28, 2000 at 07:51:47PM -0800, John DeFranco wrote:
> Hi,
> 
> I'm having a problem doing a pvcreate on a raid
> device. It fails with:
you should apply the attached patch
but thre is another problem:
vgscan will fail in pv_read
since pv_read.c contains a line which makes it fail if the device is an
me device.

0.8.1 has the same line, but pvread s not calle d by vgscan :)

heinz is there any reason for the code in pv-read.c to exist?

L.

-- 
Luca Berra -- bluca comedia it
    Communication Media & Services S.r.l.
--- Begin Message ---
-- 
Luca Berra -- bluca vodka it
    PGP/GPG Public keys available via keyservers
      DSA: DA24 D16D 05FE A144 7762  BAF8 9307 A167 64C6 3A61
      ElG: 0429 0E81 F546 A3F5 726A  4789 802B 3464 48DF A653
      RSA: 6E 85 91 CA 4D 3B 36 2D  7F DB B1 39 D8 99 CC E6

--- lib/pv_get_size.c.bluca	Mon Nov 13 01:20:11 2000
+++ lib/pv_get_size.c	Sun Nov 26 10:53:09 2000
@@ -87,6 +87,7 @@
       goto pv_get_size_end;
    }
 
+   memset ( disk_dev_name, 0, sizeof ( disk_dev_name));
    if ( ( cache_entry = lvm_dir_cache_find ( dev_name)) != NULL) {
       if ( lvm_check_partitioned_dev ( cache_entry->st_rdev) == TRUE) {
          st_rdev = cache_entry->st_rdev -
@@ -96,14 +97,14 @@
             if ( dir_cache[i].st_rdev == st_rdev)
                break;
          }
-      }
+         strncpy ( disk_dev_name, dir_cache[i].dev_name, sizeof ( disk_dev_name) - 1);
+      } else {
+         strncpy ( disk_dev_name, dev_name, sizeof ( disk_dev_name) - 1);
+	  }
    } else {
       ret = -LVM_EPV_GET_SIZE_LVM_DIR_CACHE;
       goto pv_get_size_end;
    }
-
-   memset ( disk_dev_name, 0, sizeof ( disk_dev_name));
-   strncpy ( disk_dev_name, dir_cache[i].dev_name, sizeof ( disk_dev_name) - 1);
 
    first = 1;
    if ( ( pv_handle = open ( disk_dev_name, O_RDONLY)) == -1) {

--- End Message ---

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]