Commit Graph

74 Commits

Author SHA1 Message Date
Claudio Fleiner
24e98ce46d Adding autotools support to bcache-tools
thie enables building it in a different directory, more
flexible install and configure options, and should make it
easier to eventualy create deb and rpm packages. Additionally
this makes it much easier to build and test this package
as it now behaves the same way as others we are using.
2013-10-28 22:47:23 -07:00
Claudio Fleiner
fe921e118b Merge git://evilpiepirate.org/~kent/bcache-tools
Conflicts:
	README - fixed
2013-08-12 10:39:08 -07:00
Claudio Fleiner
f2c0495fc6 Creating package bcache-tools 2013-08-12 10:36:11 -07:00
Gabriel
0b57e166ae Don't register if a non-bcache superblock is found as well 2013-07-21 18:59:18 -07:00
Lars Ellenberg
7721b11a60 fix make-bcache to use logical_block_size, not stat.st_blocksize
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.
2013-07-17 13:13:31 -07:00
Kent Overstreet
557c79518c bcache-tools are GPL 2013-07-17 13:13:31 -07:00
Gabriel
df844c04d1 udev: Add /dev/bcache/by-label symlinks to cached devices 2013-06-09 01:12:40 +02:00
Gabriel
0b2587b5bc udev: Persistent names for cached devices
Add /dev/bcache/by-uuid/ symlinks to cached devices.
2013-06-08 03:00:57 +02:00
Gabriel
0344939e54 super-show: Minor manpage clarification 2013-06-07 14:51:55 +02:00
Gabriel
afa56b99ae super-show: Add a manpage
Taken from tstrickx@rootcu.be's debianisation.
2013-06-05 21:39:30 +02:00
Gabriel
fc7d4231be super-show: show detached/clean/dirty/inconsistent status 2013-05-08 09:40:46 +02:00
Gabriel
315ab92e58 super-show: print cache mode (writethrough, writeback, writearound, none) 2013-05-08 09:40:46 +02:00
Gabriel
af6e3f1c74 super-show: don't show cache_count
This is a cache-set property, but not terribly useful.
Showing it on backing devices was also incorrect.
2013-05-08 09:40:46 +02:00
Gabriel
19d17f5b91 super-show: show more cache-related information
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).
2013-05-08 09:40:46 +02:00
Gabriel
9cbe774be2 super-show: make the version annotation more terse 2013-05-08 09:40:44 +02:00
Gabriel
13df67cd20 make-bdev: print the correct offset in the default case 2013-04-30 11:25:23 +02:00
Kent Overstreet
ebb76d0c4a Get blocksize from the devices if it's not specified 2013-04-23 17:43:47 -07:00
Gabriel
94755cc757 Update data offset format and warn about the previous one.
Also update the macro to select a bdev.
Also reindent.
2013-04-15 12:48:39 -07:00
Kent Overstreet
849ce47338 use SB_JOURNAL_BUCKETS for superblock 2013-04-12 11:37:33 -07:00
Gabriel
1407bb0c2a Trivial build fix. 2013-04-12 02:30:04 +02:00
Gabriel
dc405a8f94 Add a flag to pick the cache set uuid. 2013-04-11 17:19:10 -07:00
Gabriel
944cb4ce32 Register devices with just udev.
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.
2013-04-11 17:08:23 -07:00
Kent Overstreet
3088f201ed Update for new superblock version for data_offset 2013-04-11 16:56:27 -07:00
Kent Overstreet
335ac31ba5 Fix option parsing so that passing --bucket_size after the device works
This makes supporting -U more annoying; dropping that for the moment,
unless someone complains
2013-04-09 13:29:06 -07:00
Gabriel
445032e1b6 Use uppercase hex when showing csum and expected. 2013-03-12 17:01:49 +01:00
Gabriel
727c189c59 Show the writeback flag and the discard flag. 2013-03-10 11:04:10 +01:00
Gabriel
1b7cbd1d77 Version cleanup. 2013-03-10 11:03:59 +01:00
Gabriel
3b6ae63e49 Fix offsets, cache and backing are two different cases. 2013-03-09 15:51:17 +01:00
Gabriel
865a3b1f0b Add a command to display a bcache superblock. 2013-03-09 14:33:08 +01:00
Kent Overstreet
42c182c6ab Don't error out if the distro isn't using initramfs 2013-01-22 13:26:53 -08:00
Kent Overstreet
133c859a24 Better validation, and use O_EXCL when opening block device 2012-11-21 15:31:49 -08:00
Kent Overstreet
f2a9bace37 Change default blocksize to one sector 2012-08-15 13:04:46 -07:00
Kent Overstreet
739b971d77 Fix the initramfs script 2012-07-13 00:52:52 -07:00
Kent Overstreet
a3d0e5bafb Update initramfs probe script 2012-04-11 15:33:40 -07:00
Dmitry Smirnov
f4c09286dd bcache-tools: probe-bcache.8 man page
Hi Kent,

please find a little patch (attached) to introduce probe-bcache.8 man page to
bcache-tools.

Thank you.

Cheers,
Dmitry.

From 0ff7680042622e356516739936095cb4eab02de6 Mon Sep 17 00:00:00 2001
From: Dmitry Smirnov <onlyjob@member.fsf.org>
Date: Thu, 16 Feb 2012 13:23:00 +1100
Subject: [PATCH] added probe-bcache.8 man page
2012-02-16 09:14:41 -08:00
Kent Overstreet
7f023533a8 Add --discard and --cache_replacement_policy 2012-01-18 16:05:32 -08:00
Kent Overstreet
58f79db74b Merge branch 'master' of evilpiepirate.org:git/bcache-tools 2011-11-21 14:59:08 -08:00
Gwendal Grignou
35710b9dde Fix more warnings during 32bit compilation
"bcache.c:120: warning: integer constant is too large for 'long' type"
"bcache.c:128: warning: integer constant is too large for 'long' type"

Signed-off-by: Gwendal Grignou <gwendal@google.com>
2011-11-21 14:58:53 -08:00
Dmitry Smirnov
e77d059ee1 Makefile to follow GNU Make best practice 2011-11-20 21:17:43 -08:00
Kent Overstreet
d1bc71ca43 The --writeback switch did nothing; fixed 2011-09-01 14:37:48 -07:00
Gwendal Grignou
a19eab5239 Fix warning during 32bit tool chain compilation
"bcache.c:128: warning: integer constant is too large for 'long' type"

Signed-off-by: Gwendal Grignou <gwendal@google.com>
2011-08-16 13:26:05 -07:00
Kent Overstreet
18e46dc1c3 Add more long options and improve usage() 2011-08-09 17:33:03 -07:00
Kent Overstreet
e8c85bb806 Add a --writeback switch to make-bcache 2011-07-31 19:29:22 -07:00
Kent Overstreet
552595bc6e Don't write journal buckets 2011-07-26 12:24:00 -07:00
Ricky Benitez
a02bc8df01 Add checksum to superblock
Add checksum to the superblock to prevent warning messages when
registering devices.
2011-07-26 10:02:15 -07:00
Kent Overstreet
02614b5c81 Give make-bcache the ability to format multiple devices at once 2011-07-25 11:28:05 -07:00
Kent Overstreet
c798b43ade New superblock format 2011-07-25 00:18:42 -07:00
Kent Overstreet
d1404a0cf1 Bcache tools are now explicitly gpl v2. 2011-07-12 15:44:06 -07:00
Kent Overstreet
4f88b8efe2 Add an option for setting the set uuid 2011-07-12 15:42:37 -07:00
Kent Overstreet
9e6daaffa7 Don't overwrite priorities that aren't there on a backing device 2011-05-24 14:12:00 -07:00