On Sunday June 18, [EMAIL PROTECTED] wrote:
> This from dmesg might help diagnose the problem:
> 

Yes, that helps a lot, thanks.

The problem is that the reshape thread is restarting before the array
is fully set-up, so it ends up dereferencing a NULL pointer.

This patch should fix it.
In fact, there is a small chance that next time you boot it will work
without this patch, but the patch makes it more reliable.

There definitely should be no data-loss due to this bug.

Thanks,
NeilBrown



### Diffstat output
 ./drivers/md/md.c    |    6 ++++--
 ./drivers/md/raid5.c |    3 ---
 2 files changed, 4 insertions(+), 5 deletions(-)

diff .prev/drivers/md/md.c ./drivers/md/md.c
--- .prev/drivers/md/md.c       2006-05-30 15:07:14.000000000 +1000
+++ ./drivers/md/md.c   2006-06-19 12:01:47.000000000 +1000
@@ -2719,8 +2719,6 @@ static int do_md_run(mddev_t * mddev)
                }
        
        set_bit(MD_RECOVERY_NEEDED, &mddev->recovery);
-       md_wakeup_thread(mddev->thread);
-       
        if (mddev->sb_dirty)
                md_update_sb(mddev);
 
@@ -2738,6 +2736,10 @@ static int do_md_run(mddev_t * mddev)
 
        mddev->changed = 1;
        md_new_event(mddev);
+
+       md_wakeup_thread(mddev->thread);
+       md_wakeup_thread(mddev->sync_thread);
+
        return 0;
 }
 

diff .prev/drivers/md/raid5.c ./drivers/md/raid5.c
--- .prev/drivers/md/raid5.c    2006-06-19 11:56:41.000000000 +1000
+++ ./drivers/md/raid5.c        2006-06-19 11:56:44.000000000 +1000
@@ -2373,9 +2373,6 @@ static int run(mddev_t *mddev)
                set_bit(MD_RECOVERY_RUNNING, &mddev->recovery);
                mddev->sync_thread = md_register_thread(md_do_sync, mddev,
                                                        "%s_reshape");
-               /* FIXME if md_register_thread fails?? */
-               md_wakeup_thread(mddev->sync_thread);
-
        }
 
        /* read-ahead size must cover two whole stripes, which is
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to