From patchwork Wed Jun 1 13:37:14 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasily Averin X-Patchwork-Id: 840202 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p51Daqu6010413 for ; Wed, 1 Jun 2011 13:37:19 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752220Ab1FANhS (ORCPT ); Wed, 1 Jun 2011 09:37:18 -0400 Received: from mailhub.sw.ru ([195.214.232.25]:42601 "EHLO relay.sw.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751766Ab1FANhR (ORCPT ); Wed, 1 Jun 2011 09:37:17 -0400 Received: from [10.30.3.27] ([10.30.3.27]) (authenticated bits=0) by relay.sw.ru (8.13.4/8.13.4) with ESMTP id p51Dd3sa007210 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 1 Jun 2011 17:39:04 +0400 (MSD) Message-ID: <4DE6408A.8050105@parallels.com> Date: Wed, 01 Jun 2011 17:37:14 +0400 From: Vasily Averin Organization: Parallels User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110424 Thunderbird/3.1.10 MIME-Version: 1.0 To: linux-nfs@vger.kernel.org Subject: [PATCH 2/2] lockd: properly convert be32 values in debug messages Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Wed, 01 Jun 2011 13:37:19 +0000 (UTC) From be1e4fa45aa0c828d2e864c160857a41d2de0531 Mon Sep 17 00:00:00 2001 From: Vasily Averin Date: Wed, 1 Jun 2011 16:54:32 +0400 Subject: [PATCH 2/2] lockd: properly convert be32 values in debug messages lockd: server returns status 50331648 it's quite hard to understand that number in this message is 3 in big endian Signed-off-by: Vasily Averin --- fs/lockd/clntproc.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/fs/lockd/clntproc.c b/fs/lockd/clntproc.c index adb45ec..acef6b7 100644 --- a/fs/lockd/clntproc.c +++ b/fs/lockd/clntproc.c @@ -302,7 +302,8 @@ nlmclnt_call(struct rpc_cred *cred, struct nlm_rqst *req, u32 proc) /* We appear to be out of the grace period */ wake_up_all(&host->h_gracewait); } - dprintk("lockd: server returns status %d\n", resp->status); + dprintk("lockd: server returns status %d\n", + ntohl(resp->status)); return 0; /* Okay, call complete */ } @@ -690,7 +691,8 @@ nlmclnt_unlock(struct nlm_rqst *req, struct file_lock *fl) goto out; if (resp->status != nlm_lck_denied_nolocks) - printk("lockd: unexpected unlock status: %d\n", resp->status); + printk("lockd: unexpected unlock status: %d\n", + ntohl(resp->status)); /* What to do now? I'm out of my depth... */ status = -ENOLCK; out: @@ -837,6 +839,7 @@ nlm_stat_to_errno(__be32 status) return -ENOLCK; #endif } - printk(KERN_NOTICE "lockd: unexpected server status %d\n", status); + printk(KERN_NOTICE "lockd: unexpected server status %d\n", + ntohl(status)); return -ENOLCK; }