All of
 help / color / mirror / Atom feed
From: Christoph Hellwig <>
To: Xie Yongji <>
Subject: Re: [PATCH] nbd: clear wb_err in bd_inode on disconnect
Date: Thu, 9 Sep 2021 07:31:00 +0100	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

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.

  reply	other threads:[~2021-09-09  6:52 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 [this message]
2021-09-09 12:34   ` Yongji Xie

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:

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

  git send-email \ \ \ \ \ \ \ \ \

* 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.