From: Christoph Hellwig <hch@lst.de>
To: Keith Busch <kbusch@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>,
axboe@kernel.dk, markus.bloechl@ipetronik.com,
linux-nvme@lists.infradead.org, linux-block@vger.kernel.org
Subject: Re: [PATCH 2/2] block: skip the fsync_bdev call in del_gendisk for surprise removals
Date: Wed, 16 Feb 2022 16:45:55 +0100 [thread overview]
Message-ID: <20220216154555.GA19362@lst.de> (raw)
In-Reply-To: <20220216153722.GB1936276@dhcp-10-100-145-180.wdc.com>
On Wed, Feb 16, 2022 at 07:37:22AM -0800, Keith Busch wrote:
> On Wed, Feb 16, 2022 at 04:09:01PM +0100, Christoph Hellwig wrote:
> > - fsync_bdev(disk->part0);
> > + /*
> > + * If this is not a surprise removal see if there is a file system
> > + * mounted on this device and sync it (although this won't work for
> > + * partitions). For surprise removals that have already marked the
> > + * disk dead skip this call as no I/O is possible anyway.
> > + */
> > + if (!test_bit(GD_DEAD, &disk->state))
> > + fsync_bdev(disk->part0);
> > __invalidate_device(disk->part0, true);
>
> It used to be that any dirty pages would attempt to write, and get an
> error on a surprise removal. Now that you're skipping the fsync_bdev(),
> is something else taking responsibility to error those pages?
truncate_inode_pages when closing the device.
next prev parent reply other threads:[~2022-02-16 15:46 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-16 15:09 [PATCH 1/2] block: fix surprise removal for drivers calling blk_set_queue_dying Christoph Hellwig
2022-02-16 15:09 ` [PATCH 2/2] block: skip the fsync_bdev call in del_gendisk for surprise removals Christoph Hellwig
2022-02-16 15:18 ` Hannes Reinecke
2022-02-16 15:20 ` Christoph Hellwig
2022-02-16 15:31 ` Hannes Reinecke
2022-02-16 15:32 ` Markus Blöchl
2022-02-16 17:09 ` Christoph Hellwig
2022-02-16 15:37 ` Keith Busch
2022-02-16 15:45 ` Christoph Hellwig [this message]
2022-02-16 15:32 ` [PATCH 1/2] block: fix surprise removal for drivers calling blk_set_queue_dying Hannes Reinecke
2022-02-16 15:49 ` Markus Blöchl
2022-02-16 17:09 ` Christoph Hellwig
2022-02-16 18:08 ` Markus Blöchl
2022-02-16 18:10 ` Christoph Hellwig
2022-02-16 17:31 ` kernel test robot
2022-02-16 17:31 ` kernel test robot
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=20220216154555.GA19362@lst.de \
--to=hch@lst.de \
--cc=axboe@kernel.dk \
--cc=kbusch@kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=markus.bloechl@ipetronik.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.