> Trying to solve my problem with using a NFSv3 client on FSAL_PROXY, I
> looked at how open_fd_count was managed. I have few newbie questions.
> 
> 1) fsal_close (src/include/fsal.h)
> 
> fsal_close is claiming to deal with both support_ex and old cases but it only
> call fsal close and no close2 op ? Any explanation ?

fsal_close only calls close op because it is only used to manage the global fd. 
In non-support_ex, the global fd was used for everything, now it is just used 
for anonymous I/O.

> 2) open2_by_name (src/FSAL/fsal_helper.c)
> 
> 2.1) Why management of open_fd_count exists only in the "by name" open
> case ?

This case is to handle NFS v3 CREATE operation which is the only time 
fsal_open2 is called on the global fd.

> 2.2) Why we check if we have a valid state after calling fsal open2
> before incrementing open_fd_count ?
> 
> 2.3) Why do we call fsal close after opening the file ?

fsal_close is only called if a permission error occurs, and a permission check 
is only done when the file already existed but was not cached (so MDCACHE could 
not do a permission check before opening the file).

Thus a succeseful NFS v3 CREATE will leave the file open.

Frank


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Nfs-ganesha-devel mailing list
Nfs-ganesha-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel

Reply via email to