diff options
author | J. Bruce Fields <bfields@redhat.com> | 2020-04-13 22:03:06 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2020-05-06 15:59:23 -0400 |
commit | ee590d259784806c32ad0523aa6a9c321dbf96a4 (patch) | |
tree | 16988a777fd961bf7216d17b70559fc66da466f1 /fs/nfsd | |
parent | ace7ade4f56cab0ea19d3665d7c14d713788c13d (diff) |
nfsd4: stid display should preserve on-the-wire byte order
When we decode the stateid we byte-swap si_generation.
But for simplicity's sake and ease of comparison with network traces,
it's better to display the whole thing in network order.
Reported-by: Scott Mayhew <smayhew@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd')
-rw-r--r-- | fs/nfsd/nfs4state.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index ded08aeae497..6fed3bf00ca7 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -2424,7 +2424,8 @@ static void nfs4_show_owner(struct seq_file *s, struct nfs4_stateowner *oo) static void nfs4_show_stateid(struct seq_file *s, stateid_t *stid) { - seq_printf(s, "0x%16phN", stid); + seq_printf(s, "0x%.8x", stid->si_generation); + seq_printf(s, "%12phN", &stid->si_opaque); } static int nfs4_show_open(struct seq_file *s, struct nfs4_stid *st) |