Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 176100
b: refs/heads/master
c: 4e59ca7
h: refs/heads/master
v: v3
  • Loading branch information
Dan Williams authored and NeilBrown committed Dec 14, 2009
1 parent 50d5b03 commit f613c09
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 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: 93be75ffde6dfd1ad17cc3ff1dbd135bd711baf4
refs/heads/master: 4e59ca7da05f0d5d3ad40365c502c8b0fd24c7e3
8 changes: 6 additions & 2 deletions trunk/drivers/md/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -6526,12 +6526,14 @@ void md_do_sync(mddev_t *mddev)
/* recovery follows the physical size of devices */
max_sectors = mddev->dev_sectors;
j = MaxSector;
list_for_each_entry(rdev, &mddev->disks, same_set)
rcu_read_lock();
list_for_each_entry_rcu(rdev, &mddev->disks, same_set)
if (rdev->raid_disk >= 0 &&
!test_bit(Faulty, &rdev->flags) &&
!test_bit(In_sync, &rdev->flags) &&
rdev->recovery_offset < j)
j = rdev->recovery_offset;
rcu_read_unlock();
}

printk(KERN_INFO "md: %s of RAID array %s\n", desc, mdname(mddev));
Expand Down Expand Up @@ -6701,12 +6703,14 @@ void md_do_sync(mddev_t *mddev)
} else {
if (!test_bit(MD_RECOVERY_INTR, &mddev->recovery))
mddev->curr_resync = MaxSector;
list_for_each_entry(rdev, &mddev->disks, same_set)
rcu_read_lock();
list_for_each_entry_rcu(rdev, &mddev->disks, same_set)
if (rdev->raid_disk >= 0 &&
!test_bit(Faulty, &rdev->flags) &&
!test_bit(In_sync, &rdev->flags) &&
rdev->recovery_offset < mddev->curr_resync)
rdev->recovery_offset = mddev->curr_resync;
rcu_read_unlock();
}
}
set_bit(MD_CHANGE_DEVS, &mddev->flags);
Expand Down

0 comments on commit f613c09

Please sign in to comment.