[Sheepdog] [PATCH 1/2] sheep: cleanup request list handling

Liu Yuan namei.unix at gmail.com
Tue May 15 08:39:45 CEST 2012


On 05/11/2012 09:19 PM, Christoph Hellwig wrote:

> static void queue_request(struct request *req)
>  {
> -	struct event_struct *cevent = &req->cev;
>  	struct sd_req *hdr = (struct sd_req *)&req->rq;
>  	struct sd_rsp *rsp = (struct sd_rsp *)&req->rp;
>  
> +	assert(list_empty(&req->request_list));
> +


request is allocated in client_rx_handler() just before calling
queue_request(), so I think this assertion is useless. We don't need
this safe-guard because there is nothing to guard. This path is quit
hot, so we'd better off only doing guard when necessary.

Thanks,
Yuan



More information about the sheepdog mailing list