Small patch for activating mirrored configurations

Erik Agsjö erik.agsjo at noptec.com
Sun Oct 3 22:44:48 UTC 2004


Here's a small dmraid patch for avoiding division by zero errors when
activating zero stride configurations such as my mirrored sil3112 setup.

I've finally managed to boot from my mirrored setup, after hours of
initrd'ing..

/Erik

--- lib/activate/activate.c     Tue Sep  7 13:18:30 2004
+++ /home/erkkah/downloads/dmraid/1.0.0-rc4/lib/activate/activate.c     Thu Sep 23 22:01:57 2004
@@ -19,7 +19,7 @@
        struct dmraid_set *r;
        struct dmraid_dev *rd;
  
-       if (min % rs->stride)
+       if ((rs->stride != 0) && (min % rs->stride != 0))
                min += rs->stride;
  
        list_for_each_entry(r, &rs->sets, list) {





More information about the Ataraid-list mailing list