Page MenuHomeFreeBSD

align nfsdumpstate column output
ClosedPublic

Authored by yocalebo_gmail.com on Jan 25 2019, 5:30 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 4, 9:44 PM
Unknown Object (File)
Mon, Nov 4, 12:06 PM
Unknown Object (File)
Oct 18 2024, 7:23 AM
Unknown Object (File)
Oct 10 2024, 3:40 AM
Unknown Object (File)
Oct 3 2024, 10:02 AM
Unknown Object (File)
Oct 2 2024, 8:03 AM
Unknown Object (File)
Oct 2 2024, 3:53 AM
Unknown Object (File)
Oct 2 2024, 3:46 AM
Subscribers

Details

Summary

There are scenarios where an NFS client will mount an NFSv4 export without specifying a callback address.

When running nfsdumpstate under this circumstance, the column output is shifted incorrectly which places the "ClientID" value underneath the "Clientaddr" column.

This diff is a small cosmetic change that prints a blank in the "Clientaddr" column and ensures the data for the columns are aligned appropriately.

Sponsored by: iXsystems

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

Hm, this will break the output. For the better, I think. Does it need a man page change as well?

I don't believe it will need a man page change because the dump_lockstate function already prints a blank for this column when a call back address isn't found.

Ok, seems good to me then.

This revision is now accepted and ready to land.Jan 25 2019, 5:41 PM

This is still needed but the code has changed so the patch must be adapted.

This revision now requires changes to proceed.Mar 24 2021, 6:27 PM

This is still needed but the code has changed so the patch must be adapted.

Thanks, I've updated the diff accordingly.

This revision is now accepted and ready to land.Mar 24 2021, 6:57 PM
usr.sbin/nfsdumpstate/nfsdumpstate.c
161

I missed this side of the diff when I first looked. It is fine to remove these lines, since inet_ntop can't fail in this case, however I might add an assert for that instead of the unbalanced if.

This revision now requires review to proceed.Mar 24 2021, 8:26 PM
This revision is now accepted and ready to land.Mar 24 2021, 8:27 PM
usr.sbin/nfsdumpstate/nfsdumpstate.c
161

You're right. I've updated the commit to keep the changes to specifically doing what my original commit was supposed to do.

This revision was automatically updated to reflect the committed changes.