Commit Graph

47 Commits

Author SHA1 Message Date
Kent Overstreet
2859e5d780 Add option to set btree node size, give it sane default
Change-Id: Ic6d0a79b8a33c8c17422e0875d9e8d3fb3ef6d98
2015-02-09 21:51:56 -08:00
Kent Overstreet
5730e47b6f Cleanup, rip out more code, fix compiler warnings
Change-Id: I76b410dc700a917d2717b1ceda0df061a1599144
2015-01-27 13:45:02 -08:00
Kent Overstreet
3301c8dd52 Update for bcache superblock changes
Also, drop make-bcache - it's superceded by bcacheadm

Change-Id: I88ee25a1c13f2cbb0b0efa6e01bdca3f069bab62
2015-01-21 23:11:47 -08:00
jenkins
7243fbd22d Merge branch 'master' of ssh://gits.daterainc.com:2984/project/2013.KERNEL/bcache-tools
Issue DAT-
2015-01-21 00:44:46 -08:00
Slava Pestov
34c87b0e98 bcacheadm: add --writearound flag for testing, probably not useful
Change-Id: Ia4a2125a50d7b102791b8fc64b48bd102d8cdc89
2015-01-20 22:18:52 -08:00
Kent Overstreet
2f0a24917b update for bcache header changes
Change-Id: I5c64d438dac8bc28411f9a25e1be711477a3af80
2015-01-15 19:27:21 -08:00
Jacob Malevich
b765c10d0c bcacheadm: ioctl refactor
add-devs, rm-devs, and set-failed no longer need the
cacheset uuid. The cacheset already comes with the bcache_extent0
chardev.

Change-Id: I32572e865361d3c6ce759cf53f19d3f0e4cf04ce
Signed-off-by: Jacob Malevich <jam@daterainc.com>
2015-01-14 16:36:49 -08:00
Jacob Malevich
47013b3d06 bcacheadm: set disk-failed command
Given a cacheset uuid and a device uuid, set that devices
member_info to CACHE_FAILED.

Change-Id: Ideb2034b1deb5fd11efda67f85b82d8a49fe71e4
Signed-off-by: Jacob Malevich <jam@daterainc.com>
2015-01-13 13:51:21 -08:00
Jacob Malevich
4304193d31 bcacheadm: fix status for forcefully pulled devs
Cross reference the superblock with the highest sequence number
to sysfs. If there is a device shown still active in the superblock,
mark it as 'missing'.

Fixes DAT-1758

Change-Id: I13098bbde6bd4b0b402c74ed648160576605311c
Signed-off-by: Jacob Malevich <jam@daterainc.com>
2015-01-13 13:51:05 -08:00
Jacob Malevich
91ba18738e bcacheadm: add capacity command
prints the device capacity, and free space for a cacheset

example:
bcacheadm capacity -u UUID --devs

Device Name    Capacity (512 Blocks)    Free (512 Blocks)
/dev/sdb       1048576.00               1024128.00
/dev/sdc       1048576.00               1024128.00
/dev/sdd       1048576.00               1024128.00
Total          3145728.00               3072384.00

Also did some bcacheadm stats refactoring.

Change-Id: Iff5562191478c5fd9f03399a9479d3d75740904d
Signed-off-by: Jacob Malevich <jam@daterainc.com>
2014-12-19 14:43:34 -08:00
Jacob Malevich
8389c1f5da bcacheadm: add command to modify sysfs attributes for
a cache or cacheset

bcacheadm modify -u csetuuid -d cacheuuid attr val
bcacheadm modify -u csetuuid attr val
bcacheadm modify --list

Change-Id: I7b8ddfb6a7cd12a7bc71870dcc10787a7d3d9e8d
Signed-off-by: Jacob Malevich <jam@daterainc.com>
2014-12-11 14:12:16 -08:00
Jacob Malevich
52789b5673 bcacheadm: fix status command
previously it wasn't properly looking through the list of
member info in the cache that has the highest seq.

Change-Id: I2a6ebf6bd0814055ec1247d0f4d79dab683115d3
Signed-off-by: Jacob Malevich <jam@daterainc.com>
2014-12-10 14:19:17 -08:00
Jacob Malevich
b375ed9755 bcacheadm: add-devs and rm-dev options
Option to add multiple devices and remove single devices.

bcacheadm add-devs --set=uuid <list of devices>
bcacheadm rm-dev <dev>

Change-Id: I4f0a287c02dfad76d8263554e455c408191ea7ba
Signed-off-by: Jacob Malevich <jam@daterainc.com>
2014-12-09 18:29:20 -08:00
Jacob Malevich
7763a86ca8 Remove exit points from libbache and return error messages instead.
Change-Id: Ibd238bb63354dae841c2a70e5ded550b3c603d4b
Signed-off-by: Jacob Malevich <jam@daterainc.com>
2014-11-25 14:19:28 -08:00
Jacob Malevich
0098187201 Fix string parsing
Change-Id: I0edd8f1e247ae802cdccf871a40b50d8a8714433
Signed-off-by: Jacob Malevich <jam@daterainc.com>
2014-11-24 15:53:35 -08:00
Jacob Malevich
7a80b660c2 bcacheadm unregister devices
uses unregister ioctl to unregister a cacheset that the device
belongs to

Change-Id: I01772de3471888c4951f050b3e92f41b58c5d103
Signed-off-by: Jacob Malevich <jam@daterainc.com>
2014-11-21 14:42:07 -08:00
Jacob Malevich
6ad19a812b bcacheadm: add ability to find a dev uuid within a cacheset
simplifies input for finding stats for a single dev

Change-Id: I5d879aaa8cb68aaaedabd2bc780fbea4994e2541
Signed-off-by: Jacob Malevich <jam@daterainc.com>
2014-11-18 14:45:18 -08:00
Jacob Malevich
4603dcf36b Option for returning only the uuid of the dev when doing a
query-dev

Change-Id: Ia055da0516bc7baac836642fa1405b77adfc5139
Signed-off-by: Jacob Malevich <jam@daterainc.com>
2014-11-14 11:24:02 -08:00
Jacob Malevich
28271115d7 bcache query-dev fixes, and don't print the sb out for status
Change-Id: I909ac15ca32a9cdecd6c7455e884d14f30ab0188
Signed-off-by: Jacob Malevich <jam@daterainc.com>
2014-11-13 17:31:39 -08:00
Jacob Malevich
3fda6adc19 bcacheadm: list-cachesets --list-devs option
lists the devices in each cacheset

Change-Id: Ie3beb38203eefc3ab64b2a3d37652964f7021e54
Signed-off-by: Jacob Malevich <jam@daterainc.com>
2014-11-13 17:08:20 -08:00
Jacob Malevich
34f54790d5 bcacheadm: fix tiering and backing device bugs
TODO: Support multiple devices for a single -C or -B flag

Change-Id: I73b18a39a0e0ff564600c2fc7386a785d3a10870
Signed-off-by: Jacob Malevich <jam@daterainc.com>
2014-11-12 17:51:42 -08:00
Jacob Malevich
269761b11f bcacheadm status [FLAGS] <list of stats>
FLAGS:
--list	-list all stats in the uuid directory
--all	-list all stats/values in the uuid directory
--uuid	-must pass in a uuid for the cacheset

TODO:	-subdirectory stats for individual caches
	-subdirectory stats for over time stats

Change-Id: Ic7126a511fb17aa8c9ac7bf89e014ddbb719f46d
Signed-off-by: Jacob Malevich <jam@daterainc.com>
2014-11-06 15:36:38 -08:00
Jacob Malevich
637b614630 bcacheadm status <list of devs>
provides status for the newest sb version for each tier for all
the devs passed in

Change-Id: Ib6e5b08e65b5c36e7b1af0e9806efc39d069f94c
Signed-off-by: Jacob Malevich <jam@daterainc.com>
2014-11-05 17:45:57 -08:00
Jacob Malevich
bc69c8fe04 bcacheadm add list-cachesets and query-devs
Change-Id: Ie2bc7ba8293d1d493c0a215119456e4bb9e659aa
Signed-off-by: Jacob Malevich <jam@daterainc.com>
2014-10-27 17:37:25 -07:00
Jacob Malevich
e8c1cee578 Create libbcache.a.
Move make-bcache, probe-bcache, and bcache-super-show functions into a
static library called libbcache.

Change-Id: Ieed626225e08507a8ccd12f6bb0c07f64480de9b
Signed-off-by: Jacob Malevich <jam@daterainc.com>
2014-10-27 12:13:52 -07:00
Kent Overstreet
2b1176d6d5 Add crc32c support
Change-Id: I9f830560b25cc84d77f46e3670ed07c05f44adc9
2014-09-11 15:55:39 -07:00
Kent Overstreet
02c47b0373 Superblock version 6
Change-Id: Iba976c8c5a4a91dcac06145471fc70baa6a6393e
2014-08-29 21:48:17 +00: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
Kent Overstreet
214dd0cb2d Add support for setting cache tier field 2014-03-20 13:46:04 -07:00
Gabriel
866e21a35d super-show: Print label 2013-10-03 13:48:50 +02:00
Kent Overstreet
557c79518c bcache-tools are GPL 2013-07-17 13:13:31 -07:00
Gabriel
315ab92e58 super-show: print cache mode (writethrough, writeback, writearound, none) 2013-05-08 09:40:46 +02: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
Kent Overstreet
3088f201ed Update for new superblock version for data_offset 2013-04-11 16:56:27 -07:00
Gabriel
3b6ae63e49 Fix offsets, cache and backing are two different cases. 2013-03-09 15:51:17 +01:00
Kent Overstreet
7f023533a8 Add --discard and --cache_replacement_policy 2012-01-18 16:05:32 -08: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
9e6daaffa7 Don't overwrite priorities that aren't there on a backing device 2011-05-24 14:12:00 -07:00
Kent Overstreet
eb9054a32e Updates for backing devices 2011-05-19 20:25:14 -07:00
Kent Overstreet
1a7ae034f6 New superblock fields for multiple cache devices 2011-04-15 13:22:09 -07:00
Kent Overstreet
04a54144fd Documentation 2010-12-16 01:22:45 -08:00
Kent Overstreet
7e97901075 UUIDs 2010-10-08 07:04:49 -07:00