]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: return -EDQUOT instead of -ENOSPC if it is a pool quota
authorSage Weil <sage@redhat.com>
Thu, 1 Oct 2015 19:01:59 +0000 (15:01 -0400)
committerSage Weil <sage@redhat.com>
Thu, 1 Oct 2015 19:01:59 +0000 (15:01 -0400)
The pool quota error should return EDQUOT intead of ENOSPC.

Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/ReplicatedPG.cc

index 857ed09b38af65f974020ab0e34c2d2a325dc60b..124b150c55e0a3340c86b88ffe70fd24768f2757 100644 (file)
@@ -6149,7 +6149,7 @@ int ReplicatedPG::prepare_transaction(OpContext *ctx)
     } else if (m->has_flag(CEPH_OSD_FLAG_FULL_TRY)) {
       // they tried, they failed.
       dout(20) << __func__ << " full, replying to FULL_TRY op" << dendl;
-      return -ENOSPC;
+      return pool.info.has_flag(pg_pool_t::FLAG_FULL) ? -EDQUOT : -ENOSPC;
     } else {
       // drop request
       dout(20) << __func__ << " full, dropping request (bad client)" << dendl;