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
<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