Re: [Samba-Technical] Wrtiing files from one linux to another linux

2002-09-01 Thread Kevin Liao
> > > 2. The remote server has successfully received and done the SMBflush > > > request. > > > > When fsync returns (2) has happened. The server has read and responded to > > the SMBflush. But we don't know if it actually wrote anything to disk. > > > > There is no way the smbfs client can know w

Re: [Samba-Technical] Wrtiing files from one linux to another linux

2002-08-30 Thread Kevin Liao
> The local system isn't running in any ram disk when using smbfs. Even if > you connect to a localhost samba server, that is a remote system as far as > smbfs is concerned. > > I'm not sure I understood you here. > > /Urban Sorry I didn't mention it clearly. The local machine does not have any

Re: [Samba-Technical] Wrtiing files from one linux to another linux

2002-08-28 Thread Kevin Liao
> fsync() (and also fdatasync()?) will cause the local kernel to write any > modified pages, and for smbfs it also sends a "SMBflush" that tells the > other end to sync it to disk. > > For mmap()'ed data you can use msync(). > > Haven't tested if open(..., O_SYNC) works. > > /Urban So when fsync(

Re: [Samba-Technical] Wrtiing files from one linux to another linux

2002-08-28 Thread Kevin Liao
> > Then, no matter which one of the above two situations happens, the data is > > not yet written to the physical storage at that time, right? Should I need > > to call fsync() each time after calling write()? Thanks a lot! > > Yes, at each point where you want to ensure the data is written (not

[Samba-Technical] Wrtiing files from one linux to another linux

2002-08-27 Thread Kevin Liao
Dear all, If I mount a remote linux partition using smbmount and write one file to that partition. How could I make sure that that file is really written to the remote disk successfully? I know that some cache mechanisms existed in linux kernel. So I guess there may be two possibilities as below: