Go to the documentation of this file.
9 #define BITMAP_MAJOR_LO 3
13 #define BITMAP_MAJOR_HI 4
14 #define BITMAP_MAJOR_HOSTENDIAN 3
80 #define PAGE_BITS (PAGE_SIZE << 3)
81 #define PAGE_BIT_SHIFT (PAGE_SHIFT + 3)
83 typedef __u16 bitmap_counter_t;
84 #define COUNTER_BITS 16
85 #define COUNTER_BIT_SHIFT 4
86 #define COUNTER_BYTE_SHIFT (COUNTER_BIT_SHIFT - 3)
88 #define NEEDED_MASK ((bitmap_counter_t) (1 << (COUNTER_BITS - 1)))
89 #define RESYNC_MASK ((bitmap_counter_t) (1 << (COUNTER_BITS - 2)))
90 #define COUNTER_MAX ((bitmap_counter_t) RESYNC_MASK - 1)
91 #define NEEDED(x) (((bitmap_counter_t) x) & NEEDED_MASK)
92 #define RESYNC(x) (((bitmap_counter_t) x) & RESYNC_MASK)
93 #define COUNTER(x) (((bitmap_counter_t) x) & COUNTER_MAX)
96 #define PAGE_COUNTER_RATIO (PAGE_BITS / COUNTER_BITS)
98 #define PAGE_COUNTER_SHIFT (PAGE_BIT_SHIFT - COUNTER_BIT_SHIFT)
100 #define PAGE_COUNTER_MASK (PAGE_COUNTER_RATIO - 1)
102 #define BITMAP_BLOCK_SHIFT 9
110 #define BITMAP_MAGIC 0x6d746962
163 unsigned int hijacked:1;
168 unsigned int pending:1;
172 unsigned int count:30;
178 struct bitmap_counts {
180 struct bitmap_page *bp;
183 unsigned long missing_pages;
185 unsigned long chunkshift;
187 unsigned long chunks;
193 __u64 events_cleared;
196 struct bitmap_storage {
198 struct page *sb_page;
200 struct page **filemap;
202 unsigned long *filemap_attr;
204 unsigned long file_pages;
213 unsigned long behind_writes_used;
219 unsigned long daemon_lastrun;
220 unsigned long last_end_sync;
250 unsigned long sectors,
int behind);
252 unsigned long sectors,
int success,
int behind);
262 int chunksize,
int init);