[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5523FC2E.1020809@plexistor.com>
Date: Tue, 07 Apr 2015 18:47:58 +0300
From: Boaz Harrosh <boaz@...xistor.com>
To: Christoph Hellwig <hch@....de>, linux-nvdimm@...1.01.org,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
x86@...nel.org, axboe@...nel.dk
CC: ross.zwisler@...ux.intel.com
Subject: [PATCH 1B] 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.
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 <boaz@...xistor.com>
---
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);
--
1.9.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists