Commit Graph

1452 Commits

Author SHA1 Message Date
Surbhi Palande
219c3966c8 Changed the keyword register_devices to register
This change is done after a discussion with Slava and
Raghu.

Change-Id: I225a890f08e162536d080d66bddaeae02196d215
Signed-off-by: Surbhi Palande <sap@rts26.daterainc.com>
2014-08-07 15:04:43 -07:00
cmf
0013272744 add missing dependency linux-headers
Change-Id: I9dea8e70a60b11d0626b06f20f0dc3471d945ad0
2014-08-07 09:57:31 -07:00
Surbhi Palande
59a6730a02 Better usage message.
Invoking bcachectl will now show you a help
message and a usage indicator.

Change-Id: I9f6163b196b32723c21ddbce04d4a20015173a1a
Signed-off-by: Surbhi Palande <sap@daterainc.com>
2014-08-05 16:20:55 -07:00
Surbhi Palande
73ef76c1c0 Add bcachectl: to start bcache, add and remove devices.
Useful for lifecycle management of bcache devices.

Change-Id: Icdcb559786ab0557dbe7f2a30b5dbeacf7dad665
Signed-off-by: Surbhi Palande <sap@daterainc.com>
2014-08-05 11:28:47 -07:00
rk
039b45dfe9 make-bcache.c: Added support for storing "label" information for the
the devices in the super-block.
bcache.h:       Bring version information to the latest kernel version.
bcache-super-show.c: Add setsize for caching devices. This indicates
                     the number of devices in caching set.

Testing done:

1.0  make-bcache with --label option and checking back to see if
     bcache-super-show shows the devices.
2.0  bcache-super-show does not bail if version is 5.
3.0  bcache-super-show shows the correct setsize.

Change-Id: If0f1ec6204b233b34ff4c8a57a8809d2c8dbe3e3
2014-06-03 10:24:10 -07:00
Slava Pestov
9115b9a7ba make-bcache: update --help 2014-05-01 11:00:30 -07:00
Rob Millner
576336b326 RHEL 7 dependencies 2014-03-28 23:51:17 +00:00
Kent Overstreet
93c17b5f5f fix Makefile.am to use pkg-config 2014-03-20 22:05:38 +00:00
Kent Overstreet
214dd0cb2d Add support for setting cache tier field 2014-03-20 13:46:04 -07:00
Kent Overstreet
a1aa5961dc Merge remote-tracking branch 'remotes/angband/master'
Conflicts:
	make-bcache.c
2014-03-20 13:38:08 -07:00
Rob Millner
fc10e61267 Substitute proper package name 2014-03-18 19:15:39 +00:00
Automation
9d3f3f0f8e Merge ssh://gits.daterainc.com:2984/project/2013.MAIN/bcache-tools 2014-01-22 15:32:21 -08:00
Claudio Fleiner
07f64dea00 add missing spec files 2013-11-25 21:39:35 +00:00
Nicholas Swenson
9ae5ee2905 Merge branch 'master' of ssh://gits.daterainc.com:2984/project/2013.MAIN/bcache-tools
Conflicts:
	.gitignore
2013-11-21 17:41:18 -08:00
Nicholas Swenson
fd07c41fcd .gitignore: tags, scope
Signed-off-by: Nicholas Swenson <nks@daterainc.com>
2013-11-03 00:55:22 -07:00
Nicholas Swenson
f5cf644def bcache: writes correct superblock for multiple cache devs
Signed-off-by: Nicholas Swenson <nks@daterainc.com>
2013-10-31 16:15:49 -07:00
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
Rolf Fokkens
89f11b135d Simplify 69-bcache.rules
Gabriel: simplified a bit further
2013-10-11 13:21:56 +02:00
Rolf Fokkens
4ff504e17b Add an INSTALL macro to the Makefile 2013-10-07 12:57:45 +02:00
Rolf Fokkens
6494253698 Add DRACUTLIBDIR to Makefile 2013-10-07 12:57:38 +02:00
Rolf Fokkens
7703224daa Add a dracut module for bcache 2013-10-07 12:57:31 +02:00
Gabriel
86ba62c6a1 Move probe-bcache to UDEVLIBDIR 2013-10-06 17:35:59 +02:00
Gabriel
0c7a484a5b udev: Fit into the standard rule sequence
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.
2013-10-05 22:16:22 +02:00
Gabriel
866e21a35d super-show: Print label 2013-10-03 13:48:50 +02:00
Gabriel
decab73814 super-show: Show sync mode and cache replacement policy 2013-09-27 12:05:46 +02:00
Gabriel
8b3e39e052 Install the initramfs hook in /usr/share not /etc 2013-09-22 12:34:51 +02:00
Gabriel
0d54a238b1 Use the absolute path to modprobe
This is necessary on Fedora, according to Rolf Fokkens.
2013-09-22 01:15:36 +02:00
Gabriel
b15fb776c9 make-bcache: Prevent stray superblocks
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.
2013-09-01 12:38:11 +02:00
Kent Overstreet
8327108eea Use register_quiet for udev hook 2013-08-26 14:46:19 -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