Commit Graph

231 Commits

Author SHA1 Message Date
jenkins
ba06f99a9c Merge branch 'master' of ssh://gits.daterainc.com:2984/project/2013.KERNEL/bcache-tools
Issue DAT-
2015-01-29 18:11:23 -08:00
jenkins
aae18fb8c9 Merge branch 'master' of ssh://gits.daterainc.com:2984/project/2013.KERNEL/bcache-tools
Issue DAT-
2015-01-29 18:11:19 -08:00
Kent Overstreet
c6fd0321f8 Revert "if cache_set uuid is given in format command, then put the same"
This reverts commit 38aa84d04b - previous patch
fixed this correctly.

Change-Id: I76436860a85223883efcdbb1f91c4ff874a9f3b0
2015-01-29 22:58:21 +00:00
Kent Overstreet
2ef1c983d5 Display new user_uuid instead of internal cache set uuid
Change-Id: I9166876dba44de96f8e3f2da8f16728cbb57540a
2015-01-29 22:58:15 +00:00
Raghu Krishnamurthy
b0ed54d843 Do not stop scanning on a cache-device link is missing since
it might not exists when a cache disk device is removed and
further cache device might be active.

Also handle the case where cache set might not be registered
and the status should just believe what the super block
says and not mark the disk as missing.

This part of code needs optimization but that is a separate
change.

    Issue DAT-1859
    Issue DAT-1860

Change-Id: I7eb8e8ff517eae240fde30c70b3ac90aa9a50ed6
2015-01-28 21:53:55 -08:00
Raghu Krishnamurthy
38aa84d04b if cache_set uuid is given in format command, then put the same
information in both set-uuid and user-uuid until support is added
in the CLI to display user-uuid as part of query-devs and in
format command to accept set_uuid and user_uuid.

    Issue DAT-

Change-Id: I6f2306d858211933cb783f0efe8fe0ade64dd312
2015-01-28 16:59:38 -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
112aacfeff update stop ioctl
Change-Id: Ib1757baa0bcc48082cb36848b5f06da2cc401437
2015-01-27 13:42:24 -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
Slava Pestov
15c8235aa4 bcacheadm: fix --cache_replacement_policy flag
Change-Id: Ic1f97df531345e1c4cb9a83f0fc5463718f56c60
2015-01-15 21:41:40 -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
aa3e2d589d bcacheadm: fix status command
Don't say that the device is missing unless it is still showing
"active" state.

Change-Id: I708d7719c6f6804cd06e75cbadf7bea36ac4b62d
Signed-off-by: Jacob Malevich <jam@daterainc.com>
2015-01-13 17:22:20 -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
cbf0900b35 bcacheadm: fix variable bucket size input
If the user added n caches but <n bucket_sizes, print a message
saying that cache# will be using the default bucket_size

Change-Id: I025474ca672bf79d1c88813e6f030ba7590e820d
Signed-off-by: Jacob Malevich <jam@daterainc.com>
2015-01-12 16:42:26 -08:00
jenkins
d7d289efaf Merge branch 'master' of ssh://gits.daterainc.com:2984/project/2013.MAIN/bcache-tools 2015-01-10 23:14:52 -08:00
Rob Millner
4b168ef820 Add Apple addendums to .gitignore
Change-Id: I1b45829d872773db1b0f4aef2ea7f0f7eb70c423
2015-01-09 12:08:00 -08:00
jenkins
b11ed701a4 Merge branch 'master' of ssh://gits.daterainc.com:2984/project/2013.MAIN/bcache-tools 2015-01-09 02:42:20 -08:00
Slava Pestov
f6623ef5d8 Merge branch 'master' of ssh://gits.daterainc.com:2984/project/2013.KERNEL/bcache-tools 2015-01-06 23:12:45 -08:00
Slava Pestov
4018207e50 Merge branch 'master' of ssh://gits.daterainc.com:2984/project/2013.MAIN/bcache-tools 2015-01-06 23:07:18 -08:00
jenkins
df0863ab6d Merge branch 'master' of ssh://gits.daterainc.com:2984/project/2013.KERNEL/bcache-tools 2015-01-06 11:16:44 -08:00
Jacob Malevich
6257974a5a bcacheadm: increase btree node size for large buckets
buckets over 512k were causing deadlocks when the btree node
size was smaller than the bucket size.

Change-Id: Icb278d75c241e9643ab1355620e3d656df52c4ee
Signed-off-by: Jacob Malevich <jam@daterainc.com>
2015-01-06 11:10:20 -08:00
jenkins
2efb68b150 Merge branch 'master' of ssh://gits.daterainc.com:2984/project/2013.MAIN/bcache-tools 2015-01-01 19:41:25 -08:00
jenkins
f0457007f1 Merge branch 'master' of ssh://gits.daterainc.com:2984/project/2013.CONTROL/bcache-tools 2014-12-31 15:26:48 -08:00
Jacob Malevich
10d4938f07 bcacheadm: Fix bcacheadm status segfault if no devs given
Fixes DAT-1655

Change-Id: I79cfc78fb8513f3e751332d65310d65020c15e3e
Signed-off-by: Jacob Malevich <jam@daterainc.com>
2014-12-31 15:17:12 -08:00
Jacob Malevich
474f0889f0 bcacheadm: fix status and query-devs
Previously we were reading old superblocks stuck in the cache.
Pass in O_DIRECT when opening the device. This requires that
the dest buffer be memaligned.
If we are unable to read the entire superblock then increase
the buffer and try again.

Also since we now have to alloc the sb, make sure it is freed
everywhere in bcacheadm.

Fixes DAT-1609 DAT-1626

Change-Id: I04b5337b992a8569809835b5826a2656df753214
Signed-off-by: Jacob Malevich <jam@daterainc.com>
2014-12-31 15:17:12 -08:00
Jacob Malevich
45d1cb0527 bcacheadm: fix list-cachesets --list-devs
list-cachesets now searches through all cache# symlinks
instead of iterating with i++. This is because bcache
doesn't immediately reuse a cache# symlink when a dev
gets removed.

Fixes DAT-1635
Progress DAT-1646

Change-Id: I6901e29dc13f4e2a76bdc49871e87f07667ec786
Signed-off-by: Jacob Malevich <jam@daterainc.com>
2014-12-31 15:17:12 -08:00
Jacob Malevich
4a5a769050 bcacheadm: only fail csum check when -f is passed
Change-Id: I710f2b59940414830d08c7d018b53b84c6cbde05
Signed-off-by: Jacob Malevich <jam@daterainc.com>
2014-12-31 15:17:12 -08:00
Jacob Malevich
5ec1b6cb6c 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-31 15:17:12 -08:00
Jacob Malevich
d8e72eb615 bcacheadm: add query-devs --brief command
bcacheadm query-devs --brief /dev/sdb /dev/sdc /dev/sdd
will output table showing only the dev name, dev uuid,
server uuid, and cluster uuid for each device

Change-Id: I47a375c9a8f9284942befa0151fae32b0b856a53
Signed-off-by: Jacob Malevich <jam@daterainc.com>
2014-12-31 15:17:11 -08:00
Jacob Malevich
1c113a126b 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-31 15:17:11 -08:00
Jacob Malevich
e977913cc8 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-31 15:17:11 -08:00
Jacob Malevich
c43d8cf683 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-31 15:17:11 -08:00
Kent Overstreet
27ff3c134c bcacheadm fixes
Change-Id: I3f6024d54aee263ef843705a0e9a02869e2a53e9
2014-12-31 15:17:11 -08:00
jenkins
8b82f11df2 Merge branch 'master' of ssh://gits.daterainc.com:2984/project/2013.MAIN/bcache-tools 2014-12-31 11:15:37 -08:00
jenkins
771dd69b85 Merge branch 'master' of ssh://gits.daterainc.com:2984/project/2013.MAIN/bcache-tools 2014-12-29 17:51:09 -08:00
Claudio Fleiner
75a34da9d0 exclude some files from rpm that gets installed
Change-Id: Id7b749358dcae30f448acc5c1c71e42b2687395b
2014-12-27 20:13:20 -08:00
Claudio Fleiner
5a71c13062 update version and build
Change-Id: I2f9e09ee6a927f7f89207914745ef50b6493e4b9
2014-12-24 10:18:26 -08:00
Jacob Malevich
f8d3f7da8f bcacheadm: Fix bcacheadm status segfault if no devs given
Fixes DAT-1655

Change-Id: I79cfc78fb8513f3e751332d65310d65020c15e3e
Signed-off-by: Jacob Malevich <jam@daterainc.com>
2014-12-19 15:35:40 -08:00
Jacob Malevich
be4e8676b6 Merge ssh://gits.daterainc.com:2984/project/2013.KERNEL/bcache-tools 2014-12-19 15:21:51 -08:00
Jacob Malevich
ff6acc10b4 bcacheadm: fix status and query-devs
Previously we were reading old superblocks stuck in the cache.
Pass in O_DIRECT when opening the device. This requires that
the dest buffer be memaligned.
If we are unable to read the entire superblock then increase
the buffer and try again.

Also since we now have to alloc the sb, make sure it is freed
everywhere in bcacheadm.

Fixes DAT-1609 DAT-1626

Change-Id: I04b5337b992a8569809835b5826a2656df753214
Signed-off-by: Jacob Malevich <jam@daterainc.com>
2014-12-19 14:44:24 -08:00
Jacob Malevich
34f6746c33 bcacheadm: fix list-cachesets --list-devs
list-cachesets now searches through all cache# symlinks
instead of iterating with i++. This is because bcache
doesn't immediately reuse a cache# symlink when a dev
gets removed.

Fixes DAT-1635
Progress DAT-1646

Change-Id: I6901e29dc13f4e2a76bdc49871e87f07667ec786
Signed-off-by: Jacob Malevich <jam@daterainc.com>
2014-12-19 14:44:24 -08:00
Jacob Malevich
62345dac62 bcacheadm: only fail csum check when -f is passed
Change-Id: I710f2b59940414830d08c7d018b53b84c6cbde05
Signed-off-by: Jacob Malevich <jam@daterainc.com>
2014-12-19 14:44:24 -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
jenkins
4c7c1f088e Merge branch 'master' of ssh://gits.daterainc.com:2984/project/2013.MAIN/bcache-tools 2014-12-13 05:04:36 -08:00
Jacob Malevich
6401e32229 bcacheadm: add query-devs --brief command
bcacheadm query-devs --brief /dev/sdb /dev/sdc /dev/sdd
will output table showing only the dev name, dev uuid,
server uuid, and cluster uuid for each device

Change-Id: I47a375c9a8f9284942befa0151fae32b0b856a53
Signed-off-by: Jacob Malevich <jam@daterainc.com>
2014-12-11 14:12:21 -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