|
@@ -1558,8 +1558,7 @@ static int init_resync(conf_t *conf)
|
|
int buffs;
|
|
int buffs;
|
|
|
|
|
|
buffs = RESYNC_WINDOW / RESYNC_BLOCK_SIZE;
|
|
buffs = RESYNC_WINDOW / RESYNC_BLOCK_SIZE;
|
|
- if (conf->r1buf_pool)
|
|
|
|
- BUG();
|
|
|
|
|
|
+ BUG_ON(conf->r1buf_pool);
|
|
conf->r1buf_pool = mempool_create(buffs, r1buf_pool_alloc, r1buf_pool_free,
|
|
conf->r1buf_pool = mempool_create(buffs, r1buf_pool_alloc, r1buf_pool_free,
|
|
conf->poolinfo);
|
|
conf->poolinfo);
|
|
if (!conf->r1buf_pool)
|
|
if (!conf->r1buf_pool)
|
|
@@ -1732,8 +1731,7 @@ static sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *skipped, i
|
|
!conf->fullsync &&
|
|
!conf->fullsync &&
|
|
!test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery))
|
|
!test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery))
|
|
break;
|
|
break;
|
|
- if (sync_blocks < (PAGE_SIZE>>9))
|
|
|
|
- BUG();
|
|
|
|
|
|
+ BUG_ON(sync_blocks < (PAGE_SIZE>>9));
|
|
if (len > (sync_blocks<<9))
|
|
if (len > (sync_blocks<<9))
|
|
len = sync_blocks<<9;
|
|
len = sync_blocks<<9;
|
|
}
|
|
}
|