aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/bitmap.c
diff options
context:
space:
mode:
authorAndre Noll <maan@systemlinux.org>2008-07-11 08:02:23 -0400
committerNeil Brown <neilb@suse.de>2008-07-11 08:02:23 -0400
commit0f420358e3a2abc028320ace7783e2e38cae77bf (patch)
tree99b068212ad1dd8c5e97b151d796d66f53d1f3bb /drivers/md/bitmap.c
parentb73df2d3d629aefa187a0a3574fd81455e026bc8 (diff)
md: Turn rdev->sb_offset into a sector-based quantity.
Rename it to sb_start to make sure all users have been converted. Signed-off-by: Andre Noll <maan@systemlinux.org> Signed-off-by: Neil Brown <neilb@suse.de>
Diffstat (limited to 'drivers/md/bitmap.c')
-rw-r--r--drivers/md/bitmap.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c
index dedba16d42f7..eba83e25b678 100644
--- a/drivers/md/bitmap.c
+++ b/drivers/md/bitmap.c
@@ -225,7 +225,7 @@ static struct page *read_sb_page(mddev_t *mddev, long offset, unsigned long inde
225 || test_bit(Faulty, &rdev->flags)) 225 || test_bit(Faulty, &rdev->flags))
226 continue; 226 continue;
227 227
228 target = (rdev->sb_offset << 1) + offset + index * (PAGE_SIZE/512); 228 target = rdev->sb_start + offset + index * (PAGE_SIZE/512);
229 229
230 if (sync_page_io(rdev->bdev, target, PAGE_SIZE, page, READ)) { 230 if (sync_page_io(rdev->bdev, target, PAGE_SIZE, page, READ)) {
231 page->index = index; 231 page->index = index;
@@ -262,12 +262,12 @@ static int write_sb_page(struct bitmap *bitmap, struct page *page, int wait)
262 /* bitmap runs in to metadata */ 262 /* bitmap runs in to metadata */
263 return -EINVAL; 263 return -EINVAL;
264 if (rdev->data_offset + mddev->size*2 264 if (rdev->data_offset + mddev->size*2
265 > rdev->sb_offset*2 + bitmap->offset) 265 > rdev->sb_start + bitmap->offset)
266 /* data runs in to bitmap */ 266 /* data runs in to bitmap */
267 return -EINVAL; 267 return -EINVAL;
268 } else if (rdev->sb_offset*2 < rdev->data_offset) { 268 } else if (rdev->sb_start < rdev->data_offset) {
269 /* METADATA BITMAP DATA */ 269 /* METADATA BITMAP DATA */
270 if (rdev->sb_offset*2 270 if (rdev->sb_start
271 + bitmap->offset 271 + bitmap->offset
272 + page->index*(PAGE_SIZE/512) + size/512 272 + page->index*(PAGE_SIZE/512) + size/512
273 > rdev->data_offset) 273 > rdev->data_offset)
@@ -277,7 +277,7 @@ static int write_sb_page(struct bitmap *bitmap, struct page *page, int wait)
277 /* DATA METADATA BITMAP - no problems */ 277 /* DATA METADATA BITMAP - no problems */
278 } 278 }
279 md_super_write(mddev, rdev, 279 md_super_write(mddev, rdev,
280 (rdev->sb_offset<<1) + bitmap->offset 280 rdev->sb_start + bitmap->offset
281 + page->index * (PAGE_SIZE/512), 281 + page->index * (PAGE_SIZE/512),
282 size, 282 size,
283 page); 283 page);