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: 6149401 Return-Path: X-Original-To: patchwork-linux-fsdevel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C267CBF4A6 for ; Thu, 2 Apr 2015 15:31:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F06D5203AC for ; Thu, 2 Apr 2015 15:31:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 24DE4203C4 for ; Thu, 2 Apr 2015 15:31:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753107AbbDBPbP (ORCPT ); Thu, 2 Apr 2015 11:31:15 -0400 Received: from mail-wg0-f54.google.com ([74.125.82.54]:34362 "EHLO mail-wg0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752883AbbDBPbN (ORCPT ); Thu, 2 Apr 2015 11:31:13 -0400 Received: by wgbdm7 with SMTP id dm7so89216033wgb.1 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=fGyRTUjBZjnyIDTxM9x+vFLDEVKy6FtRO5+bOOHuObBsHl82H3C2IfW+Q/oCbW+mME 3L+jlE7HopJdzS4Kxq6dWJkGRqsCrJpTxU4D5rLKGByeRsHjoa5ItG7YH0PAwGDqwfzD NqzBFvjqmQu0W0GjZ1ty6WBu4tac6kjMPtzDlfQc1Il7+MaD5IUgcVtyKl9lTo+yt2o9 e6dIDK76aGyU48Qs/FEG5QL0gGNNrw+Q0kxnCK3OCuelZqLOzJUS2a/Ow2SdKWFEMct1 n5EuCqcApGcX6KgKkSgeEfhZnTwt82kFljZ/LknHYsWO4JCp9DC1RdehslNvYN5ddyQt UQwA== X-Gm-Message-State: ALoCoQnmDZTEwDgyBXrjaf0Ot0OqbmZaudXff74Tma41TRtgM8L4hCbY7ljYkunFcUISIpMu8kSw 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 CC: ross.zwisler@linux.intel.com Subject: [PATCH] pmem: Add prints at module load and unload References: <1427872339-6688-1-git-send-email-hch@lst.de> In-Reply-To: <1427872339-6688-1-git-send-email-hch@lst.de> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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);