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

Brad Sahr bsahr at macromedia.com
Fri Aug 25 16:41:20 GMT 2000


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?

Brad

-----Original Message-----
From: samba-technical-admin at samba.org
[mailto:samba-technical-admin at samba.org]On Behalf Of Jeremy Allison
Sent: Friday, August 18, 2000 10:01 AM
To: Brad Sahr
Cc: Samba Technical List
Subject: Re: VFS imlpementation and caching?


Brad Sahr wrote:
>
> I've been experimenting with Samba's VFS feature.
> I found yesterday that my VFS write() function is not
> getting called (either does fsync()).
>
> On the other hand, lseek(), read(), stat(), and other operations
> ARE called, so the VFS is working.
>
> BTW, this is a 'null' VFS that simply logs each operation
> called within the VFS.
>
> Can someone point me to the location in the code where
> the server would be writing data to disk on behalf of an
> SMB client? Is this write_file() in fileio.c? If so, it
> looks like the VFS will be bypassed.

Yes, that's a vfs bug. I'll fix it, thanks.,

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