Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 305961
b: refs/heads/master
c: 81f382f
h: refs/heads/master
i:
  305959: bc15ff0
v: v3
  • Loading branch information
Jonathan Brassow authored and NeilBrown committed May 22, 2012
1 parent 9df0cdb commit 65a1b1a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 47525e59e40ffb8cbc944c0055e9c4902cd3ee99
refs/heads/master: 81f382f9e0b25ef56b1c0283c900b86b91a5e4c7
11 changes: 7 additions & 4 deletions trunk/drivers/md/dm-raid.c
Original file line number Diff line number Diff line change
Expand Up @@ -614,16 +614,18 @@ static int read_disk_sb(struct md_rdev *rdev, int size)

static void super_sync(struct mddev *mddev, struct md_rdev *rdev)
{
struct md_rdev *r;
int i;
uint64_t failed_devices;
struct dm_raid_superblock *sb;
struct raid_set *rs = container_of(mddev, struct raid_set, md);

sb = page_address(rdev->sb_page);
failed_devices = le64_to_cpu(sb->failed_devices);

rdev_for_each(r, mddev)
if ((r->raid_disk >= 0) && test_bit(Faulty, &r->flags))
failed_devices |= (1ULL << r->raid_disk);
for (i = 0; i < mddev->raid_disks; i++)
if (!rs->dev[i].data_dev ||
test_bit(Faulty, &(rs->dev[i].rdev.flags)))
failed_devices |= (1ULL << i);

memset(sb, 0, sizeof(*sb));

Expand Down Expand Up @@ -1249,6 +1251,7 @@ static void raid_resume(struct dm_target *ti)
{
struct raid_set *rs = ti->private;

set_bit(MD_CHANGE_DEVS, &rs->md.flags);
if (!rs->bitmap_loaded) {
bitmap_load(&rs->md);
rs->bitmap_loaded = 1;
Expand Down

0 comments on commit 65a1b1a

Please sign in to comment.