Whamcloud - gitweb
Branch b1_8
[fs/lustre-release.git] / lustre / kernel_patches / patches / md-rebuild-policy.patch
index e6c9f9c..62bb484 100644 (file)
@@ -33,15 +33,16 @@ diff -pur linux-2.6.18-53.orig/drivers/md/md.c linux-2.6.18-53/drivers/md/md.c
        { .ctl_name = 0 }
  };
  
-@@ -4980,14 +4998,15 @@ static int is_mddev_idle(mddev_t *mddev)
+@@ -4980,15 +4998,16 @@ static int is_mddev_idle(mddev_t *mddev)
+ {
        mdk_rdev_t * rdev;
-       struct list_head *tmp;
        int idle;
 -      unsigned long curr_events;
 +      unsigned long rw, sync;
  
        idle = 1;
-       ITERATE_RDEV(mddev,rdev,tmp) {
+       rcu_read_lock();
+       rdev_for_each_rcu(rdev, mddev) {
                struct gendisk *disk = rdev->bdev->bd_contains->bd_disk;
 -              curr_events = disk_stat_read(disk, sectors[0]) + 
 -                              disk_stat_read(disk, sectors[1]) -