1

If I open a file in my C/C++/Java code using a pathname that goes to an nfs directory, how the does the read and write syntax work with NFS being stateless and all? I have tried but cant find an example code accessing NFS mounted files. My current understanding is that it is the job of the NFS client to keep state (like read and write pointer) and the application uses the same syntax.

A related question is regarding VFS and UFS. Are all files in a current unix machine accessed through their vnodes first and then (depending on local vs remote) inode or rnode structures?

4

1 回答 1

1

NFS(没有文件锁定)与用户级应用程序的本地存储没有什么不同。它可能会更慢,或者可能会意外退出,但这也可能发生在本地存储上。这可能就是您找不到特定以 NFS 为中心的示例代码的原因。

于 2011-02-16T12:46:09.120 回答