Writing files to remote storage

Kevin Liao (kevinliao@iei.com.tw)
Wed, 28 Aug 2002 16:17:50 +0800


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/