Linux-NFS Archive on lore.kernel.org
 help / Atom feed
* [PATCH 1 0/2] Two small clean-ups for v5.1
@ 2019-02-06 17:00 Chuck Lever
  2019-02-06 17:00 ` [PATCH 1 1/2] svcrdma: Squelch compiler warning when SUNRPC_DEBUG is disabled Chuck Lever
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Chuck Lever @ 2019-02-06 17:00 UTC (permalink / raw)
  To: bfields; +Cc: linux-rdma, linux-nfs

Hi Bruce-

Please consider these two commits for the v5.1 merge window.

---

Chuck Lever (2):
      svcrdma: Squelch compiler warning when SUNRPC_DEBUG is disabled
      svcrdma: Remove syslog warnings in work completion handlers


 net/sunrpc/xprtrdma/svc_rdma_recvfrom.c  |    9 +--------
 net/sunrpc/xprtrdma/svc_rdma_rw.c        |   11 +----------
 net/sunrpc/xprtrdma/svc_rdma_sendto.c    |    4 ----
 net/sunrpc/xprtrdma/svc_rdma_transport.c |    9 +++------
 4 files changed, 5 insertions(+), 28 deletions(-)

--
Chuck Lever

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1 1/2] svcrdma: Squelch compiler warning when SUNRPC_DEBUG is disabled
  2019-02-06 17:00 [PATCH 1 0/2] Two small clean-ups for v5.1 Chuck Lever
@ 2019-02-06 17:00 ` Chuck Lever
  2019-02-06 17:00 ` [PATCH 1 2/2] svcrdma: Remove syslog warnings in work completion handlers Chuck Lever
  2019-02-06 20:06 ` [PATCH 1 0/2] Two small clean-ups for v5.1 J. Bruce Fields
  2 siblings, 0 replies; 4+ messages in thread
From: Chuck Lever @ 2019-02-06 17:00 UTC (permalink / raw)
  To: bfields; +Cc: linux-rdma, linux-nfs

  CC [M]  net/sunrpc/xprtrdma/svc_rdma_transport.o
linux/net/sunrpc/xprtrdma/svc_rdma_transport.c: In function ‘svc_rdma_accept’:
linux/net/sunrpc/xprtrdma/svc_rdma_transport.c:452:19: warning: variable ‘sap’ set but not used [-Wunused-but-set-variable]
  struct sockaddr *sap;
                   ^

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 net/sunrpc/xprtrdma/svc_rdma_transport.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c
index 924c17d..4cbb37d 100644
--- a/net/sunrpc/xprtrdma/svc_rdma_transport.c
+++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c
@@ -390,8 +390,8 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt)
 	struct ib_qp_init_attr qp_attr;
 	unsigned int ctxts, rq_depth;
 	struct ib_device *dev;
-	struct sockaddr *sap;
 	int ret = 0;
+	RPC_IFDEBUG(struct sockaddr *sap);
 
 	listen_rdma = container_of(xprt, struct svcxprt_rdma, sc_xprt);
 	clear_bit(XPT_CONN, &xprt->xpt_flags);
@@ -528,6 +528,7 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt)
 	if (ret)
 		goto errout;
 
+#if IS_ENABLED(CONFIG_SUNRPC_DEBUG)
 	dprintk("svcrdma: new connection %p accepted:\n", newxprt);
 	sap = (struct sockaddr *)&newxprt->sc_cm_id->route.addr.src_addr;
 	dprintk("    local address   : %pIS:%u\n", sap, rpc_get_port(sap));
@@ -538,6 +539,7 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt)
 	dprintk("    rdma_rw_ctxs    : %d\n", ctxts);
 	dprintk("    max_requests    : %d\n", newxprt->sc_max_requests);
 	dprintk("    ord             : %d\n", conn_param.initiator_depth);
+#endif
 
 	trace_svcrdma_xprt_accept(&newxprt->sc_xprt);
 	return &newxprt->sc_xprt;


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1 2/2] svcrdma: Remove syslog warnings in work completion handlers
  2019-02-06 17:00 [PATCH 1 0/2] Two small clean-ups for v5.1 Chuck Lever
  2019-02-06 17:00 ` [PATCH 1 1/2] svcrdma: Squelch compiler warning when SUNRPC_DEBUG is disabled Chuck Lever
@ 2019-02-06 17:00 ` Chuck Lever
  2019-02-06 20:06 ` [PATCH 1 0/2] Two small clean-ups for v5.1 J. Bruce Fields
  2 siblings, 0 replies; 4+ messages in thread
From: Chuck Lever @ 2019-02-06 17:00 UTC (permalink / raw)
  To: bfields; +Cc: linux-rdma, linux-nfs

These can result in a lot of log noise, and are able to be triggered
by client misbehavior. Since there are trace points in these
handlers now, there's no need to spam the log.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 net/sunrpc/xprtrdma/svc_rdma_recvfrom.c  |    9 +--------
 net/sunrpc/xprtrdma/svc_rdma_rw.c        |   11 +----------
 net/sunrpc/xprtrdma/svc_rdma_sendto.c    |    4 ----
 net/sunrpc/xprtrdma/svc_rdma_transport.c |    5 -----
 4 files changed, 2 insertions(+), 27 deletions(-)

diff --git a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
index 3ebb158..65e2fb9 100644
--- a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
+++ b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
@@ -272,11 +272,8 @@ bool svc_rdma_post_recvs(struct svcxprt_rdma *rdma)
 			return false;
 		ctxt->rc_temp = true;
 		ret = __svc_rdma_post_recv(rdma, ctxt);
-		if (ret) {
-			pr_err("svcrdma: failure posting recv buffers: %d\n",
-			       ret);
+		if (ret)
 			return false;
-		}
 	}
 	return true;
 }
@@ -322,10 +319,6 @@ static void svc_rdma_wc_receive(struct ib_cq *cq, struct ib_wc *wc)
 	goto out;
 
 flushed:
-	if (wc->status != IB_WC_WR_FLUSH_ERR)
-		pr_err("svcrdma: Recv: %s (%u/0x%x)\n",
-		       ib_wc_status_msg(wc->status),
-		       wc->status, wc->vendor_err);
 post_err:
 	svc_rdma_recv_ctxt_put(rdma, ctxt);
 	set_bit(XPT_CLOSE, &rdma->sc_xprt.xpt_flags);
diff --git a/net/sunrpc/xprtrdma/svc_rdma_rw.c b/net/sunrpc/xprtrdma/svc_rdma_rw.c
index c357536..4696da0 100644
--- a/net/sunrpc/xprtrdma/svc_rdma_rw.c
+++ b/net/sunrpc/xprtrdma/svc_rdma_rw.c
@@ -213,13 +213,8 @@ static void svc_rdma_write_done(struct ib_cq *cq, struct ib_wc *wc)
 	atomic_add(cc->cc_sqecount, &rdma->sc_sq_avail);
 	wake_up(&rdma->sc_send_wait);
 
-	if (unlikely(wc->status != IB_WC_SUCCESS)) {
+	if (unlikely(wc->status != IB_WC_SUCCESS))
 		set_bit(XPT_CLOSE, &rdma->sc_xprt.xpt_flags);
-		if (wc->status != IB_WC_WR_FLUSH_ERR)
-			pr_err("svcrdma: write ctx: %s (%u/0x%x)\n",
-			       ib_wc_status_msg(wc->status),
-			       wc->status, wc->vendor_err);
-	}
 
 	svc_rdma_write_info_free(info);
 }
@@ -278,10 +273,6 @@ static void svc_rdma_wc_read_done(struct ib_cq *cq, struct ib_wc *wc)
 
 	if (unlikely(wc->status != IB_WC_SUCCESS)) {
 		set_bit(XPT_CLOSE, &rdma->sc_xprt.xpt_flags);
-		if (wc->status != IB_WC_WR_FLUSH_ERR)
-			pr_err("svcrdma: read ctx: %s (%u/0x%x)\n",
-			       ib_wc_status_msg(wc->status),
-			       wc->status, wc->vendor_err);
 		svc_rdma_recv_ctxt_put(rdma, info->ri_readctxt);
 	} else {
 		spin_lock(&rdma->sc_rq_dto_lock);
diff --git a/net/sunrpc/xprtrdma/svc_rdma_sendto.c b/net/sunrpc/xprtrdma/svc_rdma_sendto.c
index cf51b8f..6fb2dd8 100644
--- a/net/sunrpc/xprtrdma/svc_rdma_sendto.c
+++ b/net/sunrpc/xprtrdma/svc_rdma_sendto.c
@@ -272,10 +272,6 @@ static void svc_rdma_wc_send(struct ib_cq *cq, struct ib_wc *wc)
 	if (unlikely(wc->status != IB_WC_SUCCESS)) {
 		set_bit(XPT_CLOSE, &rdma->sc_xprt.xpt_flags);
 		svc_xprt_enqueue(&rdma->sc_xprt);
-		if (wc->status != IB_WC_WR_FLUSH_ERR)
-			pr_err("svcrdma: Send: %s (%u/0x%x)\n",
-			       ib_wc_status_msg(wc->status),
-			       wc->status, wc->vendor_err);
 	}
 
 	svc_xprt_put(&rdma->sc_xprt);
diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c
index 4cbb37d..6f9f465 100644
--- a/net/sunrpc/xprtrdma/svc_rdma_transport.c
+++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c
@@ -593,11 +593,6 @@ static void __svc_rdma_free(struct work_struct *work)
 	if (rdma->sc_qp && !IS_ERR(rdma->sc_qp))
 		ib_drain_qp(rdma->sc_qp);
 
-	/* We should only be called from kref_put */
-	if (kref_read(&xprt->xpt_ref) != 0)
-		pr_err("svcrdma: sc_xprt still in use? (%d)\n",
-		       kref_read(&xprt->xpt_ref));
-
 	svc_rdma_flush_recv_queues(rdma);
 
 	/* Final put of backchannel client transport */


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1 0/2] Two small clean-ups for v5.1
  2019-02-06 17:00 [PATCH 1 0/2] Two small clean-ups for v5.1 Chuck Lever
  2019-02-06 17:00 ` [PATCH 1 1/2] svcrdma: Squelch compiler warning when SUNRPC_DEBUG is disabled Chuck Lever
  2019-02-06 17:00 ` [PATCH 1 2/2] svcrdma: Remove syslog warnings in work completion handlers Chuck Lever
@ 2019-02-06 20:06 ` J. Bruce Fields
  2 siblings, 0 replies; 4+ messages in thread
From: J. Bruce Fields @ 2019-02-06 20:06 UTC (permalink / raw)
  To: Chuck Lever; +Cc: linux-rdma, linux-nfs

On Wed, Feb 06, 2019 at 12:00:46PM -0500, Chuck Lever wrote:
> Hi Bruce-
> 
> Please consider these two commits for the v5.1 merge window.

Thanks, applying.--b.

> 
> ---
> 
> Chuck Lever (2):
>       svcrdma: Squelch compiler warning when SUNRPC_DEBUG is disabled
>       svcrdma: Remove syslog warnings in work completion handlers
> 
> 
>  net/sunrpc/xprtrdma/svc_rdma_recvfrom.c  |    9 +--------
>  net/sunrpc/xprtrdma/svc_rdma_rw.c        |   11 +----------
>  net/sunrpc/xprtrdma/svc_rdma_sendto.c    |    4 ----
>  net/sunrpc/xprtrdma/svc_rdma_transport.c |    9 +++------
>  4 files changed, 5 insertions(+), 28 deletions(-)
> 
> --
> Chuck Lever

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-06 17:00 [PATCH 1 0/2] Two small clean-ups for v5.1 Chuck Lever
2019-02-06 17:00 ` [PATCH 1 1/2] svcrdma: Squelch compiler warning when SUNRPC_DEBUG is disabled Chuck Lever
2019-02-06 17:00 ` [PATCH 1 2/2] svcrdma: Remove syslog warnings in work completion handlers Chuck Lever
2019-02-06 20:06 ` [PATCH 1 0/2] Two small clean-ups for v5.1 J. Bruce Fields

Linux-NFS Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-nfs/0 linux-nfs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-nfs linux-nfs/ https://lore.kernel.org/linux-nfs \
		linux-nfs@vger.kernel.org linux-nfs@archiver.kernel.org
	public-inbox-index linux-nfs


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-nfs


AGPL code for this site: git clone https://public-inbox.org/ public-inbox