stat (AGAIN!)

Peter Smode psmode at kitsnet.vancouver.bc.ca
Thu Mar 20 11:20:46 GMT 2003


I'm currently coding the change to get SAMBA to use RMS calls and FIDs to
replace the primary call to stat(). The easiest way would be to have
vms_opendir invoke a modified form of vms_stat to populate the cache while
all the data required by the RMS calls were handy (i.e. the FID, DID and
volume label). I thought this would be a bad move, since it would tie
together the generation of the stat and directory caches unnecessarily. One
side effect would be an implicit rebuild of the cached stat entries every
time we refreshed the directory cache entries.

Instead, I am going to carry out from the VMS_SUPPORT routines a pointer to
an array of FIDs, and a copy of the DID and DVI field from the NAM block. I
will attach the data to conn->dirptr; a modification of the struct to carry
an additional pointer will do the trick. Logically, the new data will flow
up from the VMS_SUPPORT level to the TRANS2 level and back down to
VMS_SUPPORT. Though in reality, only a couple of routines will actually
reference the data.


I do have a question about the cache though. I can see how the cached
directory lists get tossed on timeout or file system change, but after
reading the code, I am still unclear on the mechanics for the cached stat()
data. How do entries in the cache get invalidated and dropped? Is this
wholesale, or on a per-entry basis?


Peter
*****************
Peter Smode
Kitsilano Network Research
psmode at kitsnet.vancouver.bc.ca


-----Original Message-----
From: samba-vms-bounces+psmode=jeslacs.bc.ca at lists.samba.org
[mailto:samba-vms-bounces+psmode=jeslacs.bc.ca at lists.samba.org]On Behalf
Of COLLOT Jean-Yves
Sent: Monday, March 17, 2003 4:06 AM
To: 'Peter Smode'; samba-vms at lists.samba.org
Subject: RE : stat (AGAIN!)


Using your method instead of opendir() readdir() seems very interesting, and
will certainly give better performances. When your version of VMS_OPENDIR
works, I'll be happy to put it in the distribution.

Please check that it works too with ODS-5 file system, with the extended
file names !

For information, I checked the efficiency of the directory/stat memory
caching. It's about the same for both caches. Even when doing numerous
changes (file creations/deletions) the number of disk I/Os is divided by
about 4.
When only browsing, it's obviously far more ( > 10) .


PLEASE READ THIS IMPORTANT ETIQUETTE MESSAGE BEFORE POSTING:

http://www.catb.org/~esr/faqs/smart-questions.html



More information about the samba-vms mailing list