]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osdc: don't set RETRY flag on all reads
authorSage Weil <sage@newdream.net>
Tue, 8 Jul 2008 17:39:11 +0000 (10:39 -0700)
committerSage Weil <sage@newdream.net>
Tue, 8 Jul 2008 17:39:11 +0000 (10:39 -0700)
src/messages/MOSDOp.h

index 384b6ace7756aaa226c631488bd596baea8f8854..5e8945f85161c2f726d240fd4241d04276f123c8 100644 (file)
@@ -135,7 +135,12 @@ public:
 
   void set_want_ack(bool b) { head.flags = get_flags() | CEPH_OSD_OP_ACK; }
   void set_want_commit(bool b) { head.flags = get_flags() | CEPH_OSD_OP_SAFE; }
-  void set_retry_attempt(bool a) { head.flags = get_flags() | CEPH_OSD_OP_RETRY; }
+  void set_retry_attempt(bool a) { 
+    if (a)
+      head.flags = head.flags | CEPH_OSD_OP_RETRY;
+    else
+      head.flags = head.flags & ~CEPH_OSD_OP_RETRY;
+  }
 
   // marshalling
   virtual void decode_payload() {