[linux-lvm] proposed change in lvm_dir_cache.c

Michael Marxmeier mike at msede.com
Sun Feb 27 20:03:50 UTC 2000


The patch below will work around a problem with the LVM scan code.
If no valid block devices could be found using /proc/partitions 
the LVM scan code will fallback to scan /dev.

This happened to me when compiling devfs in the kernel without
mounting it in /dev (by using the devfs=nomount option).
In this case /proc/partitions returns block device names
relative to the devfs mount point.

Michael

--- 0.8final/tools/lib/lvm_dir_cache.c.orig     Sun Feb 27 20:46:41
2000
+++ 0.8final/tools/lib/lvm_dir_cache.c  Sun Feb 27 20:47:23 2000
@@ -91,7 +91,8 @@
              }
          }   
          fclose ( proc);
-      } else {
+      }
+      if(!cache_size) {
          for ( d = 0; devdir[d] != NULL; d++) {
             dirname = devdir[d];
 #ifdef DEBUG

-- 
Michael Marxmeier           Marxmeier Software AG
E-Mail: mike at msede.com      Besenbruchstrasse 9
Phone : +49 202 2431440     42285 Wuppertal, Germany
Fax   : +49 202 2431420     http://www.msede.com/



More information about the linux-lvm mailing list