]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - mdadm.h
FIX: resolve make everything compilation error
[thirdparty/mdadm.git] / mdadm.h
diff --git a/mdadm.h b/mdadm.h
index d862b3ed104b0c8cc02d1beaf4a4a33b33e9b5a7..686d4b489e7645bb25f60a3b3ed08eeb0165f40a 100644 (file)
--- a/mdadm.h
+++ b/mdadm.h
@@ -211,7 +211,7 @@ struct mdinfo {
                unsigned long long recovery_start; /* per-device rebuild position */
                #define MaxSector  (~0ULL) /* resync/recovery complete position */
        };
-       unsigned long           bitmap_offset;  /* 0 == none, 1 == a file */
+       long                    bitmap_offset;  /* 0 == none, 1 == a file */
        unsigned long           safe_mode_delay; /* ms delay to mark clean */
        int                     new_level, delta_disks, new_layout, new_chunk;
        int                     errors;
@@ -740,9 +740,13 @@ extern struct superswitch {
         * initialized to indicate if reshape is being performed at the
         * container or subarray level
         */
+#define APPLY_METADATA_CHANGES         1
+#define ROLLBACK_METADATA_CHANGES      0
+
        int (*reshape_super)(struct supertype *st, long long size, int level,
                             int layout, int chunksize, int raid_disks,
                             int delta_disks, char *backup, char *dev,
+                            int direction,
                             int verbose); /* optional */
        int (*manage_reshape)( /* optional */
                int afd, struct mdinfo *sra, struct reshape *reshape,
@@ -1164,7 +1168,7 @@ extern char *fname_from_uuid(struct supertype *st,
                             struct mdinfo *info, char *buf, char sep);
 extern unsigned long calc_csum(void *super, int bytes);
 extern int enough(int level, int raid_disks, int layout, int clean,
-                  char *avail, int avail_disks);
+                  char *avail);
 extern int enough_fd(int fd);
 extern int ask(char *mesg);
 extern unsigned long long get_component_size(int fd);
@@ -1252,10 +1256,10 @@ static inline int dev2minor(int d)
        return (-1-d) << MdpMinorShift;
 }
 
-static inline int ROUND_UP(int a, int base)
-{
-       return ((a+base-1)/base)*base;
-}
+#define _ROUND_UP(val, base)   (((val) + (base) - 1) & ~(base - 1))
+#define ROUND_UP(val, base)    _ROUND_UP(val, (typeof(val))(base))
+#define ROUND_UP_PTR(ptr, base)        ((typeof(ptr)) \
+                                (ROUND_UP((unsigned long)(ptr), base)))
 
 static inline int is_subarray(char *vers)
 {