Repository navigation
Commit 697e234
bcache: explicitly make cache_set only have single cache
Currently although the bcache code has a framework for multiple caches
in a cache set, but indeed the multiple caches never completed and users
use md raid1 for multiple copies of the cached data.
This patch does the following change in struct cache_set, to explicitly
make a cache_set only have single cache,
- Change pointer array "*cache[MAX_CACHES_PER_SET]" to a single pointer
"*cache".
- Remove pointer array "*cache_by_alloc[MAX_CACHES_PER_SET]".
- Remove "caches_loaded".
Now the code looks as exactly what it does in practic: only one cache is
used in the cache set.
Signed-off-by: Coly Li <colyli@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>1 parent 17e4aed commit 697e234
3 files changed
Lines changed: 12 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
501 | 501 | | |
502 | 502 | | |
503 | 503 | | |
504 | | - | |
| 504 | + | |
505 | 505 | | |
506 | 506 | | |
507 | 507 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
519 | 519 | | |
520 | 520 | | |
521 | 521 | | |
522 | | - | |
523 | | - | |
524 | | - | |
| 522 | + | |
525 | 523 | | |
526 | 524 | | |
527 | 525 | | |
| |||
808 | 806 | | |
809 | 807 | | |
810 | 808 | | |
811 | | - | |
| 809 | + | |
812 | 810 | | |
813 | 811 | | |
814 | 812 | | |
| |||
890 | 888 | | |
891 | 889 | | |
892 | 890 | | |
893 | | - | |
| 891 | + | |
894 | 892 | | |
895 | 893 | | |
896 | 894 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1674 | 1674 | | |
1675 | 1675 | | |
1676 | 1676 | | |
1677 | | - | |
| 1677 | + | |
1678 | 1678 | | |
1679 | 1679 | | |
1680 | 1680 | | |
| |||
2165 | 2165 | | |
2166 | 2166 | | |
2167 | 2167 | | |
2168 | | - | |
| 2168 | + | |
2169 | 2169 | | |
2170 | 2170 | | |
2171 | 2171 | | |
| |||
2215 | 2215 | | |
2216 | 2216 | | |
2217 | 2217 | | |
2218 | | - | |
2219 | | - | |
| 2218 | + | |
2220 | 2219 | | |
2221 | | - | |
2222 | | - | |
2223 | | - | |
2224 | | - | |
2225 | | - | |
| 2220 | + | |
| 2221 | + | |
| 2222 | + | |
2226 | 2223 | | |
2227 | 2224 | | |
2228 | 2225 | | |
| |||
2239 | 2236 | | |
2240 | 2237 | | |
2241 | 2238 | | |
2242 | | - | |
2243 | | - | |
| 2239 | + | |
| 2240 | + | |
2244 | 2241 | | |
2245 | 2242 | | |
2246 | 2243 | | |
| |||
0 commit comments