Home
last modified time | relevance | path

Searched hist:"21 e478ddb29372158746185cc75f5c8e2f4a679a" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/md/bcache/
H A Dsuper.cdiff 21e478ddb29372158746185cc75f5c8e2f4a679a Sat Jul 25 07:00:31 CDT 2020 Coly Li <colyli@suse.de> 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>