]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds/Mutation.h: add const to member functions 11670/head
authorMichal Jarzabek <stiopa@gmail.com>
Thu, 27 Oct 2016 20:51:30 +0000 (21:51 +0100)
committerMichal Jarzabek <stiopa@gmail.com>
Thu, 27 Oct 2016 20:51:30 +0000 (21:51 +0100)
Signed-off-by: Michal Jarzabek <stiopa@gmail.com>
src/mds/Mutation.cc
src/mds/Mutation.h

index cb711843b02c9fd3de7ccb8cbb156fd010038af3..e8873e82631d18718be197038839a371b1e86e11 100644 (file)
@@ -71,7 +71,7 @@ void MutationImpl::finish_locking(SimpleLock *lock)
 
 
 // auth pins
-bool MutationImpl::is_auth_pinned(MDSCacheObject *object)
+bool MutationImpl::is_auth_pinned(MDSCacheObject *object) const
 { 
   return auth_pins.count(object) || remote_auth_pins.count(object); 
 }
@@ -192,7 +192,7 @@ MDRequestImpl::More* MDRequestImpl::more()
   return _more;
 }
 
-bool MDRequestImpl::has_more()
+bool MDRequestImpl::has_more() const
 {
   return _more != nullptr;
 }
@@ -207,7 +207,7 @@ bool MDRequestImpl::slave_did_prepare()
   return has_more() && more()->slave_commit;
 }
 
-bool MDRequestImpl::did_ino_allocation()
+bool MDRequestImpl::did_ino_allocation() const
 {
   return alloc_ino || used_prealloc_ino || prealloc_inos.size();
 }      
index 89cc92f3864714056d4c14dc8b950e9abf440b08..fbe259938b85727f6aca02a38f8f4201e6947f72 100644 (file)
@@ -113,7 +113,7 @@ public:
   bool is_master() const { return slave_to_mds == MDS_RANK_NONE; }
   bool is_slave() const { return slave_to_mds != MDS_RANK_NONE; }
 
-  client_t get_client() {
+  client_t get_client() const {
     if (reqid.name.is_client())
       return client_t(reqid.name.num());
     return -1;
@@ -144,7 +144,7 @@ public:
   void finish_locking(SimpleLock *lock);
 
   // auth pins
-  bool is_auth_pinned(MDSCacheObject *object);
+  bool is_auth_pinned(MDSCacheObject *object) const;
   void auth_pin(MDSCacheObject *object);
   void auth_unpin(MDSCacheObject *object);
   void drop_local_auth_pins();
@@ -321,10 +321,10 @@ struct MDRequestImpl : public MutationImpl, public TrackedOp {
   ~MDRequestImpl();
   
   More* more();
-  bool has_more();
+  bool has_more() const;
   bool has_witnesses();
   bool slave_did_prepare();
-  bool did_ino_allocation();
+  bool did_ino_allocation() const;
   bool freeze_auth_pin(CInode *inode);
   void unfreeze_auth_pin(bool clear_inode=false);
   void set_remote_frozen_auth_pin(CInode *inode);