• C
    bcache: handle c->uuids properly for bucket size > 8MB · 21e478dd
    Coly Li 提交于
    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: NColy Li <colyli@suse.de>
    Reviewed-by: NHannes Reinecke <hare@suse.de>
    Signed-off-by: NJens Axboe <axboe@kernel.dk>
    21e478dd
super.c 71.6 KB