blob: b1fa9887416b57c75cc81dceee7fc0e4fed69925 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#ifndef CEPH_ZFSFILESTOREBACKEND_H
#define CEPH_ZFSFILESTOREBACKEND_H
#ifdef HAVE_LIBZFS
#include "GenericFileStoreBackend.h"
#include "os/fs/ZFS.h"
class ZFSFileStoreBackend : public GenericFileStoreBackend {
private:
ZFS zfs;
ZFS::Handle *base_zh;
ZFS::Handle *current_zh;
bool m_filestore_zfs_snap;
int update_current_zh();
public:
explicit ZFSFileStoreBackend(FileStore *fs);
~ZFSFileStoreBackend();
const char *get_name() override {
return "zfs";
}
int detect_features();
bool can_checkpoint();
int create_current();
int list_checkpoints(list<string>& ls);
int create_checkpoint(const string& name, uint64_t *cid);
int rollback_to(const string& name);
int destroy_checkpoint(const string& name);
};
#endif
#endif
|