[Sheepdog] [PATCH 7/7] send only header when error occurs

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Thu Apr 7 02:56:23 CEST 2011


The content of data is not used on error, so we can avoid sending it.

Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
 sheep/store.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/sheep/store.c b/sheep/store.c
index b78aeb3..d4955c5 100644
--- a/sheep/store.c
+++ b/sheep/store.c
@@ -849,6 +849,8 @@ out:
 		dprintf("failed, %"PRIu32", %x, %" PRIx64" , %u, %"PRIu32"\n",
 			idx, opcode, oid, epoch, ret);
 		rsp->result = ret;
+		if (!(ret == SD_RES_NO_OBJ && hdr->flags & SD_FLAG_CMD_RECOVERY))
+			rsp->data_length = 0;
 	}
 }
 
-- 
1.5.6.5




More information about the sheepdog mailing list