Skip to content

Commit

Permalink
md: remove needless setting of thread->timeout in raid10_quiesce
Browse files Browse the repository at this point in the history
As bitmap_create and bitmap_destroy already set thread->timeout
as appropriate, there is no need to do it in raid10_quiesce.
There is a possible need to wake the thread after the timeout
has been set low, but it is better to do that where the timeout
is actually set low, in bitmap_create.

Signed-off-by: NeilBrown <neilb@suse.de>
  • Loading branch information
NeilBrown committed Dec 14, 2009
1 parent 1b04be9 commit 9cd30fd
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
1 change: 1 addition & 0 deletions drivers/md/bitmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1695,6 +1695,7 @@ int bitmap_create(mddev_t *mddev)
mddev->bitmap = bitmap;

mddev->thread->timeout = mddev->bitmap_info.daemon_sleep;
md_wakeup_thread(mddev->thread);

bitmap_update_sb(bitmap);

Expand Down
7 changes: 0 additions & 7 deletions drivers/md/raid10.c
Original file line number Diff line number Diff line change
Expand Up @@ -2275,13 +2275,6 @@ static void raid10_quiesce(mddev_t *mddev, int state)
lower_barrier(conf);
break;
}
if (mddev->thread) {
if (mddev->bitmap)
mddev->thread->timeout = mddev->bitmap_info.daemon_sleep;
else
mddev->thread->timeout = MAX_SCHEDULE_TIMEOUT;
md_wakeup_thread(mddev->thread);
}
}

static struct mdk_personality raid10_personality =
Expand Down

0 comments on commit 9cd30fd

Please sign in to comment.