Yeah, this is a problem. Mixing doing it in common code and in the
FSALs will always cause this problem. I'm tempted to say it should
always be done in common code, so it never breaks; but that way we can't
have FSALs that don't actually use real FDs control their contribution.
We're a long way from that working, though.
I don't see a good way to fix this, other than PROXY actually using the
proper infrastructure. The way it is now, you cannot mix PROXY and any
other FSAL and have a working system.
Daniel
On 05/16/2018 10:16 AM, Frank Filz wrote:
> How about this:
>
> pxy_close() just returns ERR_FSAL_NO_ERROR. How about, instead, it returns
> ERR_FSAL_NOT_OPENED?
Yea, that would do it. I see that fsal_close converts ERR_FSAL_NOT_OPENED to
ERR_FSAL_NO_ERROR.
Though that leaves us with this increment occurring without decrement:
FSAL/fsal_helper.c:413 open2_by_name : (void ) atomic_inc_size_t(&open_fd_count);
> Daniel
>
> On 05/16/2018 09:28 AM, Frank Filz wrote:
>> This is an example of why we need help from the FSAL in managing
> open_fd_count.
>>
>> The counter is decremented in fsal_close.
>>
>> The primary place it is incremented is in fsal_reopen_obj, which FSAL_PROXY
> never calls since it has absolutely no need to maintain a global file descriptor (it
> uses the always available special stateids).
>>
>> We could move the decrement into the FSAL itself which would then know
> exactly when it has closed a resource it was counting with open_fd_count.
>>
>> Frank
>>
>>> -----Original Message-----
>>> From: Daniel Gryniewicz [mailto:dang@redhat.com]
>>> Sent: Wednesday, May 16, 2018 5:29 AM
>>> To: devel(a)lists.nfs-ganesha.org
>>> Subject: [Nfs-ganesha-devel] Re: FSAL_PROXY : "open_fd_count is
negative"
>>>
>>> Hi, Patrice,
>>>
>>> This is definitely a problem. The LRU uses open_fd_count to
>>> determine when it needs to run, and when it's having problems. I
>>> made that change specifically to catch problems where it goes
>>> negative (which the LRU counts as huge...)
>>>
>>> Do you have a reproducer? Preferably a relatively simple one? I'd
>>> love to get this fixed.
>>>
>>> Daniel
>>>
>>> On 05/16/2018 04:28 AM, patrice.lucas(a)cea.fr wrote:
>>>> Since 2.7-dev.8 and the Daniel's patch fc5e13ecb "adding a
message
>>>> when open_fd_count comes negative", FSAL_PROXY tests logs are full
>>>> of these critical messages : "open_fd_count is negative".
>>>>
>>>>
>>>> Should I worry about and try to fix it ? Or is this open_fd_count
>>>> deprecated and unused ?
>>>>
>>>>
>>>> Best regards,
>>>>
>>>> Patrice
>>>> _______________________________________________
>>>> Devel mailing list -- devel(a)lists.nfs-ganesha.org To unsubscribe
>>>> send an email to devel-leave(a)lists.nfs-ganesha.org
>>> _______________________________________________
>>> Devel mailing list -- devel(a)lists.nfs-ganesha.org To unsubscribe send
>>> an email to devel-leave(a)lists.nfs-ganesha.org
>>
_______________________________________________
Devel mailing list -- devel(a)lists.nfs-ganesha.org
To unsubscribe send an email to devel-leave(a)lists.nfs-ganesha.org