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)
Sun, Dec 22, 7:10 PM
Unknown Object (File)
Fri, Dec 20, 11:36 AM
Unknown Object (File)
Fri, Dec 20, 6:09 AM
Unknown Object (File)
Thu, Dec 19, 10:47 PM
Unknown Object (File)
Fri, Nov 29, 11:48 PM
Unknown Object (File)
Fri, Nov 29, 11:48 PM
Unknown Object (File)
Nov 24 2024, 3:27 AM
Unknown Object (File)
Nov 19 2024, 10:40 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.