I'm using samba-3.0.4 and samba-2.2.9 on FreeBSD-4-stable and FreeBSD-current.
I define a resouce on a NFS mounted file system. When I try to write more
bytes than quota entry on NFS server permits, the first write() always succeed
even if it should fail. I know this is normal on a network file system, but
the following error on close() is ignored, so that corrupted, lacking the last
part, file is left with no error on client(windows) if the last write() of a
transaction raised an error.
I set 'strict sync' and 'sync always' in smb.conf, though it has no effect.
Because they result in calling sync_file() in reply_write_and_X() in reply.c,
but the return value of sync_file() is never checked.
I modified reply_write_and_X() to check the return value of sync_file() to
report an error and the problem is fixed (at least on FreeBSD). I modified
the other part of reply.c, but not tested yet.
FYI, Fedora Core2 report an error on a first write (not second) on a NFS
filesystem, so this problem does not occur.
Created attachment 544 [details]
Check fsync() return value to indicate an error (samba-3.0.4)
Created attachment 545 [details]
Please retest against a current release and reopen if the issue still exists.