On 06/21/2012 11:09 AM, [email protected] 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.

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().

Thanks,
Yuan
-- 
sheepdog mailing list
[email protected]
http://lists.wpkg.org/mailman/listinfo/sheepdog

Reply via email to