aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/bitmap.h
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2009-12-13 20:49:53 -0500
committerNeilBrown <neilb@suse.de>2009-12-13 20:51:41 -0500
commit42a04b5078ce73a32f85762551d5703c5bd646a1 (patch)
tree3ef384933cd33d000516c292712da9a99e273360 /drivers/md/bitmap.h
parentc3d9714e88c8685cf9bc837c3241fc005f95fb82 (diff)
md: move offset, daemon_sleep and chunksize out of bitmap structure
... and into bitmap_info. These are all configuration parameters that need to be set before the bitmap is created. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/bitmap.h')
-rw-r--r--drivers/md/bitmap.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/md/bitmap.h b/drivers/md/bitmap.h
index 7e38d13ddcac..50ee4240f5db 100644
--- a/drivers/md/bitmap.h
+++ b/drivers/md/bitmap.h
@@ -106,7 +106,7 @@ typedef __u16 bitmap_counter_t;
106#define BITMAP_BLOCK_SHIFT 9 106#define BITMAP_BLOCK_SHIFT 9
107 107
108/* how many blocks per chunk? (this is variable) */ 108/* how many blocks per chunk? (this is variable) */
109#define CHUNK_BLOCK_RATIO(bitmap) ((bitmap)->chunksize >> BITMAP_BLOCK_SHIFT) 109#define CHUNK_BLOCK_RATIO(bitmap) ((bitmap)->mddev->bitmap_info.chunksize >> BITMAP_BLOCK_SHIFT)
110#define CHUNK_BLOCK_SHIFT(bitmap) ((bitmap)->chunkshift - BITMAP_BLOCK_SHIFT) 110#define CHUNK_BLOCK_SHIFT(bitmap) ((bitmap)->chunkshift - BITMAP_BLOCK_SHIFT)
111#define CHUNK_BLOCK_MASK(bitmap) (CHUNK_BLOCK_RATIO(bitmap) - 1) 111#define CHUNK_BLOCK_MASK(bitmap) (CHUNK_BLOCK_RATIO(bitmap) - 1)
112 112
@@ -209,7 +209,6 @@ struct bitmap {
209 int counter_bits; /* how many bits per block counter */ 209 int counter_bits; /* how many bits per block counter */
210 210
211 /* bitmap chunksize -- how much data does each bit represent? */ 211 /* bitmap chunksize -- how much data does each bit represent? */
212 unsigned long chunksize;
213 unsigned long chunkshift; /* chunksize = 2^chunkshift (for bitops) */ 212 unsigned long chunkshift; /* chunksize = 2^chunkshift (for bitops) */
214 unsigned long chunks; /* total number of data chunks for the array */ 213 unsigned long chunks; /* total number of data chunks for the array */
215 214
@@ -226,7 +225,6 @@ struct bitmap {
226 /* bitmap spinlock */ 225 /* bitmap spinlock */
227 spinlock_t lock; 226 spinlock_t lock;
228 227
229 long offset; /* offset from superblock if file is NULL */
230 struct file *file; /* backing disk file */ 228 struct file *file; /* backing disk file */
231 struct page *sb_page; /* cached copy of the bitmap file superblock */ 229 struct page *sb_page; /* cached copy of the bitmap file superblock */
232 struct page **filemap; /* list of cache pages for the file */ 230 struct page **filemap; /* list of cache pages for the file */
@@ -238,7 +236,6 @@ struct bitmap {
238 236
239 int allclean; 237 int allclean;
240 238
241 unsigned long max_write_behind; /* write-behind mode */
242 atomic_t behind_writes; 239 atomic_t behind_writes;
243 240
244 /* 241 /*
@@ -246,7 +243,6 @@ struct bitmap {
246 * file, cleaning up bits and flushing out pages to disk as necessary 243 * file, cleaning up bits and flushing out pages to disk as necessary
247 */ 244 */
248 unsigned long daemon_lastrun; /* jiffies of last run */ 245 unsigned long daemon_lastrun; /* jiffies of last run */
249 unsigned long daemon_sleep; /* how many seconds between updates? */
250 unsigned long last_end_sync; /* when we lasted called end_sync to 246 unsigned long last_end_sync; /* when we lasted called end_sync to
251 * update bitmap with resync progress */ 247 * update bitmap with resync progress */
252 248