Commit 34a2cf3
bcache: move calculation of stripe_size and io_opt into bcache_device_init
bcache currently calculates the stripe size for the non-cached_dev
case directly in bcache_device_init, but for the cached_dev case it does
it in the caller. Consolidate it in one places, which also enables
setting the io_opt queue_limit before allocating the gendisk so that it
can be passed in instead of changing the limit just after the allocation.
Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Coly Li <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>1 parent 0e46064 commit 34a2cf3
1 file changed
+5
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
913 | 913 | | |
914 | 914 | | |
915 | 915 | | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
916 | 920 | | |
917 | 921 | | |
918 | 922 | | |
| |||
1418 | 1422 | | |
1419 | 1423 | | |
1420 | 1424 | | |
1421 | | - | |
1422 | | - | |
1423 | | - | |
| 1425 | + | |
1424 | 1426 | | |
1425 | 1427 | | |
1426 | 1428 | | |
| |||
1430 | 1432 | | |
1431 | 1433 | | |
1432 | 1434 | | |
1433 | | - | |
1434 | | - | |
1435 | | - | |
1436 | 1435 | | |
1437 | 1436 | | |
1438 | 1437 | | |
| |||
0 commit comments