From patchwork Wed Sep 6 15:01:05 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: 9940965 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 D34E360216 for ; Wed, 6 Sep 2017 15:02:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C7CEC28C12 for ; Wed, 6 Sep 2017 15:02:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BC9F428C16; Wed, 6 Sep 2017 15:02:49 +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.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=unavailable 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 61DC728C12 for ; Wed, 6 Sep 2017 15:02:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932659AbdIFPCr (ORCPT ); Wed, 6 Sep 2017 11:02:47 -0400 Received: from mail-wm0-f50.google.com ([74.125.82.50]:37536 "EHLO mail-wm0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932787AbdIFPBT (ORCPT ); Wed, 6 Sep 2017 11:01:19 -0400 Received: by mail-wm0-f50.google.com with SMTP id u26so32206850wma.0 for ; Wed, 06 Sep 2017 08:01:19 -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=o1BlMd3o3p2lmVUA66/VlNu/w2pGdC1rW7/JY8KSyD8=; b=qNHflwBXqdt4G00vfBrWaL6TSq++gppTHrqB7FSRPga0N7pGHgwruTvBEShAj+SKup 5wAuy7aXQukSDBaYDBTubhzfn4UMuEb/7XAJYxLMqoObQ5J3yvFweFhUgBdbDFDxob0O CJmbrDmZiySjl+C1fDhqmwvT/1tOcdGDUOtc4jwdlapGYaSEyqeWExmA+913S1ak9y+r dyR4dAajRcdmVIPz40vAoehatSi8h7TS9YTiCnZY6VOoPUfMz8Bv6NKRd4rtsYVyHREa +5dNPABBde+0+9jjWGri2pEfyeuA9D10qpkMlaaNK9OD/h+U0WptdjKo6TzqKLfcnAtg fkmw== 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=o1BlMd3o3p2lmVUA66/VlNu/w2pGdC1rW7/JY8KSyD8=; b=eX8flajNEVjV7APJ2KskSSikHkJumbQykgUg54hPRfPisAKAgbBZYVYHth4UPvFh3Q TMYNNCMQX0JENUrsOqAJcPlgwnhoFPfuMKrhHUWVPxASVxDk9vBnyI2bxvGCuNGd+ap1 ANrpC+BB5Ypy/Ll1hDMEl9TurCmo0TXDoSQy9wHHN/Q7qj3oO0SedfMP520PVMftF9da HL2s+rX9tZhQLzxc7V+LTE8GoaWfTYLq3DWo09NiHJg6pSa0UgJlSIDwxcZFgZgMeEkF //hz5JqLMKKIbSJ1HmU4d6td0wfwvPPCCi+HOF9Wep0TnUUG3Rl8F2r2vCU4slWn8N2l jkWA== X-Gm-Message-State: AHPjjUjC0eRAag6wq5hH1M7XHwi57+wd208kT7so3Rr/jfzmThxkbhy6 Gvpy0CL2FgU1gML8 X-Google-Smtp-Source: ADKCNb4SUvinYjuThw6lsIlrOPoA7oHmuMxrnCs32PR3QIUwl8cf2Mcqm0ehzm9NZCWFi6kv4J5HXA== X-Received: by 10.80.137.166 with SMTP id g35mr26361edg.17.1504710078676; Wed, 06 Sep 2017 08:01:18 -0700 (PDT) Received: from uHalley.cnexlabs.com (6164211-cl69.boa.fiberby.dk. [193.106.164.211]) by smtp.gmail.com with ESMTPSA id p16sm1408260eda.78.2017.09.06.08.01.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 06 Sep 2017 08:01:18 -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 5/6] lightnvm: pblk: fix write I/O sync stat Date: Wed, 6 Sep 2017 17:01:05 +0200 Message-Id: <1504710066-4699-6-git-send-email-javier@cnexlabs.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1504710066-4699-1-git-send-email-javier@cnexlabs.com> References: <1504710066-4699-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. Fixes: 0880a9aa2d91f ("lightnvm: pblk: delete redundant buffer pointer") Signed-off-by: Javier González Signed-off-by: Matias Bjørling Reviewed-by: Johannes Thumshirn --- 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 6acb4a92435f..b48d52b2ae38 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);