Skip to content

Commit

Permalink
pnfs/blocklayout: improve GETDEVICEINFO error reporting
Browse files Browse the repository at this point in the history
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: Christoph Hellwig <hch@lst.de>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
  • Loading branch information
Christoph Hellwig authored and Trond Myklebust committed Sep 10, 2014
1 parent e3aaf7f commit 72c5e59
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fs/nfs/blocklayout/blocklayoutdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ nfs4_blk_decode_device(struct nfs_server *server,
remove_wait_queue(&nn->bl_wq, &wq);

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);
rv = ERR_PTR(-EINVAL);
goto out;
Expand All @@ -159,7 +159,8 @@ nfs4_blk_decode_device(struct nfs_server *server,
bd = blkdev_get_by_dev(MKDEV(reply->major, reply->minor),
FMODE_READ, NULL);
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));
rv = ERR_CAST(bd);
goto out;
Expand Down

0 comments on commit 72c5e59

Please sign in to comment.