Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp2207680ybz; Thu, 23 Apr 2020 13:36:25 -0700 (PDT) X-Google-Smtp-Source: APiQypKdILxUESjy8bMqmLX4V4tFX4hbxD69Gds4yVVjwtWcNsJJVqN94mEtqxULs5UAE+VsAGW1 X-Received: by 2002:a50:f29a:: with SMTP id f26mr4244322edm.79.1587674185845; Thu, 23 Apr 2020 13:36:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587674185; cv=none; d=google.com; s=arc-20160816; b=OdmFGJPAP3vw4yYhvK23Lwdlh9Osr9k07DtEVCuWx7gCS8b9mY9fxVQdyG4Zq8hnzl O9HYSrXhaRBw5qhlcbvt/L09EYxq6J7v9OBwoH8TIwyFitRdCCj0oQTznvPIjBeC2xDC bQiXs5WtHp0OibjyOz6EWBAw5OU2nr5QyqhIG/013qobDDP0Kf7AGX6I+fIcSmQ1Fw6K U7cf6fWaI/kJHa9EUQcIRAKD38YLDhrZGgQshSXwlOulYwESsz5LkGpjIK2LsCMXFaEc Ia+WW7dSHhpwGM//6xpnie1B0ulridts4aHf/Hc6l3I04UbkdF5m++43N0FBRk4/KKvO B/2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=H5lDBeVPpFh9qUBHB71lUkcO9L2ROKqtUooroKAxtU4=; b=E9xIaFuCGWMyhPsFN2m5MhLdsonZ6yFgfsMy3pZ0TKsqEc9M82XzYnCjiVh8IUZY3o POSrItbhk1EYsTmn0H9qOPjDQwmrg5BnMkP3jZzr8t4Cw5QtiFPW7ASiA1zM1b6uxQUT EAtC9SX2kgePrLr1oVfPTsjyECYGhF7QPLnCOI1ZNtkcvJoliS3EPKlo/AQtfgbEXcxr hkLPPp4LJZzmUEKmiCYN+mVV2pYm6Dx1/JO0rPshz6fcdidmOYWE9DvaOVTDZwmw/Ux2 HAWcNq/48MolTeOIWILqi7SQ2ULBICKal9ErURoKAr2baCZOw9EizwZe7ppAIrIsgaaV Sw3Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gs25si1773594ejb.366.2020.04.23.13.36.03; Thu, 23 Apr 2020 13:36:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726460AbgDWUeh (ORCPT + 99 others); Thu, 23 Apr 2020 16:34:37 -0400 Received: from fieldses.org ([173.255.197.46]:60222 "EHLO fieldses.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726390AbgDWUeg (ORCPT ); Thu, 23 Apr 2020 16:34:36 -0400 Received: by fieldses.org (Postfix, from userid 2815) id 38EE014DC; Thu, 23 Apr 2020 16:34:35 -0400 (EDT) From: "J. Bruce Fields" To: linux-kernel@vger.kernel.org Cc: "J. Bruce Fields" Subject: [PATCH 2/2] nfsd4: stid display should preserve on-the-wire byte order Date: Thu, 23 Apr 2020 16:34:33 -0400 Message-Id: <1587674073-9551-2-git-send-email-bfields@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1587674073-9551-1-git-send-email-bfields@redhat.com> References: <1587674073-9551-1-git-send-email-bfields@redhat.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: "J. Bruce Fields" 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 Signed-off-by: J. Bruce Fields --- fs/nfsd/nfs4state.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 7537f2f5156e..a6e0a7f77eb0 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -2422,7 +2422,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) -- 2.25.3