[sheepdog] [PATCH] sheep: remove unnecessary assignment in peer_read_obj

Liu Yuan namei.unix at gmail.com
Fri Nov 15 07:19:34 CET 2013


There is currently no client using the rsp->obj.copies. Since this assignment
is in the hottest code path, it is beneficial to remove it.

Signed-off-by: Liu Yuan <namei.unix at gmail.com>
---
 sheep/ops.c |    5 -----
 1 file changed, 5 deletions(-)

diff --git a/sheep/ops.c b/sheep/ops.c
index de0a563..631e279 100644
--- a/sheep/ops.c
+++ b/sheep/ops.c
@@ -916,11 +916,6 @@ int peer_read_obj(struct request *req)
 		goto out;
 
 	rsp->data_length = hdr->data_length;
-	if (hdr->obj.copies)
-		rsp->obj.copies = hdr->obj.copies;
-	else
-		rsp->obj.copies = get_obj_copy_number(hdr->obj.oid,
-						      req->vinfo->nr_zones);
 out:
 	return ret;
 }
-- 
1.7.9.5




More information about the sheepdog mailing list