diff options
author | NeilBrown <neilb@suse.de> | 2012-05-21 23:55:14 -0400 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2012-05-21 23:55:14 -0400 |
commit | 84e923453e19d6427c6aa884d9561f01e1425d09 (patch) | |
tree | 6e7421a9a15419ace1377e4338ee2e9c4ed38f67 /drivers/md | |
parent | edbb79df6731bb1e99c15f5a519a864d488f4808 (diff) |
md/bitmap: remove single-bit manipulation on sb->state
Just do single-bit manipulations on bitmap->flags and copy whole
value between that and sb->state.
This will allow next patch which changes how bit manipulations are
performed on bitmap->flags.
This does result in BITMAP_STALE not being set in sb by
bitmap_read_sb, however as the setting is determined by other
information in the 'sb' we do not lose information this way.
Normally, bitmap_load will be called shortly which will clear
BITMAP_STALE anyway.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/bitmap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c index 2d25f3aebd4e..09d360ff77dc 100644 --- a/drivers/md/bitmap.c +++ b/drivers/md/bitmap.c | |||
@@ -522,7 +522,7 @@ static int bitmap_new_disk_sb(struct bitmap *bitmap) | |||
522 | memcpy(sb->uuid, bitmap->mddev->uuid, 16); | 522 | memcpy(sb->uuid, bitmap->mddev->uuid, 16); |
523 | 523 | ||
524 | bitmap->flags |= BITMAP_STALE; | 524 | bitmap->flags |= BITMAP_STALE; |
525 | sb->state |= cpu_to_le32(BITMAP_STALE); | 525 | sb->state = cpu_to_le32(bitmap->flags); |
526 | bitmap->events_cleared = bitmap->mddev->events; | 526 | bitmap->events_cleared = bitmap->mddev->events; |
527 | sb->events_cleared = cpu_to_le64(bitmap->mddev->events); | 527 | sb->events_cleared = cpu_to_le64(bitmap->mddev->events); |
528 | 528 | ||
@@ -617,7 +617,7 @@ static int bitmap_read_sb(struct bitmap *bitmap) | |||
617 | "-- forcing full recovery\n", | 617 | "-- forcing full recovery\n", |
618 | bmname(bitmap), events, | 618 | bmname(bitmap), events, |
619 | (unsigned long long) bitmap->mddev->events); | 619 | (unsigned long long) bitmap->mddev->events); |
620 | sb->state |= cpu_to_le32(BITMAP_STALE); | 620 | bitmap->flags |= BITMAP_STALE; |
621 | } | 621 | } |
622 | } | 622 | } |
623 | 623 | ||