[sheepdog] [PATCH] sheep: process events directly

Liu Yuan namei.unix at gmail.com
Mon May 28 14:15:48 CEST 2012


On 05/28/2012 07:41 PM, Christoph Hellwig wrote:

> +		if (!sys_stat_ok() &&
> +		    (jm->cluster_status == SD_STATUS_OK ||
> +		     jm->cluster_status != SD_STATUS_HALT)) {
> +		     	int array_len = nr_members * sizeof(struct sd_node);
> +			struct vdi_bitmap_work *w;
> +
> +			w = xmalloc(sizeof(*w) + array_len);
> +			w->nr_members = nr_members;
> +			memcpy(w->members, members, array_len);
> +
> +			w->work.fn = do_get_vdi_bitmap;
> +			w->work.done = get_vdi_bitmap_done;
> +			queue_work(sys->block_wqueue, &w->work);
> +		}
>  
> -		memcpy(w->member_list, members, size);
> -		w->member_list_entries = nr_members;
> +		sys_stat_set(jm->cluster_status);


I am unsure if there is any problem that we set sys_stat before we get
the vdi bitmap. At least, this is one diffidence than the old logic.

Also, we can rename process_request_event_queues() as
process_request_queue since there is no event queue at all.

Thanks,
Yuan



More information about the sheepdog mailing list