From patchwork Sun Mar 22 14:16:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kinglong Mee X-Patchwork-Id: 6066771 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7CB3CBF90F for ; Sun, 22 Mar 2015 14:16:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A652E2026F for ; Sun, 22 Mar 2015 14:16:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B7CCC2026D for ; Sun, 22 Mar 2015 14:16:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751763AbbCVOQv (ORCPT ); Sun, 22 Mar 2015 10:16:51 -0400 Received: from mail-pa0-f49.google.com ([209.85.220.49]:35275 "EHLO mail-pa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751768AbbCVOQu (ORCPT ); Sun, 22 Mar 2015 10:16:50 -0400 Received: by pagj4 with SMTP id j4so71746989pag.2 for ; Sun, 22 Mar 2015 07:16:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :content-type:content-transfer-encoding; bh=tozGUY1qma5JBq5fsBA9LGcPqXI7AC3I9Gw5hUnoftg=; b=WY1QqW+ZjdO2wvGlpzO9tzTtJBeU7gQ8KXi1Eq8roUwLxvRIaEwBhjK0yWB6AOI2MQ lELvawAuRmXQzq5ZUsGwPrlP9ai2WocFzvRX2rAdw8ZWAba7SonzavphaabLxMgjm77v 78+XQZSFrfjZ8RHf7d7Fajzmz71WwkD9glOAn/gyBm8clESuhKZkkSg24bFNc4t86Dn6 wA7eLzKlJhLYGLFfKbfnfXaV04uGSI69o2p8YgjZ11BgoGGUZro7FYJUi461anN3FOcQ RbvnrANCSBaLIEsYCZWsEgEFszTVQAQjA/rbzr1L7RPCYFcxceZvqeIPpZVsc4WaUm6a pMZQ== X-Received: by 10.68.222.161 with SMTP id qn1mr12590693pbc.106.1427033810451; Sun, 22 Mar 2015 07:16:50 -0700 (PDT) Received: from [192.168.99.7] ([104.143.41.80]) by mx.google.com with ESMTPSA id zq6sm2043186pac.11.2015.03.22.07.16.45 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 22 Mar 2015 07:16:49 -0700 (PDT) Message-ID: <550ECEC8.5040406@gmail.com> Date: Sun, 22 Mar 2015 22:16:40 +0800 From: Kinglong Mee User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: "J. Bruce Fields" CC: Linux NFS Mailing List , Christoph Hellwig Subject: [PATCH] NFSD: Printk blocklayout length and offset as format 0x%llx Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When testing pnfs with nfsd_debug on, nfsd print a negative number of layout length and foff in nfsd4_block_proc_layoutget as, "GET: -xxxx:-xxx 2" Signed-off-by: Kinglong Mee Reviewed-by: Christoph Hellwig --- fs/nfsd/blocklayout.c | 2 +- fs/nfsd/blocklayoutxdr.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/nfsd/blocklayout.c b/fs/nfsd/blocklayout.c index cdbc78c..03d647b 100644 --- a/fs/nfsd/blocklayout.c +++ b/fs/nfsd/blocklayout.c @@ -137,7 +137,7 @@ nfsd4_block_proc_layoutget(struct inode *inode, const struct svc_fh *fhp, seg->offset = iomap.offset; seg->length = iomap.length; - dprintk("GET: %lld:%lld %d\n", bex->foff, bex->len, bex->es); + dprintk("GET: 0x%llx:0x%llx %d\n", bex->foff, bex->len, bex->es); return 0; out_error: diff --git a/fs/nfsd/blocklayoutxdr.c b/fs/nfsd/blocklayoutxdr.c index 9da89fd..9aa2796 100644 --- a/fs/nfsd/blocklayoutxdr.c +++ b/fs/nfsd/blocklayoutxdr.c @@ -122,19 +122,19 @@ nfsd4_block_decode_layoutupdate(__be32 *p, u32 len, struct iomap **iomapp, p = xdr_decode_hyper(p, &bex.foff); if (bex.foff & (block_size - 1)) { - dprintk("%s: unaligned offset %lld\n", + dprintk("%s: unaligned offset 0x%llx\n", __func__, bex.foff); goto fail; } p = xdr_decode_hyper(p, &bex.len); if (bex.len & (block_size - 1)) { - dprintk("%s: unaligned length %lld\n", + dprintk("%s: unaligned length 0x%llx\n", __func__, bex.foff); goto fail; } p = xdr_decode_hyper(p, &bex.soff); if (bex.soff & (block_size - 1)) { - dprintk("%s: unaligned disk offset %lld\n", + dprintk("%s: unaligned disk offset 0x%llx\n", __func__, bex.soff); goto fail; }