diff options
author | Coly Li <colyli@suse.de> | 2020-07-25 20:00:31 +0800 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-07-25 07:38:20 -0600 |
commit | 21e478ddb29372158746185cc75f5c8e2f4a679a (patch) | |
tree | 58421e41f8fd876dfc3a8373806f223ed4e3d247 /drivers/pcmcia | |
parent | de1fafab649f944d97e45fc043b55a3a5a371744 (diff) |
bcache: handle c->uuids properly for bucket size > 8MB
Bcache allocates a whole bucket to store c->uuids on cache device, and
allocates continuous pages to store it in-memory. When the bucket size
exceeds maximum allocable continuous pages, bch_cache_set_alloc() will
fail and cache device registration will fail.
This patch allocates c->uuids by alloc_meta_bucket_pages(), and uses
ilog2(meta_bucket_pages(c)) to indicate order of c->uuids pages when
free it. When writing c->uuids to cache device, its size is decided
by meta_bucket_pages(c) * PAGE_SECTORS. Now c->uuids is properly handled
for bucket size > 8MB.
Signed-off-by: Coly Li <colyli@suse.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/pcmcia')
0 files changed, 0 insertions, 0 deletions