From patchwork Thu Apr 2 15:31:10 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boaz Harrosh X-Patchwork-Id: 6149201 Return-Path: X-Original-To: patchwork-linux-nvdimm@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 73FCE9F1BE for ; Thu, 2 Apr 2015 15:31:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A6286203AC for ; Thu, 2 Apr 2015 15:31:17 +0000 (UTC) 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.kernel.org (Postfix) with ESMTPS id 5C99D203B4 for ; Thu, 2 Apr 2015 15:31:16 +0000 (UTC) Received: from ml01.vlan14.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 30A6A81380; Thu, 2 Apr 2015 08:31:16 -0700 (PDT) X-Original-To: linux-nvdimm@ml01.01.org Delivered-To: linux-nvdimm@ml01.01.org Received: from mail-wg0-f45.google.com (mail-wg0-f45.google.com [74.125.82.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 070398137F for ; Thu, 2 Apr 2015 08:31:14 -0700 (PDT) Received: by wgra20 with SMTP id a20so89037341wgr.3 for ; Thu, 02 Apr 2015 08:31:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=ulbBysJC7hij6seSs7NwPewUn1LuZDuGWR9zeeGu4Ok=; b=g61HY+jRtAAE6GjnMAvSL2CsPwWCN7c5pUq5snAH/OLDrOHX7SbFzMPONPmoQQe7Dq +DEDp8ULANdXnZxbODeJasFh2UEWT3LgCesI5n9sGyZe/CdSPXujl5iouyWLUL780bdu jKROdogM71P66A6i2HGK4pfCP/W/dvcyLq/gZqcy3PhcY6E1bsSTkV7OlNT3HNpVNGNW ekwV3ycgLTptF9fgZSTGuCLB8EDkGtkW1Jvcg679FzQTZlaWLcB7rHQKm2yuWSndxsLF rzj+4pCtgKAwRO09oNhjaoQUqV1vMRSRWjbJlHbpSGa+j444Blvu2uIkbNXF0WQJFFNL Xx0w== X-Gm-Message-State: ALoCoQn4IlMPVt65cLwH7LBMatWnsWY4TR1l4Bl6l4O4vfjgtqWJCDQS1bGoN27j0Xl5z2e7hndv X-Received: by 10.180.218.162 with SMTP id ph2mr25279653wic.22.1427988672595; Thu, 02 Apr 2015 08:31:12 -0700 (PDT) Received: from [10.0.0.5] ([207.232.55.62]) by mx.google.com with ESMTPSA id vq9sm7727697wjc.6.2015.04.02.08.31.10 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Apr 2015 08:31:11 -0700 (PDT) Message-ID: <551D60BE.1070101@plexistor.com> Date: Thu, 02 Apr 2015 18:31:10 +0300 From: Boaz Harrosh User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Christoph Hellwig , linux-nvdimm@ml01.01.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, x86@kernel.org, axboe@kernel.dk References: <1427872339-6688-1-git-send-email-hch@lst.de> In-Reply-To: <1427872339-6688-1-git-send-email-hch@lst.de> Subject: [Linux-nvdimm] [PATCH] pmem: Add prints at module load and unload X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 Hi Christoph, Ingo Please consider this small patch below just a small print at module load/unload so to know at user systems how things progressed. As it is now, we know nothing. For any other disk kind we have two tuns of prints. --- From: Boaz Harrosh Date: Thu, 2 Apr 2015 16:43:48 +0300 Subject: [PATCH] pmem: Add prints at module load and unload When debugging people's systems it is helpful to see what went on. The load and unload of pmem is an important event. The importance is the number of loaded devices and error status. The exact device's addresses created we can see from the other prints at e820 so no need to duplicate this information. While at it fix up a small issue with rw flags. Signed-off-by: Boaz Harrosh --- drivers/block/pmem.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/block/pmem.c b/drivers/block/pmem.c index 988f384..3f15fbc 100644 --- a/drivers/block/pmem.c +++ b/drivers/block/pmem.c @@ -91,8 +91,9 @@ static int pmem_rw_page(struct block_device *bdev, sector_t sector, { struct pmem_device *pmem = bdev->bd_disk->private_data; + rw &= WRITE; pmem_do_bvec(pmem, page, PAGE_CACHE_SIZE, 0, rw, sector); - page_endio(page, rw & WRITE, 0); + page_endio(page, rw, 0); return 0; } @@ -248,6 +249,9 @@ static int __init pmem_init(void) error = platform_driver_register(&pmem_driver); if (error) unregister_blkdev(pmem_major, "pmem"); + + pr_info("pmem: init %d devices => %d\n", + atomic_read(&pmem_index), error); return error; } module_init(pmem_init); @@ -256,6 +260,7 @@ static void pmem_exit(void) { platform_driver_unregister(&pmem_driver); unregister_blkdev(pmem_major, "pmem"); + pr_info("pmem: exit\n"); } module_exit(pmem_exit);