LKML Archive mirror
 help / color / mirror / Atom feed
From: Markus Pargmann <mpa@pengutronix.de>
To: Dan Streetman <dan.streetman@canonical.com>
Cc: Jens Axboe <axboe@fb.com>,
	nbd-general@lists.sourceforge.net, linux-kernel@vger.kernel.org,
	Dan Streetman <ddstreet@ieee.org>
Subject: Re: [PATCH] nbd: ratelimit error msgs after socket close
Date: Fri, 05 Feb 2016 08:59:50 +0100	[thread overview]
Message-ID: <2208458.aFMEtyXXuv@adelgunde> (raw)
In-Reply-To: <CAOZ2QJMqBH36-+2RYS+XkqP3VrLzd1w57wAAC5SLu533H9aS-g@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2290 bytes --]

Hi Dan,

On Tuesday, February 02, 2016 12:07:04 PM Dan Streetman wrote:
> Hi Markus,
> 
> just checking if you had any comments on this patch?
> 
> On Thu, Jan 14, 2016 at 1:42 PM, Dan Streetman
> <dan.streetman@canonical.com> wrote:
> > Make the "Attempted send on closed socket" error messages generated in
> > nbd_request_handler() ratelimited.
> >
> > When the nbd socket is shutdown, the nbd_request_handler() function emits
> > an error message for every request remaining in its queue.  If the queue
> > is large, this will spam a large amount of messages to the log.  There's
> > no need for a separate error message for each request, so this patch
> > ratelimits it.
> >
> > In the specific case this was found, the system was virtual and the error
> > messages were logged to the serial port, which overwhelmed it.
> >
> > Fixes: 4d48a542b427 ("nbd: fix I/O hang on disconnected nbds")
> > Signed-off-by: Dan Streetman <dan.streetman@canonical.com>

Sorry for the delay. I applied the patch.

Thanks,

Markus

> > ---
> >  drivers/block/nbd.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
> > index e4c5cc1..c65d41f 100644
> > --- a/drivers/block/nbd.c
> > +++ b/drivers/block/nbd.c
> > @@ -618,8 +618,8 @@ static void nbd_request_handler(struct request_queue *q)
> >                         req, req->cmd_type);
> >
> >                 if (unlikely(!nbd->sock)) {
> > -                       dev_err(disk_to_dev(nbd->disk),
> > -                               "Attempted send on closed socket\n");
> > +                       dev_err_ratelimited(disk_to_dev(nbd->disk),
> > +                                           "Attempted send on closed socket\n");
> >                         req->errors++;
> >                         nbd_end_request(nbd, req);
> >                         spin_lock_irq(q->queue_lock);
> > --
> > 2.5.0
> >
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

      reply	other threads:[~2016-02-05  8:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-14 18:42 [PATCH] nbd: ratelimit error msgs after socket close Dan Streetman
2016-02-02 17:07 ` Dan Streetman
2016-02-05  7:59   ` Markus Pargmann [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2208458.aFMEtyXXuv@adelgunde \
    --to=mpa@pengutronix.de \
    --cc=axboe@fb.com \
    --cc=dan.streetman@canonical.com \
    --cc=ddstreet@ieee.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nbd-general@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).