diff options
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r-- | drivers/md/md.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index d646f6e444f0..67642bacd597 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -1604,11 +1604,8 @@ static int super_1_validate(struct mddev *mddev, struct md_rdev *rdev) | |||
1604 | mddev->new_chunk_sectors = mddev->chunk_sectors; | 1604 | mddev->new_chunk_sectors = mddev->chunk_sectors; |
1605 | } | 1605 | } |
1606 | 1606 | ||
1607 | if (le32_to_cpu(sb->feature_map) & MD_FEATURE_JOURNAL) { | 1607 | if (le32_to_cpu(sb->feature_map) & MD_FEATURE_JOURNAL) |
1608 | set_bit(MD_HAS_JOURNAL, &mddev->flags); | 1608 | set_bit(MD_HAS_JOURNAL, &mddev->flags); |
1609 | if (mddev->recovery_cp == MaxSector) | ||
1610 | set_bit(MD_JOURNAL_CLEAN, &mddev->flags); | ||
1611 | } | ||
1612 | } else if (mddev->pers == NULL) { | 1609 | } else if (mddev->pers == NULL) { |
1613 | /* Insist of good event counter while assembling, except for | 1610 | /* Insist of good event counter while assembling, except for |
1614 | * spares (which don't need an event count) */ | 1611 | * spares (which don't need an event count) */ |
@@ -5851,6 +5848,9 @@ static int get_array_info(struct mddev *mddev, void __user *arg) | |||
5851 | working++; | 5848 | working++; |
5852 | if (test_bit(In_sync, &rdev->flags)) | 5849 | if (test_bit(In_sync, &rdev->flags)) |
5853 | insync++; | 5850 | insync++; |
5851 | else if (test_bit(Journal, &rdev->flags)) | ||
5852 | /* TODO: add journal count to md_u.h */ | ||
5853 | ; | ||
5854 | else | 5854 | else |
5855 | spare++; | 5855 | spare++; |
5856 | } | 5856 | } |
@@ -7862,6 +7862,7 @@ void md_do_sync(struct md_thread *thread) | |||
7862 | */ | 7862 | */ |
7863 | 7863 | ||
7864 | do { | 7864 | do { |
7865 | int mddev2_minor = -1; | ||
7865 | mddev->curr_resync = 2; | 7866 | mddev->curr_resync = 2; |
7866 | 7867 | ||
7867 | try_again: | 7868 | try_again: |
@@ -7891,10 +7892,14 @@ void md_do_sync(struct md_thread *thread) | |||
7891 | prepare_to_wait(&resync_wait, &wq, TASK_INTERRUPTIBLE); | 7892 | prepare_to_wait(&resync_wait, &wq, TASK_INTERRUPTIBLE); |
7892 | if (!test_bit(MD_RECOVERY_INTR, &mddev->recovery) && | 7893 | if (!test_bit(MD_RECOVERY_INTR, &mddev->recovery) && |
7893 | mddev2->curr_resync >= mddev->curr_resync) { | 7894 | mddev2->curr_resync >= mddev->curr_resync) { |
7894 | printk(KERN_INFO "md: delaying %s of %s" | 7895 | if (mddev2_minor != mddev2->md_minor) { |
7895 | " until %s has finished (they" | 7896 | mddev2_minor = mddev2->md_minor; |
7896 | " share one or more physical units)\n", | 7897 | printk(KERN_INFO "md: delaying %s of %s" |
7897 | desc, mdname(mddev), mdname(mddev2)); | 7898 | " until %s has finished (they" |
7899 | " share one or more physical units)\n", | ||
7900 | desc, mdname(mddev), | ||
7901 | mdname(mddev2)); | ||
7902 | } | ||
7898 | mddev_put(mddev2); | 7903 | mddev_put(mddev2); |
7899 | if (signal_pending(current)) | 7904 | if (signal_pending(current)) |
7900 | flush_signals(current); | 7905 | flush_signals(current); |
@@ -8275,16 +8280,13 @@ no_add: | |||
8275 | static void md_start_sync(struct work_struct *ws) | 8280 | static void md_start_sync(struct work_struct *ws) |
8276 | { | 8281 | { |
8277 | struct mddev *mddev = container_of(ws, struct mddev, del_work); | 8282 | struct mddev *mddev = container_of(ws, struct mddev, del_work); |
8278 | int ret = 0; | ||
8279 | 8283 | ||
8280 | mddev->sync_thread = md_register_thread(md_do_sync, | 8284 | mddev->sync_thread = md_register_thread(md_do_sync, |
8281 | mddev, | 8285 | mddev, |
8282 | "resync"); | 8286 | "resync"); |
8283 | if (!mddev->sync_thread) { | 8287 | if (!mddev->sync_thread) { |
8284 | if (!(mddev_is_clustered(mddev) && ret == -EAGAIN)) | 8288 | printk(KERN_ERR "%s: could not start resync thread...\n", |
8285 | printk(KERN_ERR "%s: could not start resync" | 8289 | mdname(mddev)); |
8286 | " thread...\n", | ||
8287 | mdname(mddev)); | ||
8288 | /* leave the spares where they are, it shouldn't hurt */ | 8290 | /* leave the spares where they are, it shouldn't hurt */ |
8289 | clear_bit(MD_RECOVERY_SYNC, &mddev->recovery); | 8291 | clear_bit(MD_RECOVERY_SYNC, &mddev->recovery); |
8290 | clear_bit(MD_RECOVERY_RESHAPE, &mddev->recovery); | 8292 | clear_bit(MD_RECOVERY_RESHAPE, &mddev->recovery); |