Age | Commit message (Collapse) | Author |
|
Make pkg-config command substitutable
|
|
bcache-tools fails to cross build from source, because the upstream hard
codes the build architecture pkg-config and thus fails finding host
architecture .pc files. After making pkg-config substitutable,
bcache-tools cross builds successfully.
Original-Author: Helmut Grohne <helmut@subdivi.de>
|
|
register_quiet doesn't report errors correctly, the following kernel
patch needs to be applied: https://lkml.org/lkml/2013/8/26/549
See http://thread.gmane.org/gmane.linux.kernel.bcache.devel/2594
for how this comes up in practice.
Reverts 8327108eeaf3e0491b17d803da164c0827aae622
|
|
In a pure systemd pre-boot environment, register-bcache can't be shell
code as there is no shell available. Switch to loading the module with
udev's builtin kmod support and introduce a small binary for registering
devices.
Gabriel: Changed errors to be verbose
|
|
This way the Debian package can build without OpenSSL.
|
|
Copy udev rules from /etc/udev/rules.d/ if they have been user-modified,
otherwise copy from /lib/udev/rules.d/ instead. Follows usual udev
conventions for modifying rules files.
|
|
|
|
|
|
--data-offset didn't match the documentation.
Follow gnu style and accept dashes everywhere.
|
|
This was mentioned in the help but had been omitted.
|
|
|
|
Add -lm option to compile bcache-test.
Signed-off-by: Akira Hayakawa <ruby.wktk@gmail.com>
|
|
|
|
|
|
Taken from the Arch Linux wiki, with some paths updated.
Untested.
|
|
Distribution packagers may ignore tools that are not relevant.
|
|
|
|
Gabriel: simplified a bit further
|
|
|
|
|
|
|
|
|
|
Move the rule to run a bit later, after
the standard udev rules have called blkid.
Don't run blkid manually, and run probe-bcache
as a fallback which can be patched out in a
package that depends on util-linux 2.24+.
probe-bcache: bail if libblkid finds anything
Preserve our last-resort safety check here
in case earlier rules fail to call blkid.
|
|
|
|
|
|
|
|
This is necessary on Fedora, according to Rolf Fokkens.
|
|
Fail if the device has any leftover superblock or partition table label.
Add a --wipe-bcache flag to overwrite bcache superblocks and recommend
wipefs for non-bcache superblocks.
Once the device is safe to write, always zero immediately before the
bcache superblock.
Make sure errors go to stderr. Use pkg-config.
|
|
|
|
|
|
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.
|
|
|
|
|
|
Add /dev/bcache/by-uuid/ symlinks to cached devices.
|
|
|
|
Taken from tstrickx@rootcu.be's debianisation.
|
|
|
|
|
|
This is a cache-set property, but not terribly useful.
Showing it on backing devices was also incorrect.
|
|
Only show nbuckets and nr_this_dev on cache devices;
explain nbuckets' relation to device size by printing
both total_sectors (superblock included) and
cache_sectors (superblock excluded).
|
|
|
|
|
|
|
|
Also update the macro to select a bdev.
Also reindent.
|
|
|
|
|
|
|
|
This means bcache devices will be registered earlier and in all
cases, not just when the rootfs fails to mount.
The initramfs hook is still there to ensure the bcache module
and udev rules are shipped if an initramfs is used.
|
|
|
|
This makes supporting -U more annoying; dropping that for the moment,
unless someone complains
|