From patchwork Thu Jan 31 02:29:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huaisheng Ye X-Patchwork-Id: 10789559 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 577F2139A for ; Thu, 31 Jan 2019 02:33:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5404830892 for ; Thu, 31 Jan 2019 02:33:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 46D7430894; Thu, 31 Jan 2019 02:33:06 +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=-2.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EC47930892 for ; Thu, 31 Jan 2019 02:33:05 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id D533D211C2834; Wed, 30 Jan 2019 18:33:05 -0800 (PST) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=135.84.80.237; helo=sender-pp-092.zoho.com; envelope-from=yehs2007@zoho.com; receiver=linux-nvdimm@lists.01.org Received: from sender-pp-092.zoho.com (sender-pp-092.zoho.com [135.84.80.237]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 470B3211B5A4C for ; Wed, 30 Jan 2019 18:33:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548901892; cv=none; d=zoho.com; s=zohoarc; b=LDgy6MugAyxvHx80sLMn2iTsvyO7FIJPvN6b5Uxl+C5vSxKbCELW4c9ymRR7+rFPowiDD8KEpFjHwEvjoudnNvu5tuwPBDp/HcKmL9TizoHmWrRM1QPwx1ux2Gx/AkMoSt5gYhZS05AzW8A48sMyhShvzvzSMA+k8Rf3F7CNGfE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1548901892; h=Cc:Date:From:In-Reply-To:Message-ID:References:Subject:To:ARC-Authentication-Results; bh=DeSXpkuBaRP5FZTknldkbxhMQMJx9Q4qwy3wT5Ssm1k=; b=Rfl3TdNzlrd8lngOI4Fk0VHGqWEAvfmDdyp5KH/r/xB12cy5v3mmedKgk5ROKR+qItRD9P3RHdUGpHSemFvU7XyOn/yp0KQC4BZwxdc4U+3snepVgUfa4Sek1OLHUWirmowRJp2exAkjp6dAQCdMEDBYwHCm7LSlmZONmUON4XU= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass header.i=zoho.com; spf=pass smtp.mailfrom=yehs2007@zoho.com; dmarc=pass header.from= header.from= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=zapps768; d=zoho.com; h=from:to:cc:subject:date:message-id:in-reply-to:references; b=WpEjR8C+TDFyTr6GwT4b6SnH3DxM6SJLnrxkYjPnL1UuMBeF2Hkr0s7isUQ7mxJXrH0BALBEueHW POE53UgKTMdTRic2yHNPIjSJfj3DC+0HrYolLpwpCtTlDrdoq+tl DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1548901892; s=default; d=zoho.com; i=yehs2007@zoho.com; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; l=1009; bh=DeSXpkuBaRP5FZTknldkbxhMQMJx9Q4qwy3wT5Ssm1k=; b=dKClg84rZYnrzufN1FKEICy7VAZdgifPw/2VyDfO1CzslIVF0QaFnjcuy8c6U4Xv C3GSJFOWvfVYuTGZSNz+Dy0jVLKheYUFiNlPqWh4CUgLSSEX+psG3AQwFmzKQqcdTtE elawTJegklis7p3BQPSX3OrGeqJJbbwUnYqJm9A8= Received: from YEHS1XR956R00D1.lenovo.com (106.38.1.115 [106.38.1.115]) by mx.zohomail.com with SMTPS id 1548901890474272.2511908503543; Wed, 30 Jan 2019 18:31:30 -0800 (PST) From: Huaisheng Ye To: mpatocka@redhat.com, snitzer@redhat.com, agk@redhat.com Subject: [PATCH v3 5/5] dm-writecache: output seq_count within status Date: Thu, 31 Jan 2019 10:29:55 +0800 Message-Id: <20190131022955.9920-6-yehs2007@zoho.com> X-Mailer: git-send-email 2.17.0.windows.1 In-Reply-To: <20190131022955.9920-1-yehs2007@zoho.com> References: <20190131022955.9920-1-yehs2007@zoho.com> X-ZohoMailClient: External X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: jack@suse.cz, corbet@lwn.net, linux-nvdimm@lists.01.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, dm-devel@redhat.com, hch@lst.de MIME-Version: 1.0 Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Virus-Scanned: ClamAV using ClamSMTP From: Huaisheng Ye seq_count is important for flush operations, output it within status for debugging and analyzing code behavior. Signed-off-by: Huaisheng Ye --- drivers/md/dm-writecache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/md/dm-writecache.c b/drivers/md/dm-writecache.c index 2c1e825..3396710 100644 --- a/drivers/md/dm-writecache.c +++ b/drivers/md/dm-writecache.c @@ -2231,9 +2231,9 @@ static void writecache_status(struct dm_target *ti, status_type_t type, switch (type) { case STATUSTYPE_INFO: - DMEMIT("%ld %llu %llu %llu", writecache_has_error(wc), + DMEMIT("%ld %llu %llu %llu %llu", writecache_has_error(wc), (unsigned long long)wc->n_blocks, (unsigned long long)wc->freelist_size, - (unsigned long long)wc->writeback_size); + (unsigned long long)wc->writeback_size, wc->seq_count); break; case STATUSTYPE_TABLE: DMEMIT("%c %s %s %u ", WC_MODE_PMEM(wc) ? 'p' : 's',