Lines Matching defs:bitmap

3  * bitmap.h: Copyright (C) Peter T. Breuer (ptb@ot.uc3m.es) 2003
11 /* version 4 insists the bitmap is in little-endian order
20 * in-memory bitmap:
110 * bitmap structures:
115 /* use these for bitmap->flags and bitmap->sb->state bit-fields */
117 BITMAP_STALE = 1, /* the bitmap file is out of date or had -EIO */
122 /* the superblock at the front of the bitmap file -- little endian */
125 __le32 version; /* 4 the bitmap major for now, could change... */
127 __le64 events; /* 24 event counter for the bitmap (1)*/
130 __le32 state; /* 48 bitmap state information */
131 __le32 chunksize; /* 52 the bitmap chunk size in bytes */
135 * reserved for the bitmap. */
143 * When a bitmap is loaded, it is only accepted if this event counter is equal
149 * higher, it is accepted as conforming to the bitmap.
150 * (3)This is the number of sectors represented by the bitmap, and is the range that
157 /* the in-memory bitmap is represented by bitmap_pages */
179 /* the main bitmap structure - one per mddev */
180 struct bitmap {
186 * in the bitmap */
195 struct mddev *mddev; /* the md device that the bitmap is for */
202 struct page *sb_page; /* cached copy of the bitmap
210 unsigned long bytes; /* total bytes in the bitmap */
221 * the bitmap daemon - periodically wakes up and sweeps the bitmap
226 * update bitmap with resync progress */
228 atomic_t pending_writes; /* pending writes to the bitmap file */
237 /* the bitmap API */
239 /* these are used only by md/bitmap */
240 struct bitmap *md_bitmap_create(struct mddev *mddev, int slot);
245 void md_bitmap_print_sb(struct bitmap *bitmap);
246 void md_bitmap_update_sb(struct bitmap *bitmap);
247 void md_bitmap_status(struct seq_file *seq, struct bitmap *bitmap);
249 int md_bitmap_setallbits(struct bitmap *bitmap);
250 void md_bitmap_write_all(struct bitmap *bitmap);
252 void md_bitmap_dirty_bits(struct bitmap *bitmap, unsigned long s, unsigned long e);
255 int md_bitmap_startwrite(struct bitmap *bitmap, sector_t offset,
257 void md_bitmap_endwrite(struct bitmap *bitmap, sector_t offset,
259 int md_bitmap_start_sync(struct bitmap *bitmap, sector_t offset, sector_t *blocks, int degraded);
260 void md_bitmap_end_sync(struct bitmap *bitmap, sector_t offset, sector_t *blocks, int aborted);
261 void md_bitmap_close_sync(struct bitmap *bitmap);
262 void md_bitmap_cond_end_sync(struct bitmap *bitmap, sector_t sector, bool force);
267 void md_bitmap_unplug(struct bitmap *bitmap);
268 void md_bitmap_unplug_async(struct bitmap *bitmap);
271 int md_bitmap_resize(struct bitmap *bitmap, sector_t blocks,
273 struct bitmap *get_bitmap_from_slot(struct mddev *mddev, int slot);
276 void md_bitmap_free(struct bitmap *bitmap);
279 static inline bool md_bitmap_enabled(struct bitmap *bitmap)
281 return bitmap && bitmap->storage.filemap &&
282 !test_bit(BITMAP_STALE, &bitmap->flags);