Infinite recursion in debug.c when debug_level >= 5

COLLOT Jean-Yves jean-yves.collot at cofiroute.fr
Mon Oct 25 12:23:56 GMT 2004


You are perfectly right about this DEBUG bug.

However, in the 2.2.8 code, sys_fstat actually calls vms_fstat. It is
vms_fstat which is redirecting that call to vms_stat, causing the questions
you ask. I am the guilty one for this.

Actually, I had a couple of reasons for doing this, even if they may be bad
ones. 

First of all, one of the major problems I encountered was to find a way for
getting "accurate" file sizes for variable-length or VFC files. Calling
standard CRTL stat() or fstat() does not work, because it gives you the
actual number of bytes of the file, which is bigger than the "real" size
when dynamically converted to stream (which is done by stm_read). This
generated unwanted zeroes at the end of the text when using notepad,
wordpad, etc... with variable-length files. 

I could not find a better way of getting this correct file size that
redirecting vms_fstat() to vms_stat(). In addition, redirecting vms_fstat to
vms_stat gave me an easy way of taking advantage of the stat() memory cache.


Even if we find a way of resolving the file size problem with fstat(), I
must say that I doubt that the changes you propose will "greatly improve the
speed of Samba/Vms" : I measured that 1000 calls to getname() takes 0.74
seconds on my Personal Workstation, and 0.23 seconds on a DS20. The file
translation is not performed anyway in this case, and the stat cache
existence usually greatly improves the speed.

But I may be wrong, and I am interested in your results when the changes are
done.

JY





More information about the samba-vms mailing list