Skip to contentSkip to conversation

NFS/blocklayout: print each device used for SCSI layouts

PATCH New Christoph Hellwig 1 participant 1 message Mar 23

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 NFS/blocklayout: print each device used for SCSI layouts

We already print device uses for block layouts, do the same for SCSI layouts as that greatly helps understanding the operation of the client.

---
 fs/nfs/blocklayout/dev.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
fs/nfs/blocklayout/dev.c +5 -2
index cc6327d97a91..bb35f88501ce 100644
@@ -370,11 +370,14 @@ bl_open_path(struct pnfs_block_volume *v, const char *prefix)
 	if (!devname)
 		return ERR_PTR(-ENOMEM);
 
-	bdev_file = bdev_file_open_by_path(devname, BLK_OPEN_READ | BLK_OPEN_WRITE,
-					NULL, NULL);
+	bdev_file = bdev_file_open_by_path(devname,
+			BLK_OPEN_READ | BLK_OPEN_WRITE, NULL, NULL);
 	if (IS_ERR(bdev_file)) {
 		dprintk("failed to open device %s (%ld)\n",
 			devname, PTR_ERR(bdev_file));
+	} else {
+		pr_info("pNFS: using block device %s\n",
+			file_bdev(bdev_file)->bd_disk->disk_name);
 	}
 
 	kfree(devname);
Signature · 1 line
2.47.3