]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
NFS/blocklayout: print each device used for SCSI layouts
authorChristoph Hellwig <hch@lst.de>
Mon, 23 Mar 2026 07:03:06 +0000 (08:03 +0100)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Mon, 13 Apr 2026 21:00:22 +0000 (14:00 -0700)
We already print device uses for block layouts, do the same for SCSI
layouts as that greatly helps understanding the operation of the client.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/blocklayout/dev.c

index cc6327d97a91acd8eb4bc10bf6915b056e6dfc35..bb35f88501cea5e042e3225a98589d0f579197ed 100644 (file)
@@ -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);