[sheepdog] [PATCH v2 1/3] sheep: queue local gateway request instead of directly call forward_*_obj_req

Liu Yuan namei.unix at gmail.com
Tue Jun 26 05:33:03 CEST 2012


On 06/26/2012 10:45 AM, levin li wrote:
> +	if ((events & EPOLLHUP) || (events & EPOLLERR)) {
> +		eprintf("request handler error, exit\n");
> +		exit(1);
> +	}

According to the manual

"poll(2) returns a POLLERR event.  As noted above,  write(2)  can never
 overflow  the counter.  However an overflow can occur if 2^64 eventfd
"signal posts" were performed by the KAIO subsystem (theoretically
possible, but practically unlikely). If an overflow has occurred, then
read(2) will return that maximum uint64_t value (i.e., 0xffffffffffffffff)."

We should only check EPOLLERR and event this happens, I think write
event is still valid, so I think we don't need to check events.

Also, if you want to exit the sheep, use panic instead.

Thanks,
Yuan



More information about the sheepdog mailing list