VFS: Can you track fd (last activity on a file descriptor) ??

Derek Holden dsh2120 at draper.com
Mon Jun 3 10:02:01 GMT 2002


I think this is going to become a common question for people starting with 
VFS modules. The mapping of open and subsequent write calls to real world 
operations such as "newly created", "modified", etc.

Sorry, I don't know the best way to do it yet. There is a 'BOOL modified' 
flag attached to the files struct, though I  don't know in which context 
it's updated. Other tricks I've seen involve checking the file sizes at 
various stages, i.e. an open with a file size of 0 is a possible new 
creation, etc.

Derek

At 6/3/2002 10:50 AM, you wrote:
>I looking for a way to check the last activity performed on a specific fd.
>
>What I trying to do is,
>
>see if the last action was a open while during the current write request.
>this will tell me that a file was opened and actually written to.
>when this occurs I will make a copy of file for ( FDA Part11 compliance ).
>
>The issues is that most things open with write but perform so action .. or
>possible not. If you right click properties in explorer it opens for write.
>( I must track paired actions .. to conclude if a backup is needed or not.
>
>-------------------------------------------
>My idea is created a GLOBAL array
>
>....
>
>int fd_stat[1024] = 0;
>
>0=unused or closed
>1=open for write
>2=written too
>
>int stat *vfs_init....
>-----------------------------------------
>
>Does SAMBA already do this with the current structures ?????????????????
>
>help ...
>
>
>if anyone else needs Part 11 Compliance .. I will releases this
>if I can get it working





More information about the samba-technical mailing list