From patchwork Wed Apr 30 19:30:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuck Lever X-Patchwork-Id: 4095791 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C01AAC0ACC for ; Wed, 30 Apr 2014 19:30:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EF377202F8 for ; Wed, 30 Apr 2014 19:30:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1983420303 for ; Wed, 30 Apr 2014 19:30:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933727AbaD3Tam (ORCPT ); Wed, 30 Apr 2014 15:30:42 -0400 Received: from mail-ig0-f175.google.com ([209.85.213.175]:34165 "EHLO mail-ig0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932186AbaD3Tal (ORCPT ); Wed, 30 Apr 2014 15:30:41 -0400 Received: by mail-ig0-f175.google.com with SMTP id h3so8059327igd.2 for ; Wed, 30 Apr 2014 12:30:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:subject:to:cc:date:message-id:in-reply-to:references :user-agent:mime-version:content-type:content-transfer-encoding; bh=+LiIjGbpUgLfkGNdBf2DQd0r6dgHthPRYngkk6xgv4I=; b=hdG9KdkFL0EPK3fNwkPRlJGa9EJzi04mbHXKoILo+9YGhUgd2SpSP9eUbRLE7OM0Zj PAj9S4nclhHS0C91UkdaeVACDXmB4Q33b07S/P6VgYb+Fwm6nI7kEzaXxA1oXn2Tqn8j bP+rrFkdqW1Eui+XiQAKtZQ2C9tzecnBffjt4M48W0oOIpTMyLl5CJs25/yPW2zk2U2u Pn9kmVjLRjV6Za0lMgqq0fBmzvft4b7lD9flfjbmpxqNBj7MukrTiKGh9oWb8miSIqRD 4FbUJKHrZzg6NG2n/4XkBTBLf+zX36Tn3aiZ7lyR207/9FzHAbzgb2QvC3noETIc/IUz jobg== X-Received: by 10.51.15.195 with SMTP id fq3mr7206303igd.5.1398886240948; Wed, 30 Apr 2014 12:30:40 -0700 (PDT) Received: from manet.1015granger.net ([2604:8800:100:81fc:82ee:73ff:fe43:d64f]) by mx.google.com with ESMTPSA id s8sm8580071ige.4.2014.04.30.12.30.40 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 30 Apr 2014 12:30:40 -0700 (PDT) From: Chuck Lever Subject: [PATCH V3 08/17] xprtrdma: mount reports "Invalid mount option" if memreg mode not supported To: linux-nfs@vger.kernel.org, linux-rdma@vger.kernel.org Cc: Anna.Schumaker@netapp.com Date: Wed, 30 Apr 2014 15:30:38 -0400 Message-ID: <20140430193038.5663.63122.stgit@manet.1015granger.net> In-Reply-To: <20140430191433.5663.16217.stgit@manet.1015granger.net> References: <20140430191433.5663.16217.stgit@manet.1015granger.net> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,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 If the selected memory registration mode is not supported by the underlying provider/HCA, the NFS mount command reports that there was an invalid mount option, and fails. This is misleading. Reporting a problem allocating memory is a lot closer to the truth. Signed-off-by: Chuck Lever --- net/sunrpc/xprtrdma/verbs.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c index a352798..7c7e9b4 100644 --- a/net/sunrpc/xprtrdma/verbs.c +++ b/net/sunrpc/xprtrdma/verbs.c @@ -513,7 +513,7 @@ rpcrdma_ia_open(struct rpcrdma_xprt *xprt, struct sockaddr *addr, int memreg) #if RPCRDMA_PERSISTENT_REGISTRATION memreg = RPCRDMA_ALLPHYSICAL; #else - rc = -EINVAL; + rc = -ENOMEM; goto out2; #endif } @@ -554,9 +554,9 @@ rpcrdma_ia_open(struct rpcrdma_xprt *xprt, struct sockaddr *addr, int memreg) } break; default: - printk(KERN_ERR "%s: invalid memory registration mode %d\n", - __func__, memreg); - rc = -EINVAL; + printk(KERN_ERR "RPC: Unsupported memory " + "registration mode: %d\n", memreg); + rc = -ENOMEM; goto out2; } dprintk("RPC: %s: memory registration strategy is %d\n",