s3: Avoid pwrite calls for the 1-byte writes with zero content
authorVolker Lendecke <vl@samba.org>
Mon, 19 Jul 2010 14:15:01 +0000 (16:15 +0200)
committerVolker Lendecke <vl@samba.org>
Mon, 19 Jul 2010 20:06:28 +0000 (22:06 +0200)
commit6763730304627a58139450fd3e03a0ce48e31bb9
tree292bc671b35cf1655595ef08b859592ec5ba5ebd
parent944494d350fa0e42aa8a87849fa7168731f3b0a6
s3: Avoid pwrite calls for the 1-byte writes with zero content

When a write cache is empty and we write one 0, there is no point in actually
writing into the write cache, which would trigger a potentially superfluous
write cache flush. We can rely on posix semantics to give us 0's when
subsequent read calls want to read from file areas not written yet.

Jeremy, please check!
source3/smbd/fileio.c