From: Sage Weil Date: Sat, 11 Dec 2010 21:58:47 +0000 (-0800) Subject: osd: return ENOSPC for non-mds if full flag is set in osdmap X-Git-Tag: v0.25~462 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0e08cb0f6c0eca6d2d7f59f56f5b95f342c84893;p=ceph.git osd: return ENOSPC for non-mds if full flag is set in osdmap Signed-off-by: Sage Weil --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 42437fc8ad5c..bdd4c3d10999 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -4860,6 +4860,14 @@ void OSD::handle_op(MOSDOp *op) // pg must be same-ish... if (op->may_write()) { + // full? + if (osdmap->test_flag(CEPH_OSDMAP_FULL) && + !op->get_source().is_mds()) { // FIXME: we'll exclude mds writes for now. + reply_op_error(op, -ENOSPC); + pg->unlock(); + return; + } + if (op->get_snapid() != CEPH_NOSNAP) { reply_op_error(op, -EINVAL); pg->unlock();