okuyamak at dd.iij4u.or.jp
Thu Nov 9 03:33:15 GMT 2000
>>>>> "MJT" == Michael Ju Tokarev <mjt at tls.msk.ru> writes:
MJT> Statcache isn't a "true object" now (sorry me for OOP thing).
MJT> It should be either just an in-memory cache without any disk/fs
MJT> access (i.e. to store just opaque things), or it should provide
MJT> full "filesystem layer" with open/creat/readdir/etc interfaces.
I'll recommend second, for there are some tipical cases.
When calling CreateFile() of Win32API on NT (even with SP4),SMB
request comes something like:
They first open the file, and if they found one, they first close
it. Then re-open again for real usage.
# I think NT is using first createX request for the purpose
# exactly the same way Jeremy was thinking about stat() call.
# They check for existance of file on first, then open it for
# actual usage.
This tells you that, even if SMBclose request is being called,
you should not close file descriptor. Instead, keep it open until
next request comes, or until other smbd request for access to that
file, or until smbd is requested to die.
This kind of optimization can be done more "independent" from other
layer if statcache is more OO-ed, like Michael is pointing.
Kenichi Okuyama at Tokyo Research Lab, IBM-Japan, Co.
More information about the samba-technical