All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Xie Yongji <xieyongji@bytedance.com>
Cc: axboe@kernel.dk, josef@toxicpanda.com, hch@infradead.org,
	linux-block@vger.kernel.org, nbd@other.debian.org,
	yixingchen@bytedance.com
Subject: Re: [PATCH v2 4/4] nbd: Use invalidate_disk() helper on disconnect
Date: Wed, 22 Sep 2021 15:47:24 +0100	[thread overview]
Message-ID: <YUtB/NtF8BJ7afwj@infradead.org> (raw)
In-Reply-To: <20210922123711.187-5-xieyongji@bytedance.com>

On Wed, Sep 22, 2021 at 08:37:11PM +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 use invalidate_disk() helper to invalidate the
> disk on disconnect instead of just setting disk's capacity to zero.

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>

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

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-22 12:37 [PATCH v2 0/4] Add invalidate_disk() helper for drivers to invalidate the gendisk Xie Yongji
2021-09-22 12:37 ` [PATCH v2 1/4] block: Add invalidate_disk() helper " Xie Yongji
2021-09-22 14:41   ` Christoph Hellwig
2021-09-22 12:37 ` [PATCH v2 2/4] loop: Use invalidate_disk() helper to invalidate gendisk Xie Yongji
2021-09-22 12:37 ` [PATCH v2 3/4] loop: Remove the unnecessary bdev checks and unused bdev variable Xie Yongji
2021-09-22 14:43   ` Christoph Hellwig
2021-09-22 12:37 ` [PATCH v2 4/4] nbd: Use invalidate_disk() helper on disconnect Xie Yongji
2021-09-22 14:47   ` Christoph Hellwig [this message]
2021-10-21  3:41 ` [PATCH v2 0/4] Add invalidate_disk() helper for drivers to invalidate the gendisk Yongji Xie
2021-10-21 16:12 ` Jens Axboe

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=YUtB/NtF8BJ7afwj@infradead.org \
    --to=hch@infradead.org \
    --cc=axboe@kernel.dk \
    --cc=josef@toxicpanda.com \
    --cc=linux-block@vger.kernel.org \
    --cc=nbd@other.debian.org \
    --cc=xieyongji@bytedance.com \
    --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.