[sheepdog] [PATCH 1/3] simplify exec_req

Liu Yuan namei.unix at gmail.com
Thu Oct 18 07:37:41 CEST 2012


On 10/18/2012 08:49 AM, MORITA Kazutaka wrote:
> @@ -91,7 +91,7 @@ static int recover_object_from_replica(uint64_t oid, struct sd_vnode *vnode,
>  	hdr.obj.oid = oid;
>  	hdr.obj.tgt_epoch = tgt_epoch;
>  
> -	ret = sheep_exec_req(&vnode->nid, &hdr, buf, &wlen, &rlen);
> +	ret = sheep_exec_req(&vnode->nid, &hdr, buf, &rlen);
>  	if (ret != SD_RES_SUCCESS)
>  		goto out;

We actually don't need rlen to indicate how many bytes we read, since we
only expect a full read, partial read means failure. So I think we can
completely remove rlen para from sheep_exec_req() and exec_req().

Thanks,
Yuan



More information about the sheepdog mailing list