[sheepdog] [PATCH v2 1/7] sheep: make requests with new epoch sleep until epoch is updated

levin li levin108 at gmail.com
Thu May 24 05:01:37 CEST 2012


On 05/23/2012 11:04 PM, Christoph Hellwig wrote:
>> +void resume_wait_epoch_requests(void)
>> +{
>> +	struct request *req, *t;
>> +
>> +	/* Request must have result SD_RES_OLD_NODE_VER
>> +	 * or SD_RES_NEW_NODE_VER in sys->wait_epoch_queue. */
>> +	list_for_each_entry_safe(req, t, &sys->wait_rw_queue,
>> +				 request_list) {
>> +
>> +		list_del(&req->request_list);
>> +		list_add_tail(&req->request_list, &sys->request_queue);
>> +		process_request_event_queues();
>> +	}
> 
> I think this should simply use list_splice_tail_init (which still needs
> to be ported from the Linux Kernel) to move all entries efficiently in
> one go, and then just call process_request_event_queues once.
> 

Ah, I've pushed 'wait recovery' requests which should not be processed here
into this queue in my later patch, so I think list_splice_tail_init is not
suitable, but I can move process_request_event_queues() out of the loop, since
there's already a loop inside process_request_event_queues().

thanks,

levin




More information about the sheepdog mailing list