diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /drivers/md/bitmap.h | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'drivers/md/bitmap.h')
-rw-r--r-- | drivers/md/bitmap.h | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/drivers/md/bitmap.h b/drivers/md/bitmap.h index e872a7bad6b8..b2a127e891ac 100644 --- a/drivers/md/bitmap.h +++ b/drivers/md/bitmap.h | |||
@@ -45,7 +45,7 @@ | |||
45 | * | 45 | * |
46 | * The counter counts pending write requests, plus the on-disk bit. | 46 | * The counter counts pending write requests, plus the on-disk bit. |
47 | * When the counter is '1' and the resync bits are clear, the on-disk | 47 | * When the counter is '1' and the resync bits are clear, the on-disk |
48 | * bit can be cleared aswell, thus setting the counter to 0. | 48 | * bit can be cleared as well, thus setting the counter to 0. |
49 | * When we set a bit, or in the counter (to start a write), if the fields is | 49 | * When we set a bit, or in the counter (to start a write), if the fields is |
50 | * 0, we first set the disk bit and set the counter to 1. | 50 | * 0, we first set the disk bit and set the counter to 1. |
51 | * | 51 | * |
@@ -85,7 +85,6 @@ | |||
85 | typedef __u16 bitmap_counter_t; | 85 | typedef __u16 bitmap_counter_t; |
86 | #define COUNTER_BITS 16 | 86 | #define COUNTER_BITS 16 |
87 | #define COUNTER_BIT_SHIFT 4 | 87 | #define COUNTER_BIT_SHIFT 4 |
88 | #define COUNTER_BYTE_RATIO (COUNTER_BITS / 8) | ||
89 | #define COUNTER_BYTE_SHIFT (COUNTER_BIT_SHIFT - 3) | 88 | #define COUNTER_BYTE_SHIFT (COUNTER_BIT_SHIFT - 3) |
90 | 89 | ||
91 | #define NEEDED_MASK ((bitmap_counter_t) (1 << (COUNTER_BITS - 1))) | 90 | #define NEEDED_MASK ((bitmap_counter_t) (1 << (COUNTER_BITS - 1))) |
@@ -196,19 +195,10 @@ struct bitmap { | |||
196 | 195 | ||
197 | mddev_t *mddev; /* the md device that the bitmap is for */ | 196 | mddev_t *mddev; /* the md device that the bitmap is for */ |
198 | 197 | ||
199 | int counter_bits; /* how many bits per block counter */ | ||
200 | |||
201 | /* bitmap chunksize -- how much data does each bit represent? */ | 198 | /* bitmap chunksize -- how much data does each bit represent? */ |
202 | unsigned long chunkshift; /* chunksize = 2^chunkshift (for bitops) */ | 199 | unsigned long chunkshift; /* chunksize = 2^chunkshift (for bitops) */ |
203 | unsigned long chunks; /* total number of data chunks for the array */ | 200 | unsigned long chunks; /* total number of data chunks for the array */ |
204 | 201 | ||
205 | /* We hold a count on the chunk currently being synced, and drop | ||
206 | * it when the last block is started. If the resync is aborted | ||
207 | * midway, we need to be able to drop that count, so we remember | ||
208 | * the counted chunk.. | ||
209 | */ | ||
210 | unsigned long syncchunk; | ||
211 | |||
212 | __u64 events_cleared; | 202 | __u64 events_cleared; |
213 | int need_sync; | 203 | int need_sync; |
214 | 204 | ||
@@ -271,8 +261,8 @@ int bitmap_startwrite(struct bitmap *bitmap, sector_t offset, | |||
271 | unsigned long sectors, int behind); | 261 | unsigned long sectors, int behind); |
272 | void bitmap_endwrite(struct bitmap *bitmap, sector_t offset, | 262 | void bitmap_endwrite(struct bitmap *bitmap, sector_t offset, |
273 | unsigned long sectors, int success, int behind); | 263 | unsigned long sectors, int success, int behind); |
274 | int bitmap_start_sync(struct bitmap *bitmap, sector_t offset, int *blocks, int degraded); | 264 | int bitmap_start_sync(struct bitmap *bitmap, sector_t offset, sector_t *blocks, int degraded); |
275 | void bitmap_end_sync(struct bitmap *bitmap, sector_t offset, int *blocks, int aborted); | 265 | void bitmap_end_sync(struct bitmap *bitmap, sector_t offset, sector_t *blocks, int aborted); |
276 | void bitmap_close_sync(struct bitmap *bitmap); | 266 | void bitmap_close_sync(struct bitmap *bitmap); |
277 | void bitmap_cond_end_sync(struct bitmap *bitmap, sector_t sector); | 267 | void bitmap_cond_end_sync(struct bitmap *bitmap, sector_t sector); |
278 | 268 | ||