aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/bitmap.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2005-11-09 00:39:31 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-09 10:56:38 -0500
commitb2d444d7ad975d555bb919601bcdc0e58975a40e (patch)
tree963a29258af95f05dd28d9de0180ac9ef533aeed /drivers/md/bitmap.c
parentba22dcbf106338a5c46d6979f9b19564faae3d49 (diff)
[PATCH] md: convert 'faulty' and 'in_sync' fields to bits in 'flags' field
This has the advantage of removing the confusion caused by 'rdev_t' and 'mddev_t' both having 'in_sync' fields. Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/md/bitmap.c')
-rw-r--r--drivers/md/bitmap.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c
index e59694bc5758..c5fa4c2a5af1 100644
--- a/drivers/md/bitmap.c
+++ b/drivers/md/bitmap.c
@@ -271,7 +271,8 @@ static struct page *read_sb_page(mddev_t *mddev, long offset, unsigned long inde
271 return ERR_PTR(-ENOMEM); 271 return ERR_PTR(-ENOMEM);
272 272
273 ITERATE_RDEV(mddev, rdev, tmp) { 273 ITERATE_RDEV(mddev, rdev, tmp) {
274 if (! rdev->in_sync || rdev->faulty) 274 if (! test_bit(In_sync, &rdev->flags)
275 || test_bit(Faulty, &rdev->flags))
275 continue; 276 continue;
276 277
277 target = (rdev->sb_offset << 1) + offset + index * (PAGE_SIZE/512); 278 target = (rdev->sb_offset << 1) + offset + index * (PAGE_SIZE/512);
@@ -291,7 +292,8 @@ static int write_sb_page(mddev_t *mddev, long offset, struct page *page, int wai
291 struct list_head *tmp; 292 struct list_head *tmp;
292 293
293 ITERATE_RDEV(mddev, rdev, tmp) 294 ITERATE_RDEV(mddev, rdev, tmp)
294 if (rdev->in_sync && !rdev->faulty) 295 if (test_bit(In_sync, &rdev->flags)
296 && !test_bit(Faulty, &rdev->flags))
295 md_super_write(mddev, rdev, 297 md_super_write(mddev, rdev,
296 (rdev->sb_offset<<1) + offset 298 (rdev->sb_offset<<1) + offset
297 + page->index * (PAGE_SIZE/512), 299 + page->index * (PAGE_SIZE/512),