[PATCH] pmem: Add prints at module load and unload

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <boaz@xxxxxxxxxxxxx>
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 <boaz@xxxxxxxxxxxxx>
---
 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);
 
-- 
1.9.3


--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux