]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Merge pull request #10107 from xiaoxichen/wip-16313-jewel
authorLoic Dachary <loic@dachary.org>
Thu, 13 Oct 2016 12:58:33 +0000 (14:58 +0200)
committerGitHub <noreply@github.com>
Thu, 13 Oct 2016 12:58:33 +0000 (14:58 +0200)
jewel: client: FAILED assert(root_ancestor->qtree == __null)

Reviewed-by: John Spray <john.spray@redhat.com>
Reviewed-by: Yan, Zheng <zyan@redhat.com>
1  2 
src/client/Client.cc
src/client/Client.h
src/client/Inode.h

Simple merge
Simple merge
index 1f2e36d0b34b325092f2043ecc712741e8a62701,f305780e7e008ee1becc3c2528a477f269b7830f..884443de1963dae5ed1861b0bcf0adbe89c2fa69
@@@ -74,84 -76,9 +74,10 @@@ struct CapSnap 
    void dump(Formatter *f) const;
  };
  
- class QuotaTree {
- private:
-   Inode *_in;
-   int _ancestor_ref;
-   QuotaTree *_ancestor;
-   int _parent_ref;
-   QuotaTree *_parent;
-   void _put()
-   {
-     if (!_in && !_ancestor_ref && !_parent_ref) {
-       set_parent(NULL);
-       set_ancestor(NULL);
-       delete this;
-     }
-   }
-   ~QuotaTree() {}
- public:
-   explicit QuotaTree(Inode *i) :
-     _in(i),
-     _ancestor_ref(0),
-     _ancestor(NULL),
-     _parent_ref(0),
-     _parent(NULL)
-   { assert(i); }
-   Inode *in() { return _in; }
-   int ancestor_ref() { return _ancestor_ref; }
-   int parent_ref() { return _parent_ref; }
-   QuotaTree *ancestor() { return _ancestor; }
-   void set_ancestor(QuotaTree *ancestor)
-   {
-     if (ancestor == _ancestor)
-       return;
-     if (_ancestor) {
-       --_ancestor->_ancestor_ref;
-       _ancestor->_put();
-     }
-     _ancestor = ancestor;
-     if (_ancestor)
-       ++_ancestor->_ancestor_ref;
-   }
-   QuotaTree *parent() { return _parent; }
-   void set_parent(QuotaTree *parent)
-   {
-     if (parent == _parent)
-       return;
-     if (_parent) {
-       --_parent->_parent_ref;
-       _parent->_put();
-     }
-     _parent = parent;
-     if (parent)
-       ++_parent->_parent_ref;
-   }
-   void invalidate()
-   {
-     if (!_in)
-       return;
-     _in = NULL;
-     set_ancestor(NULL);
-     set_parent(NULL);
-     _put();
-   }
- };
  // inode flags
 -#define I_COMPLETE 1
 -#define I_DIR_ORDERED 2
 +#define I_COMPLETE    1
 +#define I_DIR_ORDERED 2
 +#define I_SNAPDIR_OPEN        8
  
  struct Inode {
    Client *client;