VFS write not being called (was: VFS imlpementation and caching?)

Jeremy Allison jeremy at valinux.com
Fri Aug 25 17:17:53 GMT 2000


Brad Sahr wrote:
> 
> I'm pretty new to the Samba source base, but here's my take
> on what's happening. Will you let me know if I'm on track here?
> 
> The real_write_file() function in fileio.c looks like the
> politically correct place to make the call to the VFS.
> 
> But, if real_write_file() in fileio.c is modified to call
> fsp->conn->vfs_ops.write(), the functionality currently
> provided by write_data() in util_sock.c will be bypassed.
> The write_data() function iteratively calls write() 'til
> all bytes are written.
> 
> Existing chain of function calls:
> write_file()
>   real_write_file()
>     write_data()
>       write()
>         etc...
> 
> Chain of function calls through VFS -if- vfs_ops.write() called in fileio.c:
> write_file()
>   real_write_file()
>     vfswrap_write() (fsp->conn->vfs_ops.write())
>       write()
>         etc...
> 
> How should this be addressed?

Easiest way is to duplicate the "until all bytes written"
semantics of write_data in real_write_file() and leave
the semantics of vfs_ops.write() alone (ie. may return less
written than was requested).

Jeremy.

-- 
--------------------------------------------------------
Buying an operating system without source is like buying
a self-assembly Space Shuttle with no instructions.
--------------------------------------------------------




More information about the samba-technical mailing list