<br><font face="arial, sans-serif">Sorry, the patch is just for testing, I sent to the wrong mail list, sorry for my fault.</font><div><br>On Tuesday, February 21, 2012, Li Wenpeng wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
From: levin li <<a href="javascript:;" onclick="_e(event, 'cvml', 'levin108@gmail.com')">levin108@gmail.com</a>><br>
<br>
---<br>
sheep/store.c | 16 +++-------------<br>
1 files changed, 3 insertions(+), 13 deletions(-)<br>
<br>
diff --git a/sheep/store.c b/sheep/store.c<br>
index 59eba86..70b4df1 100644<br>
--- a/sheep/store.c<br>
+++ b/sheep/store.c<br>
@@ -244,14 +244,12 @@ static int forward_read_obj_req(struct request *req)<br>
if (is_myself(e[n].addr, e[n].port)) {<br>
ret = do_local_io(req, hdr.epoch);<br>
<br>
- if (SD_RES_SUCCESS != ret &&<br>
- !(SD_RES_NO_OBJ == ret && hdr.flags & SD_FLAG_CMD_RECOVERY)) {<br>
-<br>
+ if (SD_RES_SUCCESS != ret) {<br>
dprintf("%x, read object %" PRIx64" locally failed.\n",<br>
hdr.opcode, oid);<br>
break;<br>
}<br>
-<br>
+<br>
goto out;<br>
}<br>
}<br>
@@ -273,7 +271,7 @@ fetch_again:<br>
if (ret) { /* network errors */<br>
del_sheep_fd(fd);<br>
<br>
- copies_index ++;<br>
+ copies_index++;<br>
if (copies_index < copies) {<br>
goto fetch_again;<br>
}<br>
@@ -684,14 +682,6 @@ static int do_local_io(struct request *req, uint32_t epoch)<br>
<br>
ret = do_process_work(req->op, &req->rq, &req->rp, req);<br>
<br>
- if (ret == SD_RES_NO_OBJ && hdr->flags & SD_FLAG_CMD_RECOVERY) {<br>
- struct sd_obj_rsp *rsp = (struct sd_obj_rsp *)&req->rp;<br>
- int len = epoch_log_read(epoch - 1, req->data, hdr->data_length);<br>
- if (len < 0)<br>
- len = 0;<br>
- rsp->data_length = len;<br>
- }<br>
-<br>
return ret;<br>
}<br>
<br>
--<br>
1.7.1<br>
<br>
</blockquote></div><br><br>-- <br><font color="#999999">levin</font><div><a href="http://basiccoder.com" style="background-color:rgb(255,255,255)" target="_blank"><font color="#999999">basiccoder.com</font></a></div><br>