From patchwork Thu Aug 7 07:23:41 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 4689711 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id BA1069F375 for ; Thu, 7 Aug 2014 07:21:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 817D9201CE for ; Thu, 7 Aug 2014 07:21:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AC0D0201D5 for ; Thu, 7 Aug 2014 07:21:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754265AbaHGHVj (ORCPT ); Thu, 7 Aug 2014 03:21:39 -0400 Received: from casper.infradead.org ([85.118.1.10]:45777 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754037AbaHGHVi (ORCPT ); Thu, 7 Aug 2014 03:21:38 -0400 Received: from [83.175.99.196] (helo=localhost) by casper.infradead.org with esmtpsa (Exim 4.80.1 #2 (Red Hat Linux)) id 1XFI13-0006sC-9B; Thu, 07 Aug 2014 07:21:37 +0000 From: Christoph Hellwig To: Trond Myklebust Cc: linux-nfs@vger.kernel.org Subject: [PATCH 09/17] pnfs/blocklayout: improve GETDEVICEINFO error reporting Date: Thu, 7 Aug 2014 09:23:41 +0200 Message-Id: <1407396229-4785-10-git-send-email-hch@lst.de> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1407396229-4785-1-git-send-email-hch@lst.de> References: <1407396229-4785-1-git-send-email-hch@lst.de> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org See http://www.infradead.org/rpr.html Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- fs/nfs/blocklayout/blocklayoutdev.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/nfs/blocklayout/blocklayoutdev.c b/fs/nfs/blocklayout/blocklayoutdev.c index 04303b5..63f77925 100644 --- a/fs/nfs/blocklayout/blocklayoutdev.c +++ b/fs/nfs/blocklayout/blocklayoutdev.c @@ -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; @@ -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;