]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: check blacklisted clients in ReplicatedPG::do_op() 1763/head
authorYan, Zheng <zheng.z.yan@intel.com>
Sat, 3 May 2014 21:17:15 +0000 (05:17 +0800)
committerYan, Zheng <zheng.z.yan@intel.com>
Sat, 3 May 2014 21:36:16 +0000 (05:36 +0800)
OSD checks if client is blacklisted only when receiving OSD request.
It's possible that OSD request's sender get blacklisted while OSD
request in in some waiting list.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
src/osd/ReplicatedPG.cc

index 2521b966d030289d5c7696ed172b2765a6b46fe9..95b61a3112246da131e2b8981090659cd230f069 100644 (file)
@@ -1200,6 +1200,12 @@ void ReplicatedPG::do_op(OpRequestRef op)
     return do_pg_op(op);
   }
 
+  if (get_osdmap()->is_blacklisted(m->get_source_addr())) {
+    dout(10) << "do_op " << m->get_source_addr() << " is blacklisted" << dendl;
+    osd->reply_op_error(op, -EBLACKLISTED);
+    return;
+  }
+
   // order this op as a write?
   bool write_ordered =
     op->may_write() ||