]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: rename SKIP_PROMOTE to SKIP_HANDLE_CACHE
authorZhiqiang Wang <zhiqiang.wang@intel.com>
Wed, 27 May 2015 12:50:02 +0000 (20:50 +0800)
committerSamuel Just <sjust@redhat.com>
Tue, 18 Aug 2015 18:25:23 +0000 (11:25 -0700)
To comply with what it really means.

Signed-off-by: Zhiqiang Wang <zhiqiang.wang@intel.com>
src/osd/OSD.cc
src/osd/OpRequest.cc
src/osd/OpRequest.h
src/osd/ReplicatedPG.cc
src/osd/osd_types.h

index 40f4fa3951cea3ec9ecfeb47a87922e0740168d1..f10ead5c23f5eadefecc96218f3a5a345e0845f6 100644 (file)
@@ -8635,21 +8635,21 @@ int OSD::init_op_flags(OpRequestRef& op)
       }
 
     case CEPH_OSD_OP_DELETE:
-      // if we get a delete with FAILOK we can skip promote.  without
+      // if we get a delete with FAILOK we can skip handle cache. without
       // FAILOK we still need to promote (or do something smarter) to
       // determine whether to return ENOENT or 0.
       if (iter == m->ops.begin() &&
          iter->op.flags == CEPH_OSD_OP_FLAG_FAILOK) {
-       op->set_skip_promote();
+       op->set_skip_handle_cache();
       }
       break;
 
     case CEPH_OSD_OP_CACHE_TRY_FLUSH:
     case CEPH_OSD_OP_CACHE_FLUSH:
     case CEPH_OSD_OP_CACHE_EVICT:
-      // If try_flush/flush/evict is the only op, no need to promote.
+      // If try_flush/flush/evict is the only op, can skip handle cache.
       if (m->ops.size() == 1) {
-       op->set_skip_promote();
+       op->set_skip_handle_cache();
       }
       break;
 
index 97315bc9eb32f4d2a3ef808929a9f58dc4993c5f..fb6007c0fa7c4152286f3dc211fc3f7ba2a8009b 100644 (file)
@@ -101,8 +101,8 @@ bool OpRequest::need_class_write_cap() {
 bool OpRequest::need_promote() {
   return check_rmw(CEPH_OSD_RMW_FLAG_FORCE_PROMOTE);
 }
-bool OpRequest::need_skip_promote() {
-  return check_rmw(CEPH_OSD_RMW_FLAG_SKIP_PROMOTE);
+bool OpRequest::need_skip_handle_cache() {
+  return check_rmw(CEPH_OSD_RMW_FLAG_SKIP_HANDLE_CACHE);
 }
 
 void OpRequest::set_rmw_flags(int flags) {
@@ -122,7 +122,7 @@ void OpRequest::set_class_write() { set_rmw_flags(CEPH_OSD_RMW_FLAG_CLASS_WRITE)
 void OpRequest::set_pg_op() { set_rmw_flags(CEPH_OSD_RMW_FLAG_PGOP); }
 void OpRequest::set_cache() { set_rmw_flags(CEPH_OSD_RMW_FLAG_CACHE); }
 void OpRequest::set_promote() { set_rmw_flags(CEPH_OSD_RMW_FLAG_FORCE_PROMOTE); }
-void OpRequest::set_skip_promote() { set_rmw_flags(CEPH_OSD_RMW_FLAG_SKIP_PROMOTE); }
+void OpRequest::set_skip_handle_cache() { set_rmw_flags(CEPH_OSD_RMW_FLAG_SKIP_HANDLE_CACHE); }
 
 void OpRequest::mark_flag_point(uint8_t flag, const string& s) {
 #ifdef WITH_LTTNG
index 9d6a1169447d534479e549398ff48d80f1237e15..0a79a7de536cc912101c29f5d8c91d362e4a776d 100644 (file)
@@ -66,7 +66,7 @@ struct OpRequest : public TrackedOp {
   bool need_class_read_cap();
   bool need_class_write_cap();
   bool need_promote();
-  bool need_skip_promote();
+  bool need_skip_handle_cache();
   void set_read();
   void set_write();
   void set_cache();
@@ -74,7 +74,7 @@ struct OpRequest : public TrackedOp {
   void set_class_write();
   void set_pg_op();
   void set_promote();
-  void set_skip_promote();
+  void set_skip_handle_cache();
 
   void _dump(utime_t now, Formatter *f) const;
 
index c9710bec31c1a372723e6aaf8b1c0b4d572e8618..79aedf20bf6330e123b9674c5eb4a9275cb86977 100644 (file)
@@ -1820,7 +1820,7 @@ bool ReplicatedPG::maybe_handle_cache(OpRequestRef op,
     return true;
   }
 
-  if (op->need_skip_promote()) {
+  if (op->need_skip_handle_cache()) {
     return false;
   }
 
index 27ef70af2224b95fa63c9e03b5995bb2e19cdfa5..94de7abdb2ef16b07bfc9f0e9da09829ce81c0ad 100644 (file)
@@ -260,7 +260,7 @@ enum {
   CEPH_OSD_RMW_FLAG_PGOP        = (1 << 5),
   CEPH_OSD_RMW_FLAG_CACHE       = (1 << 6),
   CEPH_OSD_RMW_FLAG_FORCE_PROMOTE   = (1 << 7),
-  CEPH_OSD_RMW_FLAG_SKIP_PROMOTE    = (1 << 8),
+  CEPH_OSD_RMW_FLAG_SKIP_HANDLE_CACHE = (1 << 8),
 };