[illumos-Developer] webrev for 1107

Vitaliy Gusev gusev.vitaliy at nexenta.com
Mon Jun 13 10:53:37 PDT 2011


On 06/13/2011 09:35 PM, Dan Kruchinin wrote:
>> Connection oriented protocols are initialized via cots_listen_event() that
>> is called from poll_for_action().
>
> poll_for_action() doesn't call any initialization functions, it just
> does polling on
> fds that were registered earlier
> (via do_one calling do_poll_cots_actions which in its turn calls
> cots_listen_events).
> So cots_listen_events that initializes connection oriented protocols
> is called from
> only one function - do_one().

No, do_one doesn't call do_poll_cots_action. I as mentioned early,
call stack is:

    poll_for_action
         do_poll_cots_action
              cots_listen_event


Each daemons should go to poll_for_action() loop.


Also see add_to_poll_list(sock, retnconf);

>
>>
>>
>> So, Dan, Why did you change it with OK_TPI_TYPE?
>>
>> -        if (retnconf->nc_semantics == NC_TPI_CLTS) {
>> +        if (OK_TPI_TYPE(retnconf)) {
>>
>>
>> It needs to be initialized directly only for connectionless protocols (UDP).
>
> This change was done in do_one function that _must_ work with both
> COTS and CLTS, right?

do_one now works with both COTS and CLTS protocols.


> do_one function is main entry point for NFS related daemons which want
> to initialize server code
> for particular protocol and do polling on related devices then.
> Actually there is another entry point
> called do_all(), but it calls do_one as well.
>
>>
>>
>>> Would be good to understand why that was there.
>>>
>>> On Sun, Jun 12, 2011 at 10:31 PM, Dan Kruchinin<dkruchinin at acm.org>
>>>   wrote:
>>>>
>>>> While working on NFS lock manager I found two bugs/issues in illumos.
>>>> Here is the first one.
>>>> The patch makes do_one() function of nfs_tbind.c able to work with
>>>> loopback device (/dev/ticotsord) provider.
>>>> We need it for lockd daemon. It uses loopback device to communicate
>>>> with kernel part of network lock manager.
>>>
>>> BTW, it's used by the in-kernel part of the lock manager to
>>> communicate with the user-space NFS status monitor.
>>> (This code pre-dates doors, door up-calls, etc.)  We could
>>> change it use a different mechanism, but we'd prefer to
>>> minimize the scope of this work as much as possible.
>>> (At least for now.)
>>>
>>> Gordon
>>>
>>> _______________________________________________
>>> Developer mailing list
>>> Developer at lists.illumos.org
>>> http://lists.illumos.org/m/listinfo/developer
>>
>>
>
>
>




More information about the Developer mailing list