nfsd4: stid display should preserve on-the-wire byte order
authorJ. Bruce Fields <bfields@redhat.com>
Tue, 14 Apr 2020 02:03:06 +0000 (22:03 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Wed, 6 May 2020 19:59:23 +0000 (15:59 -0400)
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>
fs/nfsd/nfs4state.c

index ded08aeae49797ff8a94c6af3de22960565f2c5d..6fed3bf00ca78226f4ae33b86e24a726da34bf96 100644 (file)
@@ -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)