> Hi Frank, > Don't we need fsal_close() to call close2() ? > We need the owner so we can release only the locks for this fd before > closing it. > Marc.
With support_ex enabled, fsal_close is only called when the fsal_obj_handle is being disposed of or when the LRU thread is closing open file descriptors (which will now only be those open file descriptors not associated with state), and it's purpose is only to close the global/anonymous file descriptor. There should be no locks associated with the global file descriptor. A few notes for you: 1. Not having a delegation aware FSAL to work on, I did not explore all the implications of delegations with support_ex. A delegation probably should inherit the file descriptor from the initial open state, but maybe it needs it's own. 2. For NFS v4 locks, the support_ex API SHOULD allow you to just have an open file descriptor associated with the open state and not have to have one per lock state (per lock owner) since your locks already have owners associated without having to have separate file descriptors. For NFS v3 locks of course there is no way (currently) to tie to an open state (even if there is an NLM_SHARE from the same process). I would like to eventually look for ties and create them if possible. Of course if it benefits you to have an open fd per lock owner, that's fine too. And actually, you can even fall back to using the global file descriptor (and note that now the FSAL actually gets to control when that's opened or closed). 3. I'm not sure you caught that you need to protect the global file descriptor with the fsal_obj_handle->lock since the content_lock is no more... I'm on vacation the rest of the week so I may not be able to respond until next week. Frank --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus ------------------------------------------------------------------------------ _______________________________________________ Nfs-ganesha-devel mailing list Nfs-ganesha-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel