Hello Frank,

Thanks a lot for your answer. I think there is so many things that are not clear enough for me about the "global fd" concept.


On 10/18/17 15:23, Frank Filz wrote:
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.


I'm not sure to understand correctly. Does-it mean that in support ex case the close function must also be coded in addition of close2 ? And if so, what is the difference between close and close2 ? In new support_ex case, what part of the job should be done by close, and what other part of the job must be done by close2 ? Why not simply calling close2 with a "NULL" state ?

What do you mean by "fsal_close is only used to manage the global fd" ? What exactly is a global fd ? Isn't it a concept only link with the way some fsals choose to work ?



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.


What does-it mean "fsal_open2 is called on the global fd" ? There is no global fd parameter in the fsal_open2 function.



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.

Sorry, I didn't pay attention to the above test on permission error.

And what about the previous question 2.2)

Why we check if we have a valid state after calling fsal open2
before incrementing open_fd_count ?




Regards,
Patrice


Frank


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


--
Patrice LUCAS
Ingenieur-Chercheur, CEA-DAM/DSSI/SISR/LA2S
tel : +33 (0)1 69 26 47 86
e-mail : patrice.lu...@cea.fr


------------------------------------------------------------------------------
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