public inbox for linux-bcache@vger.kernel.org
 help / color / mirror / Atom feed
* register_bcache() error opening /dev/md2: bad block/bucket size
@ 2013-11-30  3:37 Paul B. Henson
  2013-12-02 23:26 ` Paul B. Henson
  0 siblings, 1 reply; 4+ messages in thread
From: Paul B. Henson @ 2013-11-30  3:37 UTC (permalink / raw)
  To: linux-bcache

I'm trying to set up a mirror of two Samsung 840 Pro 256GB SSDs as a
cache device. Per their specs, the page size is 8k, and the erase block
size is 1024k, so I created the cache device as:

make-bcache --wipe-bcache -b 1024k -w 8k -C /dev/md2

With a bucket size equal to the erase block, and a block size equal to
the page size. The documentation on block size wasn't really clear, but
I believe it's supposed to equal the ssd page size, ie, the minimum io
size for the device.

However, when trying to register this cache device, it fails with:

bcache: register_bcache() error opening /dev/md2: Bad block/bucket size

Looking at the code:

                err = "Bad block/bucket size";
                if (!is_power_of_2(sb->block_size) ||
                    sb->block_size > PAGE_SECTORS ||
                    !is_power_of_2(sb->bucket_size) ||
                    sb->bucket_size < PAGE_SECTORS)
                        goto err;

and given PAGE_SIZE = 4096 and PAGE_SECTORS = 8, it's complaining that my
cache device block size of 8k is greater than the page size of 4k. I guess
I could create my cache device with a block size of 4k to make it work, but
that seems inefficient as it does not match the page size. What's this
limitation about? Can it be changed? Are SSD's with a > 4k page size just
poor choices for a cache device?

Thanks...

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-12-16  1:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-30  3:37 register_bcache() error opening /dev/md2: bad block/bucket size Paul B. Henson
2013-12-02 23:26 ` Paul B. Henson
2013-12-16  0:39   ` Jakub Witkowski
2013-12-16  1:02     ` Matthew Patton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox