Commit 72c5e59f authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Trond Myklebust

pnfs/blocklayout: improve GETDEVICEINFO error reporting

Tell userspace what stage of GETDEVICEINFO failed so that there is a chance
to debug it, especially with the userspace daemon clusterf***k in the block
layout driver.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
parent e3aaf7f2
...@@ -150,7 +150,7 @@ nfs4_blk_decode_device(struct nfs_server *server, ...@@ -150,7 +150,7 @@ nfs4_blk_decode_device(struct nfs_server *server,
remove_wait_queue(&nn->bl_wq, &wq); remove_wait_queue(&nn->bl_wq, &wq);
if (reply->status != BL_DEVICE_REQUEST_PROC) { if (reply->status != BL_DEVICE_REQUEST_PROC) {
dprintk("%s failed to open device: %d\n", printk(KERN_WARNING "%s failed to decode device: %d\n",
__func__, reply->status); __func__, reply->status);
rv = ERR_PTR(-EINVAL); rv = ERR_PTR(-EINVAL);
goto out; goto out;
...@@ -159,7 +159,8 @@ nfs4_blk_decode_device(struct nfs_server *server, ...@@ -159,7 +159,8 @@ nfs4_blk_decode_device(struct nfs_server *server,
bd = blkdev_get_by_dev(MKDEV(reply->major, reply->minor), bd = blkdev_get_by_dev(MKDEV(reply->major, reply->minor),
FMODE_READ, NULL); FMODE_READ, NULL);
if (IS_ERR(bd)) { if (IS_ERR(bd)) {
dprintk("%s failed to open device : %ld\n", __func__, printk(KERN_WARNING "%s failed to open device %d:%d (%ld)\n",
__func__, reply->major, reply->minor,
PTR_ERR(bd)); PTR_ERR(bd));
rv = ERR_CAST(bd); rv = ERR_CAST(bd);
goto out; goto out;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment