X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fceph%2Fsrc%2Fclient%2FClientSnapRealm.h;fp=src%2Fceph%2Fsrc%2Fclient%2FClientSnapRealm.h;h=0000000000000000000000000000000000000000;hb=7da45d65be36d36b880cc55c5036e96c24b53f00;hp=ccb129d78bf3bcafc4869c09087ceef19eae6043;hpb=691462d09d0987b47e112d6ee8740375df3c51b2;p=stor4nfv.git diff --git a/src/ceph/src/client/ClientSnapRealm.h b/src/ceph/src/client/ClientSnapRealm.h deleted file mode 100644 index ccb129d..0000000 --- a/src/ceph/src/client/ClientSnapRealm.h +++ /dev/null @@ -1,60 +0,0 @@ -// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- -// vim: ts=8 sw=2 smarttab - -#ifndef CEPH_CLIENT_SNAPREALM_H -#define CEPH_CLIENT_SNAPREALM_H - -#include "include/types.h" -#include "common/snap_types.h" -#include "include/xlist.h" - -struct Inode; - -struct SnapRealm { - inodeno_t ino; - int nref; - snapid_t created; - snapid_t seq; - - inodeno_t parent; - snapid_t parent_since; - vector prior_parent_snaps; // snaps prior to parent_since - vector my_snaps; - - SnapRealm *pparent; - set pchildren; - -private: - SnapContext cached_snap_context; // my_snaps + parent snaps + past_parent_snaps - friend ostream& operator<<(ostream& out, const SnapRealm& r); - -public: - xlist inodes_with_caps; - - explicit SnapRealm(inodeno_t i) : - ino(i), nref(0), created(0), seq(0), - pparent(NULL) { } - - void build_snap_context(); - void invalidate_cache() { - cached_snap_context.clear(); - } - - const SnapContext& get_snap_context() { - if (cached_snap_context.seq == 0) - build_snap_context(); - return cached_snap_context; - } - - void dump(Formatter *f) const; -}; - -inline ostream& operator<<(ostream& out, const SnapRealm& r) { - return out << "snaprealm(" << r.ino << " nref=" << r.nref << " c=" << r.created << " seq=" << r.seq - << " parent=" << r.parent - << " my_snaps=" << r.my_snaps - << " cached_snapc=" << r.cached_snap_context - << ")"; -} - -#endif