]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
osd: error responses should trigger all requested notifications.
authorGreg Farnum <gregory.farnum@dreamhost.com>
Fri, 18 Nov 2011 16:49:35 +0000 (08:49 -0800)
committerGreg Farnum <gregory.farnum@dreamhost.com>
Fri, 18 Nov 2011 17:49:57 +0000 (09:49 -0800)
There's no good reason I can find to limit error code responses to
the ACK.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
src/osd/OSD.cc

index c3df7232102e4d18bf6596a26f2ca2ad7a9f2530..791f57639615c719f62a8fe3ffab2b1fc79469b3 100644 (file)
@@ -5096,12 +5096,7 @@ void OSD::reply_op_error(MOSDOp *op, int err)
 void OSD::reply_op_error(MOSDOp *op, int err, eversion_t v)
 {
   int flags;
-  if (err == 0)
-    // reply with whatever ack/safe flags the caller wanted
-    flags = op->get_flags() & (CEPH_OSD_FLAG_ACK|CEPH_OSD_FLAG_ONDISK);
-  else
-    // just ACK on error
-    flags = CEPH_OSD_FLAG_ACK;
+  flags = op->get_flags() & (CEPH_OSD_FLAG_ACK|CEPH_OSD_FLAG_ONDISK);
 
   MOSDOpReply *reply = new MOSDOpReply(op, err, osdmap->get_epoch(), flags);
   Messenger *msgr = client_messenger;