From patchwork Mon Aug 10 08:47:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Tao X-Patchwork-Id: 6980721 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C398D9F358 for ; Mon, 10 Aug 2015 08:48:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 02E0D203F7 for ; Mon, 10 Aug 2015 08:48:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DD0E3203E5 for ; Mon, 10 Aug 2015 08:48:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753901AbbHJIsT (ORCPT ); Mon, 10 Aug 2015 04:48:19 -0400 Received: from mail-pd0-f179.google.com ([209.85.192.179]:32963 "EHLO mail-pd0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754032AbbHJIsR (ORCPT ); Mon, 10 Aug 2015 04:48:17 -0400 Received: by pdrh1 with SMTP id h1so51168862pdr.0 for ; Mon, 10 Aug 2015 01:48:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=5Z+2eJm8GcpdtRcHhxE8xN5uEpJQbFOXmNcCcWVdZYs=; b=UXBbOFEpnZylAc1f+WKmooDBDQZLTMBTYi8poaPdXKaqlZPkfJvBcc6Z22Y6eqXznf tYONDWvLpXH061HzHuEPSKJ4UoUM/FGoiyAlOgcc0wSd8M0TPakXxYPziWcmRmUSDlgg BTEWbqALuq5ytfr0TRbeZrZZB9BYPA3rUObKu5WjChpmsgU66tjORRYfvubO95ilr/02 QDyIWspuVdQYYMuERraF36BwRH4x+Gvzk422rTP/1HB+aS36gOL1+BUbZOypDrOHCyXr XI+4qA3efUVROuzAkWGzala3ChHfu8oebPsCOSa5ZmNjhPM93uZ+JGFm+eckgqTljmjZ 42dg== X-Gm-Message-State: ALoCoQkpB+1RgCkH2R5EH9otWI1Up082mhUJWkq9k47thZwpxaxG+Hhhi/iwfCT1C/HNRTI2NHOa X-Received: by 10.70.134.99 with SMTP id pj3mr11673768pdb.3.1439196496997; Mon, 10 Aug 2015 01:48:16 -0700 (PDT) Received: from lear.localdomain (ec2-54-65-164-9.ap-northeast-1.compute.amazonaws.com. [54.65.164.9]) by smtp.gmail.com with ESMTPSA id jr12sm1539845pbb.91.2015.08.10.01.48.14 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Aug 2015 01:48:16 -0700 (PDT) From: Peng Tao To: linux-nfs@vger.kernel.org Cc: Trond Myklebust , Peng Tao , Tom Haynes Subject: [PATCH] pnfs/flexfiles: LAYOUTSTATS ii_count should be ops instead of bytes Date: Mon, 10 Aug 2015 16:47:32 +0800 Message-Id: <1439196452-44553-1-git-send-email-tao.peng@primarydata.com> X-Mailer: git-send-email 1.8.3.1 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.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 Turned out I misinterpreted the spec... Cc: Tom Haynes Reported-by: Jean Spector Signed-off-by: Peng Tao --- fs/nfs/flexfilelayout/flexfilelayout.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/nfs/flexfilelayout/flexfilelayout.c b/fs/nfs/flexfilelayout/flexfilelayout.c index e69860c..ba388e9 100644 --- a/fs/nfs/flexfilelayout/flexfilelayout.c +++ b/fs/nfs/flexfilelayout/flexfilelayout.c @@ -1866,10 +1866,9 @@ ff_layout_mirror_prepare_stats(struct nfs42_layoutstat_args *args, memcpy(&devinfo->dev_id, &dev->deviceid, NFS4_DEVICEID4_SIZE); devinfo->offset = pls->pls_range.offset; devinfo->length = pls->pls_range.length; - /* well, we don't really know if IO is continuous or not! */ - devinfo->read_count = mirror->read_stat.io_stat.bytes_completed; + devinfo->read_count = mirror->read_stat.io_stat.ops_completed; devinfo->read_bytes = mirror->read_stat.io_stat.bytes_completed; - devinfo->write_count = mirror->write_stat.io_stat.bytes_completed; + devinfo->write_count = mirror->write_stat.io_stat.ops_completed; devinfo->write_bytes = mirror->write_stat.io_stat.bytes_completed; devinfo->layout_type = LAYOUT_FLEX_FILES; devinfo->layoutstats_encode = ff_layout_encode_layoutstats;