fs: Improve text on NFS silly renames.
[aple.git] / Filesystems.m4
index 75d07253d0f5d50630ba6ff5ddd2fb5e3ba44b21..ca894346e55d865ee7171c1052c22a01a005acf4 100644 (file)
@@ -1345,11 +1345,16 @@ is still open. Only after all the last file descriptor that refers
 to the thusly silly-renamed file is closed, the client removes the
 file by issuing an appropriate rpc. </p>
 
-<p> This approach is not perfect. For one, if the client crashes,
-a stale <code>.nfs12345</code> file remains on the server. Second,
-since silly renames are only known to the nfs client, bad things
-happen if a different client removes the file. </p>
-
+<p> This approach is not perfect. For one, if the client crashes, a
+stale <code>.nfs12345</code> file remains on the server. Second, since
+silly renames are only known to the nfs client, bad things happen if a
+different client removes the file. Finally, if an application running
+on a client removes the last regular file in a directory, and this
+file got silly-renamed because it was still held open, a subsequent
+<code>rmdir</code> will fail unexpectedly with <code>Directory not
+empty</code>. Version 4.1 of the NFS protocol finally got rid of
+silly renames: An NFS4.1 server knows when it its safe to unlink a
+file and communicates this information to the client. </p>
 
 <p> The file handle which an nfs client received through some earlier
 rpc can become invalid at any time due to operations on a different
@@ -1396,11 +1401,11 @@ EXERCISES()
        <li> On an nfs server, run <code>collectl -s F -i 5</code> and discuss
        the output. </li>
 
-       <li> In an nfs-mounted directory, run <code>cat > foo &</code>. Note
-       that the cat process automatically receives the STOP signal.
-       Run <code>rm foo; ls -ltra</code>. Read section D2 of the
-       <a href="http://nfs.sourceforge.net/">nfs HOWTO</a> for the
-       explanation. </li>
+       <li> In an nfs-mounted directory (nfs version 4.0 or earlier), run
+       <code>cat > foo &</code>. Note that the cat process automatically
+       receives the STOP signal. Run <code>rm foo; ls -ltra</code>. Read
+       section D2 of the <a href="http://nfs.sourceforge.net/">nfs HOWTO</a>
+       for the explanation. </li>
 
        <li> In an nfs-mounted directory, run <code>{ while :; do echo; sleep
        1; done; } > baz &</code>. What happens if you remove the file on a