Re: [PATCH] protect again tgtd process hang as of hanging redirect script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



FUJITA Tomonori wrote:
The description looks fine but it would be better to put the fd to
epoll (that is, using tgt_event_add)?

yes, tgt_event_add would be more elegant way to handle that.

One thing which exists with the current patch but wouldn't be possible by just using tgt_event_add is --limiting-- the time tgt is willing
to allow the cluster management software to actually return something
on the redirect callback invocation.

So my plan is to use tgt_event_add so the redirect pipe fd is added to the epoll set, and also set a limit on the time tgt will be willing to wait for that reply by using the new timer-based work scheduling.

so the patch would like

1. instead of the possibly endless waitpid code
---------------------------------------
add_work(child pipe expiry handler)
tgt_event_add(child pipe fd, child pipe read handler)


2. child pipe expiry handler
------------------------
terminate child pid
tgt_event_del(child pipe fd)
return err on login request

3. child pipe read handler
-----------------------
del_work()
waitpid on child pid
read from pipe etc
return redirect info to login request


I guess we're fine from possible locking issues between del_work to tgt_event_del as tgt is single threaded?

Or.
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux