CIFS extensions for UNIX

Urban Widmark urban at
Sun Apr 7 05:24:01 GMT 2002

On Sun, 7 Apr 2002, John Newbigin wrote:

> I have updated my patches to work against linux 2.4.18.  I have had some
> problems with my patches failing fsx-linux.  For now I have reverted to
> using smb_proc_trunc (which is a SMBwrite call).  This works but leads
> me to beleive that there may be a problem with truncates using

Certainly possible. Other thoughts:

The order has to be:
	smb_proc_trunc [1]

We must ensure the other end is ok with the size change before dropping
any local pages. If you have moved things around that could be a reason.

Also note the datasync/datawait before truncating. They are there to flush
out any mmap'ed writes that the VM is holding on to. If you bypass those
fsx will start to fail.

You should also be aware that there is one case where fsx still fails in
vanilla 2.4.18. It is a bit harder to trigger than the ones that have been
fixed. I have the details somewhere outside my head, but it was something
regarding fsx assuming that the fs is more unixy than it is ...
(close semantics?)

[1] which may implement truncate as something other than SMBwrite if it
wants to, see the trunc64 variant for LFS (2.5.6), or if setattr_unix can
truncate then that may be used as well. It is not defined to be a SMBwrite

> The kernel patch for linux 2.4.18 is here

Are these different from the links you posted on Mar 12th? Looking at the
diff dates says no, but perhaps these are the wrong links?


More information about the samba-technical mailing list