From patchwork Tue Apr 7 15:47:58 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boaz Harrosh X-Patchwork-Id: 6173041 Return-Path: X-Original-To: patchwork-linux-fsdevel@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 7CC4A9F2EC for ; Tue, 7 Apr 2015 15:48:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AA260203AC for ; Tue, 7 Apr 2015 15:48:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CCA39203A5 for ; Tue, 7 Apr 2015 15:48:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753404AbbDGPsD (ORCPT ); Tue, 7 Apr 2015 11:48:03 -0400 Received: from mail-wg0-f50.google.com ([74.125.82.50]:36599 "EHLO mail-wg0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753414AbbDGPsC (ORCPT ); Tue, 7 Apr 2015 11:48:02 -0400 Received: by wgsk9 with SMTP id k9so38015060wgs.3 for ; Tue, 07 Apr 2015 08:48:00 -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=0rVAUXgQWiIl5TMtSohUVTodBq2AniqynCLbFMpjozw=; b=SNX1ITp9Sc9aohf4+WS7dL7Gijo8IE+W5gnahIZQKvi+tlzwzbqUTJ6fRBAJXDp/e4 bKwwWDM3nwPHSIRFt6gbU7C480PThIHzLt9LdHWybFuM9/dy4Pg8JjxTgSzE0R2pdlib 4PqFxtNrp9cn1VeWDJWGulVqX7YvJPO5si7kh85xF1Cwlxb3CYQ28AalTfFcmpIJV+ng ueYyUCRMTPPJDX9SJd+zdG4ha/rGwFqQAgjMJ+slKWOks+C+1eTYv6wgjNsKkDGf202S 7z+6WC1J0xTCpG/EBfgKqwRIFDs0LokYSzFh11vhnwxYijg/ALN2y1hxWlCQhavilGwQ GUCA== X-Gm-Message-State: ALoCoQl4Xg3+vWg9NzjmuF5inxVOnPmzzWC34l3nG/lDJQMQw+N9z5A2qEZeBNLwyUUkWXPtNsDc X-Received: by 10.194.108.9 with SMTP id hg9mr41897501wjb.68.1428421680704; Tue, 07 Apr 2015 08:48:00 -0700 (PDT) Received: from [10.0.0.5] ([207.232.55.62]) by mx.google.com with ESMTPSA id gt4sm11523489wib.21.2015.04.07.08.47.59 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Apr 2015 08:47:59 -0700 (PDT) Message-ID: <5523FC2E.1020809@plexistor.com> Date: Tue, 07 Apr 2015 18:47:58 +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 1B] pmem: Add prints at module load and unload References: <1427872339-6688-1-git-send-email-hch@lst.de> <5523FBC7.80301@plexistor.com> In-Reply-To: <5523FBC7.80301@plexistor.com> 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=ham 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 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. After this patch the important info at dmesg will be: Printed by the e820 code on load: [ +0.000000] user: [mem 0x0000000100000000-0x000000015fffffff] persistent (type 12) [ +0.000000] user: [mem 0x0000000160000000-0x00000001dfffffff] persistent (type 12) ... Printed by pmem modprobe: [ +0.000537] pmem: init 2 devices => 0 ... Printed by pmem modprobe -r: [ +0.000537] pmem: exit Signed-off-by: Boaz Harrosh --- drivers/block/pmem.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/block/pmem.c b/drivers/block/pmem.c index 988f384..44d3f33 100644 --- a/drivers/block/pmem.c +++ b/drivers/block/pmem.c @@ -248,6 +248,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 +259,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);