[sheepdog] [PATCH] sheep: fix handling of too old epoch in check_request

Liu Yuan namei.unix at gmail.com
Tue May 29 12:28:56 CEST 2012


On 05/29/2012 05:33 PM, Christoph Hellwig wrote:

> If we hit a too old epoch in check_request (which can only happen
> when resume_pending_requests) we currently try to use io_op_done
> to decide what to do.  For objects that are store locally on a node
> that also acts as a gateway this is currently fatal:
> 
>  (a) io_op_done tries to remove the request from a list it has never
>      been added to
>  (b) io_op_done completes the request despite adding it to the
>      wait_rw_queue list
> 
> In addition it seems that
> 
>  (c) io_op_done was checking for a too large epoch, not a too small one
> 
> If that last one was intentional it should at least be documented in there,
> but I can't come up with a good explanation for it.
> 
> Fix these issues by opencoding the action we want in check_request.


I think we need revisit

        list_for_each_entry_safe(req, n, &pending_list, request_list) {
                list_del(&req->request_list);

                if (check_request(req) < 0)
                        continue;
                list_add_tail(&req->request_list, &sys->request_queue);
        }

which brings nested request manipulation.  It seems to me that if we can
remove this check_request(), the world will be less confusing.

Thanks,
Yuan



More information about the sheepdog mailing list