[sheepdog] 答复: [PATCH] sheep: do COW at local node for just one time
无觉
wujue.yht at taobao.com
Wed Jun 27 05:09:38 CEST 2012
-----邮件原件-----
发件人: Liu Yuan [mailto:namei.unix at gmail.com]
发送时间: 2012年6月25日 12:09
收件人: yaohaiting.wujue at gmail.com
抄送: sheepdog at lists.wpkg.org; 无觉
主题: Re: [sheepdog] [PATCH] sheep: do COW at local node for just one time
On 06/21/2012 11:09 AM, yaohaiting.wujue at gmail.com wrote:
> int forward_write_obj_req(struct request *req)
> {
> int i, fd, ret, pollret;
> @@ -106,6 +144,14 @@ int forward_write_obj_req(struct request *req)
> memcpy(&fwd_hdr, &req->rq, sizeof(fwd_hdr));
> fwd_hdr.flags |= SD_FLAG_CMD_IO_LOCAL;
>
> + if (fwd_hdr.flags & SD_FLAG_CMD_COW) {
> + ret = do_cow_at_local(req, &fwd_hdr);
> + if (!ret) {
> + fwd_hdr.flags &= ~SD_FLAG_CMD_COW;
> + req->rq.flags &= ~SD_FLAG_CMD_COW;
> + }
> + }
> +
> wlen = fwd_hdr.data_length;
This optimization should be handled before forward_write_obj_req(),
which handles request forwarding only.
I have moved this to another place.
If we do an early COW object reading at gateway node, it seems we don't
need the COW code in store_create_and_write().
If we do COW at gateway failing, we then pass the COW to separate nodes. The separate nodes maybe have retry. We will not retry at gateway.
Thanks,
Yuan
________________________________
This email (including any attachments) is confidential and may be legally privileged. If you received this email in error, please delete it immediately and do not copy it or use it for any purpose or disclose its contents to any other person. Thank you.
本电邮(包括任何附件)可能含有机密资料并受法律保护。如您不是正确的收件人,请您立即删除本邮件。请不要将本电邮进行复制并用作任何其他用途、或透露本邮件之内容。谢谢。
More information about the sheepdog
mailing list