vfs open/close

Julien Thomas omnikron at free.fr
Wed May 25 23:09:49 GMT 2005


Jeremy Allison wrote:

> On Wed, May 25, 2005 at 09:24:50AM +0200, Julien Thomas wrote:
>  
>
>> The trouble is that on a same connection, when the user do many open 
>> of an application, I can't know which close op is linked with which 
>> open op... This should be not a problem if I could link an open with 
>> his close using something such as an id.
>>   
>
>
> Match the fnum integer inside the files_struct struct.
>
> Jeremy.
>

Thanks Jeremy,

static int inrastats_open (vfs_handle_struct *handle,
                          connection_struct *conn,
                          const char *fname,
                          int flags,
                          mode_t mode);

static int inrastats_close(vfs_handle_struct *handle,
                      files_struct *fsp,
                      int fd);

So I am able to get fnum from "files_struct *fsp" in the close op, but 
is the files_struct can be obtain using the params of the vfs open 
operation ? I discover many things every time I take a look in the *.h 
of source/include/ but the there are many many functions and types !!! 
It's first time I try to understand (just a part of) sources of a 
project... and... hard :) .

Thanks again fo your help.
Julien.



More information about the samba-technical mailing list