All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yongji Xie <xieyongji@bytedance.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Josef Bacik <josef@toxicpanda.com>, Jens Axboe <axboe@kernel.dk>,
	linux-block@vger.kernel.org, nbd@other.debian.org,
	yixingchen@bytedance.com
Subject: Re: [PATCH] nbd: clear wb_err in bd_inode on disconnect
Date: Thu, 9 Sep 2021 20:34:12 +0800	[thread overview]
Message-ID: <CACycT3vHrN3tgeH91gdzr08DXd8KCXyAuxUb5k-HcwB7coi4iA@mail.gmail.com> (raw)
In-Reply-To: <YTmqJHd7YWAQ2lZ7@infradead.org>

On Thu, Sep 9, 2021 at 2:31 PM Christoph Hellwig <hch@infradead.org> wrote:
>
> On Tue, Sep 07, 2021 at 08:14:25PM +0800, Xie Yongji wrote:
> > When a nbd device encounters a writeback error, that error will
> > get propagated to the bd_inode's wb_err field. Then if this nbd
> > device's backend is disconnected and another is attached, we will
> > get back the previous writeback error on fsync, which is unexpected.
> > To fix it, let's clear out the wb_err on disconnect.
>
> I really do not like how internals of the implementation like into
> drivers here.  Can you add a block layer helper to clear any state
> instead? This should incude e.g. the size just cleared above and should
> also be used by the loop driver as well.

Sure, will do it.

Thanks,
Yongji

      reply	other threads:[~2021-09-09 14:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-07 12:14 [PATCH] nbd: clear wb_err in bd_inode on disconnect Xie Yongji
2021-09-09  6:31 ` Christoph Hellwig
2021-09-09 12:34   ` Yongji Xie [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=CACycT3vHrN3tgeH91gdzr08DXd8KCXyAuxUb5k-HcwB7coi4iA@mail.gmail.com \
    --to=xieyongji@bytedance.com \
    --cc=axboe@kernel.dk \
    --cc=hch@infradead.org \
    --cc=josef@toxicpanda.com \
    --cc=linux-block@vger.kernel.org \
    --cc=nbd@other.debian.org \
    --cc=yixingchen@bytedance.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.