From patchwork Wed Sep 6 10:51:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?UTF-8?q?Javier=20Gonz=C3=A1lez?= X-Patchwork-Id: 9940373 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B0EC3602CC for ; Wed, 6 Sep 2017 10:54:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A105128556 for ; Wed, 6 Sep 2017 10:54:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8DD8C28650; Wed, 6 Sep 2017 10:54:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4AB3528556 for ; Wed, 6 Sep 2017 10:54:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752824AbdIFKyT (ORCPT ); Wed, 6 Sep 2017 06:54:19 -0400 Received: from mail-wm0-f44.google.com ([74.125.82.44]:36228 "EHLO mail-wm0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753347AbdIFKwt (ORCPT ); Wed, 6 Sep 2017 06:52:49 -0400 Received: by mail-wm0-f44.google.com with SMTP id i145so28015665wmf.1 for ; Wed, 06 Sep 2017 03:52:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lightnvm-io.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tpeOYLTB/zNMmHeUIWovmm0IndxsKdryycUIYvVJ1rs=; b=ClnvKkuRIaCWYDnUQOYn/JA64STNzdGFnE+owvY8J7mnfbDKvYHYrhyZfoGg40UszZ QPcyxD2J5YlWw5Lch1v0y+0oY24BZ0V7HcKMidBAB2alg6sTTCDXVKcU7MSKknH9cQYY skScy9S0i/K0HeAWthQwMVvuWqi9Z5FmMCrUkH+yjrgoMNEut4N762uVF775/031uJ1Q 4o8oSAlAKL89e+9yeO7Ot5XzKG0QZKit2ejvku+FJlZiIQWHWjC0s8AdEX4GtoI2lHZF JBdmeYfUx0RPdvNk82WhXHPvdHI+bN6lF5lGQwRyVkhzVOLPXKdgjwkSV/MYFnVKNX89 oB3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tpeOYLTB/zNMmHeUIWovmm0IndxsKdryycUIYvVJ1rs=; b=rRP2G/oDtjhAuQufjWVF8f0f776/8nzkBxx9knu8dlNZXarf4Tkirg8pYpE7Wm+uF3 uA6o2R3N3XcvnWoo/8/26STN78o+jfhVWT9+EQ9Wm6ARiwWP7sKmas4kuQJee3Eb7e+e P/Pz7FGb2+en+F8a6SnSrwd2u4ATgP6ZxWeDZocZPtVjPa3h6UwTtXhSKThE4tSCt1DU VJXDFStcxuQ8gz1AW7RHXOA6rCkWO+QNYXP+N6OeBzkqQkFgRittGbLH9nFOyl40qdEq Jn08fyESDy7BIgRdV0517lxkCIl7NewKT+rpTs8/iElM+uyxFmX8MBmrYwLrtHCaw1+9 n3eA== X-Gm-Message-State: AHPjjUjQCukRnqgUeoOBg6iQOOM0r58GVmRpll0WJ061r16J1970A3j+ SHkXyEIxgZkMS26h X-Google-Smtp-Source: ADKCNb6j8xYwDshRa/+VZ/UQ3BcS/S7/zLb+4BrxlZ7VJWVs2WZJUp8jzAx27b/IDsOkC33zjW17Tw== X-Received: by 10.80.163.141 with SMTP id s13mr5613560edb.201.1504695168612; Wed, 06 Sep 2017 03:52:48 -0700 (PDT) Received: from uHalley.cnexlabs.com (6164211-cl69.boa.fiberby.dk. [193.106.164.211]) by smtp.gmail.com with ESMTPSA id b8sm1044007edi.46.2017.09.06.03.52.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 06 Sep 2017 03:52:48 -0700 (PDT) From: "=?UTF-8?q?Javier=20Gonz=C3=A1lez?=" X-Google-Original-From: =?UTF-8?q?Javier=20Gonz=C3=A1lez?= To: mb@lightnvm.io, axboe@fb.com Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Javier=20Gonz=C3=A1lez?= , =?UTF-8?q?Matias=20Bj=C3=B8rling?= Subject: [PATCH 13/18] lightnvm: pblk: fix write I/O sync stat Date: Wed, 6 Sep 2017 12:51:06 +0200 Message-Id: <1504695071-25928-14-git-send-email-javier@cnexlabs.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1504695071-25928-1-git-send-email-javier@cnexlabs.com> References: <1504695071-25928-1-git-send-email-javier@cnexlabs.com> MIME-Version: 1.0 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fix stat counter to collect the right number of I/Os being synced on the completion path. Signed-off-by: Javier González Signed-off-by: Matias Bjørling --- drivers/lightnvm/pblk-write.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/lightnvm/pblk-write.c b/drivers/lightnvm/pblk-write.c index 33dd90251a60..fb4d9c3983db 100644 --- a/drivers/lightnvm/pblk-write.c +++ b/drivers/lightnvm/pblk-write.c @@ -41,7 +41,7 @@ static unsigned long pblk_end_w_bio(struct pblk *pblk, struct nvm_rq *rqd, c_ctx->nr_padded); #ifdef CONFIG_NVM_DEBUG - atomic_long_add(c_ctx->nr_valid, &pblk->sync_writes); + atomic_long_add(rqd->nr_ppas, &pblk->sync_writes); #endif ret = pblk_rb_sync_advance(&pblk->rwb, c_ctx->nr_valid);