Page MenuHomeFreeBSD

align nfsdumpstate column output
ClosedPublic

Authored by yocalebo_gmail.com on Jan 25 2019, 5:30 PM.

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
R10 FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

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.Wed, Mar 24, 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.Wed, Mar 24, 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.Wed, Mar 24, 8:26 PM
This revision is now accepted and ready to land.Wed, Mar 24, 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.