Sorry, the patch is just for testing, I sent to the wrong mail list, sorry for my fault.
On Tuesday, February 21, 2012, Li Wenpeng wrote: > From: levin li <[email protected] <javascript:;>> > > --- > sheep/store.c | 16 +++------------- > 1 files changed, 3 insertions(+), 13 deletions(-) > > diff --git a/sheep/store.c b/sheep/store.c > index 59eba86..70b4df1 100644 > --- a/sheep/store.c > +++ b/sheep/store.c > @@ -244,14 +244,12 @@ static int forward_read_obj_req(struct request *req) > if (is_myself(e[n].addr, e[n].port)) { > ret = do_local_io(req, hdr.epoch); > > - if (SD_RES_SUCCESS != ret && > - !(SD_RES_NO_OBJ == ret && hdr.flags & > SD_FLAG_CMD_RECOVERY)) { > - > + if (SD_RES_SUCCESS != ret) { > dprintf("%x, read object %" PRIx64" locally > failed.\n", > hdr.opcode, oid); > break; > } > - > + > goto out; > } > } > @@ -273,7 +271,7 @@ fetch_again: > if (ret) { /* network errors */ > del_sheep_fd(fd); > > - copies_index ++; > + copies_index++; > if (copies_index < copies) { > goto fetch_again; > } > @@ -684,14 +682,6 @@ static int do_local_io(struct request *req, uint32_t > epoch) > > ret = do_process_work(req->op, &req->rq, &req->rp, req); > > - if (ret == SD_RES_NO_OBJ && hdr->flags & SD_FLAG_CMD_RECOVERY) { > - struct sd_obj_rsp *rsp = (struct sd_obj_rsp *)&req->rp; > - int len = epoch_log_read(epoch - 1, req->data, > hdr->data_length); > - if (len < 0) > - len = 0; > - rsp->data_length = len; > - } > - > return ret; > } > > -- > 1.7.1 > > -- levin basiccoder.com
-- sheepdog mailing list [email protected] http://lists.wpkg.org/mailman/listinfo/sheepdog
