| 1274 | } |
| 1275 | |
| 1276 | static int |
| 1277 | ztest_random_blocksize(void) |
| 1278 | { |
| 1279 | ASSERT(ztest_spa->spa_max_ashift != 0); |
| 1280 | |
| 1281 | /* |
| 1282 | * Choose a block size >= the ashift. |
| 1283 | * If the SPA supports new MAXBLOCKSIZE, test up to 1MB blocks. |
| 1284 | */ |
| 1285 | int maxbs = SPA_OLD_MAXBLOCKSHIFT; |
| 1286 | if (spa_maxblocksize(ztest_spa) == SPA_MAXBLOCKSIZE) |
| 1287 | maxbs = 20; |
| 1288 | uint64_t block_shift = |
| 1289 | ztest_random(maxbs - ztest_spa->spa_max_ashift + 1); |
| 1290 | return (1 << (SPA_MINBLOCKSHIFT + block_shift)); |
| 1291 | } |
| 1292 | |
| 1293 | static int |
| 1294 | ztest_random_dnodesize(void) |
no test coverage detected