[Sheepdog] [PATCH 1/3] sheep: clean up is_access_to_busy_objects()
MORITA Kazutaka
morita.kazutaka at gmail.com
Wed May 2 06:11:43 CEST 2012
At Wed, 2 May 2012 11:22:03 +0800,
Liu Yuan wrote:
>
> From: Liu Yuan <tailai.ly at taobao.com>
>
> We don't need check oid == 0 or opcode & flags, because
> this is always guanranteed by the caller.
>
> Signed-off-by: Liu Yuan <tailai.ly at taobao.com>
> ---
> sheep/group.c | 8 --------
> 1 files changed, 0 insertions(+), 8 deletions(-)
>
> diff --git a/sheep/group.c b/sheep/group.c
> index f9a5437..a98da7f 100644
> --- a/sheep/group.c
> +++ b/sheep/group.c
> @@ -974,15 +974,7 @@ int is_access_to_busy_objects(uint64_t oid)
> {
> struct request *req;
>
> - if (!oid)
> - return 0;
> -
> list_for_each_entry(req, &sys->outstanding_req_list, r_wlist) {
> - if (req->rq.flags & SD_FLAG_CMD_RECOVERY) {
> - if (req->rq.opcode != SD_OP_READ_OBJ)
> - eprintf("bug\n");
I think it's better to call panic() and print the error reason here.
Thanks,
Kazutaka
> - continue;
> - }
> if (oid == req->local_oid)
> return 1;
> }
> --
> 1.7.8.2
>
> --
> sheepdog mailing list
> sheepdog at lists.wpkg.org
> http://lists.wpkg.org/mailman/listinfo/sheepdog
More information about the sheepdog
mailing list