diff options
| author | NeilBrown <neilb@suse.de> | 2015-05-08 04:19:32 -0400 |
|---|---|---|
| committer | NeilBrown <neilb@suse.de> | 2015-05-08 04:46:52 -0400 |
| commit | b0c783b32318bef29d64086fa812e8c659cb5b37 (patch) | |
| tree | bda4be5d9eb7fdca4d0d42a227de170a986ec424 /drivers | |
| parent | f18c1a35f62caccb527e8b0990c8801596e7c662 (diff) | |
md/raid5: more incorrect BUG_ON in handle_stripe_fill.
It is not incorrect to call handle_stripe_fill() when
a batch of full-stripe writes is active.
It is, however, a BUG if fetch_block() then decides
it needs to actually fetch anything.
So move the 'BUG_ON' to where it belongs.
Signed-off-by: NeilBrown <neilb@suse.de>
Fixes: 59fc630b8b5f ("RAID5: batch adjacent full stripe write")
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/md/raid5.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 91a1e8b26b52..415cac6d89bd 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c | |||
| @@ -3302,6 +3302,7 @@ static int fetch_block(struct stripe_head *sh, struct stripe_head_state *s, | |||
| 3302 | */ | 3302 | */ |
| 3303 | BUG_ON(test_bit(R5_Wantcompute, &dev->flags)); | 3303 | BUG_ON(test_bit(R5_Wantcompute, &dev->flags)); |
| 3304 | BUG_ON(test_bit(R5_Wantread, &dev->flags)); | 3304 | BUG_ON(test_bit(R5_Wantread, &dev->flags)); |
| 3305 | BUG_ON(sh->batch_head); | ||
| 3305 | if ((s->uptodate == disks - 1) && | 3306 | if ((s->uptodate == disks - 1) && |
| 3306 | (s->failed && (disk_idx == s->failed_num[0] || | 3307 | (s->failed && (disk_idx == s->failed_num[0] || |
| 3307 | disk_idx == s->failed_num[1]))) { | 3308 | disk_idx == s->failed_num[1]))) { |
| @@ -3370,7 +3371,6 @@ static void handle_stripe_fill(struct stripe_head *sh, | |||
| 3370 | { | 3371 | { |
| 3371 | int i; | 3372 | int i; |
| 3372 | 3373 | ||
| 3373 | BUG_ON(sh->batch_head); | ||
| 3374 | /* look for blocks to read/compute, skip this if a compute | 3374 | /* look for blocks to read/compute, skip this if a compute |
| 3375 | * is already in flight, or if the stripe contents are in the | 3375 | * is already in flight, or if the stripe contents are in the |
| 3376 | * midst of changing due to a write | 3376 | * midst of changing due to a write |
