1 #ifndef _LINUX_BCACHE_IOCTL_H
2 #define _LINUX_BCACHE_IOCTL_H
4 #include <linux/uuid.h>
5 #include "bcachefs_format.h"
11 #define BCH_FORCE_IF_DATA_LOST (1 << 0)
12 #define BCH_FORCE_IF_METADATA_LOST (1 << 1)
13 #define BCH_FORCE_IF_DATA_DEGRADED (1 << 2)
14 #define BCH_FORCE_IF_METADATA_DEGRADED (1 << 3)
16 #define BCH_FORCE_IF_DEGRADED \
17 (BCH_FORCE_IF_DATA_DEGRADED| \
18 BCH_FORCE_IF_METADATA_DEGRADED)
20 #define BCH_BY_UUID (1 << 4)
22 /* global control dev: */
24 #define BCH_IOCTL_ASSEMBLE _IOW(0xbc, 1, struct bch_ioctl_assemble)
25 #define BCH_IOCTL_INCREMENTAL _IOW(0xbc, 2, struct bch_ioctl_incremental)
27 struct bch_ioctl_assemble {
34 struct bch_ioctl_incremental {
40 /* filesystem ioctls: */
42 #define BCH_IOCTL_QUERY_UUID _IOR(0xbc, 1, struct bch_ioctl_query_uuid)
43 #define BCH_IOCTL_START _IOW(0xbc, 2, struct bch_ioctl_start)
44 #define BCH_IOCTL_STOP _IO(0xbc, 3)
45 #define BCH_IOCTL_DISK_ADD _IOW(0xbc, 4, struct bch_ioctl_disk)
46 #define BCH_IOCTL_DISK_REMOVE _IOW(0xbc, 5, struct bch_ioctl_disk)
47 #define BCH_IOCTL_DISK_ONLINE _IOW(0xbc, 6, struct bch_ioctl_disk)
48 #define BCH_IOCTL_DISK_OFFLINE _IOW(0xbc, 7, struct bch_ioctl_disk)
49 #define BCH_IOCTL_DISK_SET_STATE _IOW(0xbc, 8, struct bch_ioctl_disk_set_state)
50 #define BCH_IOCTL_DISK_EVACUATE _IOW(0xbc, 9, struct bch_ioctl_disk)
51 #define BCH_IOCTL_DATA _IOW(0xbc, 10, struct bch_ioctl_data)
53 struct bch_ioctl_query_uuid {
57 struct bch_ioctl_start {
62 struct bch_ioctl_disk {
68 struct bch_ioctl_disk_set_state {
75 #define BCH_REWRITE_INCREASE_REPLICAS (1 << 0)
76 #define BCH_REWRITE_DECREASE_REPLICAS (1 << 1)
78 #define BCH_REWRITE_RECOMPRESS (1 << 0)
79 #define BCH_REWRITE_DECREASE_REPLICAS (1 << 1)
89 struct bch_ioctl_data {
104 #endif /* _LINUX_BCACHE_IOCTL_H */