]> git.sesse.net Git - bcachefs-tools-debian/blob - libbcache.h
Encryption support
[bcachefs-tools-debian] / libbcache.h
1 #ifndef _LIBBCACHE_H
2 #define _LIBBCACHE_H
3
4 #include "util.h"
5 #include "stdbool.h"
6
7 struct dev_opts {
8         int             fd;
9         const char      *dev;
10         u64             size; /* 512 byte sectors */
11         unsigned        bucket_size;
12         unsigned        tier;
13         unsigned        replacement_policy;
14         bool            discard;
15
16         u64             first_bucket;
17         u64             nbuckets;
18 };
19
20 void bcache_format(struct dev_opts *devs, size_t nr_devs,
21                    unsigned block_size,
22                    unsigned btree_node_size,
23                    unsigned meta_csum_type,
24                    unsigned data_csum_type,
25                    unsigned compression_type,
26                    const char *passphrase,
27                    unsigned meta_replicas,
28                    unsigned data_replicas,
29                    unsigned on_error_action,
30                    char *label,
31                    uuid_le uuid);
32
33 void bcache_super_read(const char *, struct cache_sb *);
34
35 #endif /* _LIBBCACHE_H */