]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - bitmap.h
clustermd_tests: add test case to test manage_re-add against cluster-raid10
[thirdparty/mdadm.git] / bitmap.h
index 02a4e97acabc507e7f75697e39116589435e67bd..7b1f80f2e8f64a80ddf298e936d579e813d6cf36 100644 (file)
--- a/bitmap.h
+++ b/bitmap.h
@@ -6,7 +6,14 @@
 #ifndef BITMAP_H
 #define BITMAP_H 1
 
-#define BITMAP_MAJOR 3
+#define BITMAP_MAJOR_LO 3
+/* version 4 insists the bitmap is in little-endian order
+ * with version 3, it is host-endian which is non-portable
+ */
+#define BITMAP_MAJOR_HI 4
+#define        BITMAP_MAJOR_HOSTENDIAN 3
+#define        BITMAP_MAJOR_CLUSTERED 5
+
 #define BITMAP_MINOR 39
 
 /*
@@ -39,7 +46,7 @@
  *
  * The counter counts pending write requests, plus the on-disk bit.
  * When the counter is '1' and the resync bits are clear, the on-disk
- * bit can be cleared aswell, thus setting the counter to 0.
+ * bit can be cleared as well, thus setting the counter to 0.
  * When we set a bit, or in the counter (to start a write), if the fields is
  * 0, we first set the disk bit and set the counter to 1.
  *
@@ -148,15 +155,18 @@ typedef struct bitmap_super_s {
        __u32 chunksize;    /* 52  the bitmap chunk size in bytes */
        __u32 daemon_sleep; /* 56  seconds between disk flushes */
        __u32 write_behind; /* 60  number of outstanding write-behind writes */
-
-       __u8  pad[256 - 64]; /* set to zero */
+       __u32 sectors_reserved; /* 64 number of 512-byte sectors that are
+                                * reserved for the bitmap. */
+       __u32 nodes;        /* 68 the maximum number of nodes in cluster. */
+       __u8 cluster_name[64]; /* 72 cluster name to which this md belongs */
+       __u8  pad[256 - 136]; /* set to zero */
 } bitmap_super_t;
 
 /* notes:
  * (1) This event counter is updated before the eventcounter in the md superblock
  *    When a bitmap is loaded, it is only accepted if this event counter is equal
  *    to, or one greater than, the event counter in the superblock.
- * (2) This event counter is updated when the other one is *if*and*only*if* the 
+ * (2) This event counter is updated when the other one is *if*and*only*if* the
  *    array is not degraded.  As bits are not cleared when the array is degraded,
  *    this represents the last time that any bits were cleared.
  *    If a device is being added that has an event count with this value or
@@ -175,13 +185,13 @@ struct bitmap_page {
         */
        char *map;
        /*
-        * in emergencies (when map cannot be alloced), hijack the map
+        * in emergencies (when map cannot be allocated), hijack the map
         * pointer and use it as two counters itself
         */
        unsigned int hijacked;
        /*
         * count of dirty bits on the page
-        */ 
+        */
        int count;
 };