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)
Oct 2 2024, 7:10 AM
Unknown Object (File)
Oct 1 2024, 5:21 PM
Unknown Object (File)
Sep 21 2024, 5:45 PM
Unknown Object (File)
Sep 21 2024, 2:37 AM
Unknown Object (File)
Sep 20 2024, 1:21 PM
Unknown Object (File)
Sep 20 2024, 4:40 AM
Unknown Object (File)
Sep 19 2024, 6:16 PM
Unknown Object (File)
Sep 19 2024, 5:32 PM
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

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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 ↗(On Diff #22162)

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.