|
9 | 9 |
|
10 | 10 | #define BITMAP_MAGIC 0x6d746962 |
11 | 11 |
|
| 12 | +/* |
| 13 | + * version 3 is host-endian order, this is deprecated and not used for new |
| 14 | + * array |
| 15 | + */ |
| 16 | +#define BITMAP_MAJOR_LO 3 |
| 17 | +#define BITMAP_MAJOR_HOSTENDIAN 3 |
| 18 | +/* version 4 is little-endian order, the default value */ |
| 19 | +#define BITMAP_MAJOR_HI 4 |
| 20 | +/* version 5 is only used for cluster */ |
| 21 | +#define BITMAP_MAJOR_CLUSTERED 5 |
| 22 | +/* version 6 is only used for lockless bitmap */ |
| 23 | +#define BITMAP_MAJOR_LOCKLESS 6 |
| 24 | + |
12 | 25 | /* use these for bitmap->flags and bitmap->sb->state bit-fields */ |
13 | 26 | enum bitmap_state { |
14 | | - BITMAP_STALE = 1, /* the bitmap file is out of date or had -EIO */ |
| 27 | + BITMAP_STALE = 1, /* the bitmap file is out of date or had -EIO */ |
15 | 28 | BITMAP_WRITE_ERROR = 2, /* A write error has occurred */ |
| 29 | + BITMAP_FIRST_USE = 3, /* llbitmap is just created */ |
| 30 | + BITMAP_CLEAN = 4, /* llbitmap is created with assume_clean */ |
| 31 | + BITMAP_DAEMON_BUSY = 5, /* llbitmap daemon is not finished after daemon_sleep */ |
16 | 32 | BITMAP_HOSTENDIAN =15, |
17 | 33 | }; |
18 | 34 |
|
@@ -166,4 +182,17 @@ static inline void md_bitmap_exit(void) |
166 | 182 | } |
167 | 183 | #endif |
168 | 184 |
|
| 185 | +#ifdef CONFIG_MD_LLBITMAP |
| 186 | +int md_llbitmap_init(void); |
| 187 | +void md_llbitmap_exit(void); |
| 188 | +#else |
| 189 | +static inline int md_llbitmap_init(void) |
| 190 | +{ |
| 191 | + return 0; |
| 192 | +} |
| 193 | +static inline void md_llbitmap_exit(void) |
| 194 | +{ |
| 195 | +} |
| 196 | +#endif |
| 197 | + |
169 | 198 | #endif |
0 commit comments