X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fceph%2Fsrc%2Fos%2Ffilestore%2FZFSFileStoreBackend.h;fp=src%2Fceph%2Fsrc%2Fos%2Ffilestore%2FZFSFileStoreBackend.h;h=b1fa9887416b57c75cc81dceee7fc0e4fed69925;hb=812ff6ca9fcd3e629e49d4328905f33eee8ca3f5;hp=0000000000000000000000000000000000000000;hpb=15280273faafb77777eab341909a3f495cf248d9;p=stor4nfv.git diff --git a/src/ceph/src/os/filestore/ZFSFileStoreBackend.h b/src/ceph/src/os/filestore/ZFSFileStoreBackend.h new file mode 100644 index 0000000..b1fa988 --- /dev/null +++ b/src/ceph/src/os/filestore/ZFSFileStoreBackend.h @@ -0,0 +1,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& ls); + int create_checkpoint(const string& name, uint64_t *cid); + int rollback_to(const string& name); + int destroy_checkpoint(const string& name); +}; +#endif +#endif