]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: check blacklisted clients in ReplicatedPG::do_op()
authorYan, Zheng <zheng.z.yan@intel.com>
Sat, 3 May 2014 21:17:15 +0000 (05:17 +0800)
committerSage Weil <sage@inktank.com>
Sat, 3 May 2014 22:14:39 +0000 (15:14 -0700)
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>
(cherry picked from commit f92677c5b2cac03f42f15c826bfb809fec27830d)

src/osd/ReplicatedPG.cc

index 218cc1bca3a295db5ac29f4a6159074883f84e10..68b14040f7ee095b10a6820b2723a4228c94fcd3 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() ||