diff options
author | NeilBrown <neilb@suse.de> | 2010-10-26 02:41:22 -0400 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2010-10-28 02:36:09 -0400 |
commit | 1c4588e9c19cae6209a28c9da2f16a18a610b935 (patch) | |
tree | 74ffb14a5586c3a297b0fd372be5b72cf7e53bcd /drivers/md/raid1.c | |
parent | 6746557f0325a66f57d179126426e38a8ea66945 (diff) |
md/raid1: perform mem allocation before disabling writes during resync.
Though this mem alloc is GFP_NOIO an so will not deadlock, it seems
better to do the allocation before 'raise_barrier' which stops any IO
requests while the resync proceeds.
raid10 always uses this order, so it is at least consistent to do the
same in raid1.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/raid1.c')
-rw-r--r-- | drivers/md/raid1.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index 40f58d3b67ff..6cb6cae1b386 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c | |||
@@ -1749,11 +1749,11 @@ static sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *skipped, i | |||
1749 | msleep_interruptible(1000); | 1749 | msleep_interruptible(1000); |
1750 | 1750 | ||
1751 | bitmap_cond_end_sync(mddev->bitmap, sector_nr); | 1751 | bitmap_cond_end_sync(mddev->bitmap, sector_nr); |
1752 | r1_bio = mempool_alloc(conf->r1buf_pool, GFP_NOIO); | ||
1752 | raise_barrier(conf); | 1753 | raise_barrier(conf); |
1753 | 1754 | ||
1754 | conf->next_resync = sector_nr; | 1755 | conf->next_resync = sector_nr; |
1755 | 1756 | ||
1756 | r1_bio = mempool_alloc(conf->r1buf_pool, GFP_NOIO); | ||
1757 | rcu_read_lock(); | 1757 | rcu_read_lock(); |
1758 | /* | 1758 | /* |
1759 | * If we get a correctably read error during resync or recovery, | 1759 | * If we get a correctably read error during resync or recovery, |