lkml.org 
[lkml]   [2002]   [Aug]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectWriting files to remote storage
Date
Dear all,

I don't know whether it's proper to post such a problem in this mailing
list,
but I guess someone here could help me...

If I mount a remote linux partition through smb or nfs 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:

1. After the call write() returns successfully, the file has been actually
in the local cache and then submit to remote cache later.
2. After the call write() returns successfully, the file has been actually
in the remote cache and then submit to remote disk later.

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!

Regards,
Kevin


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:28    [W:0.118 / U:3.872 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site