mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-02-02 00:00:03 +03:00
7721b11a60
As discussed on irc yesterday. Cheers, Lars From 791a4b7b2c25e21ffeb4184da5e61f18cde86246 Mon Sep 17 00:00:00 2001 From: Lars Ellenberg <lars@linbit.com> Date: Wed, 17 Jul 2013 11:49:12 +0200 Subject: [PATCH] make-bcache: fix guessing of "block_size" to use BLKSSZGET Using stat.st_blocksize is wrong: that is the linux buffer cache granularity, it is tunable, and defaults to 4k. This caused bcache to default to create devices with logical_block_size = 4k, potentially breaking otherwise healthy disk or file system images unnecessarily. e.g. some xfs image previously created with 512 byte "sector size" would, once bcache'd, refuse to mount with mount: function not implemented device supports 4096 byte sectors (not 512) We want the logical_block_size here. |
||
---|---|---|
initramfs | ||
.gitignore | ||
61-bcache.rules | ||
bcache-register | ||
bcache-super-show.8 | ||
bcache-super-show.c | ||
bcache-test.c | ||
bcache.c | ||
bcache.h | ||
COPYING | ||
make-bcache.8 | ||
make-bcache.c | ||
Makefile | ||
probe-bcache.8 | ||
probe-bcache.c | ||
README |
These are the userspace tools required for bcache. Bcache is a patch for the Linux kernel to use SSDs to cache other block devices. For more information, see http://bcache.evilpiepirate.org. Documentation for the run time interface is included in the kernel tree, in Documentantion/bcache.txt. Included tools: make-bcache Formats a block device for use with bcache. A device can be formatted for use as a cache or as a backing device (requires yet to be implemented kernel support). The most important option is for specifying the bucket size. Allocation is done in terms of buckets, and cache hits are counted per bucket; thus a smaller bucket size will give better cache utilization, but poorer write performance. The bucket size is intended to be equal to the size of your SSD's erase blocks, which seems to be 128k-512k for most SSDs; feel free to experiment. probe-bcache Only necessary until support for the bcache superblock is included in blkid; in the meantime, provides just enough functionality for a udev script to create the /dev/disk/by-uuid symlink. The arguments it does support are the same as for blkid. bcache-super-show Prints the bcache superblock of a cache device or a backing device.