OpLocks and file sizes.

Richard Sharpe rsharpe at richardsharpe.com
Mon Mar 26 20:21:13 MDT 2012

On Mon, 26 Mar 2012, Christopher R. Hertel wrote:

> Some quick OpLock questions...
> Say we've got a file with an exclusive OpLock, and the client is appending
> to the end of the file (making it a bigger file, of course).  In that case,
> the server won't know the new size of the file until the writes have been
> flushed to the server, which would happen on close or OpLock break.

My experience is that Windows does a one-byte write to extend the actual 
size of the file to the end of each write that would extend the file, even 
though the data goes into the local cache.

This has the advantage that ENOSPC can be reported sooner than file close 

Richard Sharpe, rsharpe[at]richardsharpe.com, rsharpe[at]samba.org,
sharpe[at]ethereal.com, http://www.richardsharpe.com

More information about the samba-technical mailing list