Page MenuHomeFreeBSD

fix umount so that it correctly handles the Unmount RPC for TCP or NFSv4 mounts
ClosedPublic

Authored by rmacklem on Nov 11 2016, 10:21 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, May 2, 10:05 PM
Unknown Object (File)
Thu, May 2, 10:05 PM
Unknown Object (File)
Thu, May 2, 10:05 PM
Unknown Object (File)
Thu, May 2, 9:12 PM
Unknown Object (File)
Thu, May 2, 8:34 PM
Unknown Object (File)
Sat, Apr 27, 12:41 PM
Unknown Object (File)
Sat, Apr 27, 11:54 AM
Unknown Object (File)
Sat, Apr 27, 11:54 AM
Subscribers

Details

Summary

This patch modifies umount(8) so that, when NFS mounts are being unmounted, it uses TCP for the
Unmount RPC if the NFSv3 mount is over TCP and does not do any Unmount RPC for NFSv4.
Without this patch, umount(8) always does an Unmount RPC over UDP.

Test Plan

Do umounts for NFSv3,UDP NFSv3,TCP and NFSv4 mounts and look at the packet trace
via wireshark to see that the correct Unmount RPC is done or not done at all.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

rmacklem retitled this revision from to fix umount so that it correctly handles the Unmount RPC for TCP or NFSv4 mounts.
rmacklem updated this object.
rmacklem edited the test plan for this revision. (Show Details)

Subject to the s/char */const char */ on line 329, this fixes the long-wait-on-umount I saw on nfsv4. I don't have any non-nfsv4 mounts, so I can't test those.

sbin/umount/umount.c
329

This needs to be 'const char *' since we're assigning constant strings to it.

cperciva added a reviewer: cperciva.
cperciva edited edge metadata.
This revision is now accepted and ready to land.Nov 12 2016, 7:46 PM
rmacklem edited edge metadata.

Add the "const" recommended by cperciva.

This revision now requires review to proceed.Nov 12 2016, 8:33 PM
cperciva edited edge metadata.
This revision is now accepted and ready to land.Nov 12 2016, 9:31 PM
This revision was automatically updated to reflect the committed changes.