]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - mdadm.h
Bitmap_offset is a signed number
[thirdparty/mdadm.git] / mdadm.h
diff --git a/mdadm.h b/mdadm.h
index e5dac79ca8829fb9d2d8116c182f654faf9c930d..9f58800c7969acf630be2c2d037a3ff62f962af3 100644 (file)
--- a/mdadm.h
+++ b/mdadm.h
@@ -211,17 +211,13 @@ struct mdinfo {
                unsigned long long recovery_start; /* per-device rebuild position */
                #define MaxSector  (~0ULL) /* resync/recovery complete position */
        };
+       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;
        unsigned long           cache_size; /* size of raid456 stripe cache*/
        int                     mismatch_cnt;
        char                    text_version[50];
-       void                    *update_private; /* for passing metadata-format
-                                                 * specific update data
-                                                 * between successive calls to
-                                                 * update_super()
-                                                 */
 
        int container_member; /* for assembling external-metatdata arrays
                               * This is to be used internally by metadata
@@ -325,6 +321,7 @@ enum special_options {
        UdevRules,
        FreezeReshape,
        Continue,
+       OffRootOpt,
 };
 
 /* structures read from config file */
@@ -453,11 +450,13 @@ enum sysfs_read_flags {
        GET_DISKS       = (1 << 7),
        GET_DEGRADED    = (1 << 8),
        GET_SAFEMODE    = (1 << 9),
-       GET_DEVS        = (1 << 10), /* gets role, major, minor */
-       GET_OFFSET      = (1 << 11),
-       GET_SIZE        = (1 << 12),
-       GET_STATE       = (1 << 13),
-       GET_ERROR       = (1 << 14),
+       GET_BITMAP_LOCATION = (1 << 10),
+
+       GET_DEVS        = (1 << 20), /* gets role, major, minor */
+       GET_OFFSET      = (1 << 21),
+       GET_SIZE        = (1 << 22),
+       GET_STATE       = (1 << 23),
+       GET_ERROR       = (1 << 24),
 };
 
 /* If fd >= 0, get the array it is open on,
@@ -869,6 +868,7 @@ struct supertype {
                        *  external:/md0/12
                        */
        int devcnt;
+       int retry_soon;
 
        struct mdinfo *devs;
 
@@ -1145,6 +1145,7 @@ extern char *conf_get_homehost(int *require_homehostp);
 extern char *conf_line(FILE *file);
 extern char *conf_word(FILE *file, int allow_key);
 extern int conf_name_is_free(char *name);
+extern int conf_verify_devnames(struct mddev_ident *array_list);
 extern int devname_matches(char *name, char *match);
 extern struct mddev_ident *conf_match(struct supertype *st,
                                      struct mdinfo *info,
@@ -1163,7 +1164,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);
@@ -1251,10 +1252,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)
 {
@@ -1382,3 +1383,5 @@ static inline int xasprintf(char **strp, const char *fmt, ...) {
 
 #define PROCESS_DELAYED -2
 #define PROCESS_PENDING -3
+
+extern int __offroot;