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