diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2016-08-17 13:23:03 -0800 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2016-08-17 13:23:03 -0800 |
commit | b0f08fc1e30daafb274181234dae3408fb2eb69b (patch) | |
tree | 63893387dc2b136342922d0d904f3e2d1a7e3ebd /libbcache.h | |
parent | dda0923eebd3d36a06ed4976cd4ab98d7cdec679 (diff) |
Encryption support
Diffstat (limited to 'libbcache.h')
-rw-r--r-- | libbcache.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/libbcache.h b/libbcache.h new file mode 100644 index 0000000..c8d668e --- /dev/null +++ b/libbcache.h @@ -0,0 +1,35 @@ +#ifndef _LIBBCACHE_H +#define _LIBBCACHE_H + +#include "util.h" +#include "stdbool.h" + +struct dev_opts { + int fd; + const char *dev; + u64 size; /* 512 byte sectors */ + unsigned bucket_size; + unsigned tier; + unsigned replacement_policy; + bool discard; + + u64 first_bucket; + u64 nbuckets; +}; + +void bcache_format(struct dev_opts *devs, size_t nr_devs, + unsigned block_size, + unsigned btree_node_size, + unsigned meta_csum_type, + unsigned data_csum_type, + unsigned compression_type, + const char *passphrase, + unsigned meta_replicas, + unsigned data_replicas, + unsigned on_error_action, + char *label, + uuid_le uuid); + +void bcache_super_read(const char *, struct cache_sb *); + +#endif /* _LIBBCACHE_H */ |