Re: [PATCH 6/9] block: add a mark_dead holder operation

Christian Brauner
2023-05-16T16:17:42Z

On Tue, May 09, 2023 at 03:32:09PM +0200, Christoph Hellwig wrote:
> On Sun, May 07, 2023 at 09:19:46PM +0200, Jan Kara wrote:
> > > @@ -602,6 +624,8 @@ void blk_mark_disk_dead(struct gendisk *disk)
> > > * Prevent new I/O from crossing bio_queue_enter().
> > > */
> > > blk_queue_start_drain(disk->queue);
> > > +
> > > + blk_report_disk_dead(disk);
> >
> > Hum, but this gets called from del_gendisk() after blk_drop_partitions()
> > happens. So how is this going to be able to iterate anything?
>
> It isn't, and doesn't work for partitions right now. I guess del_gendisk
> needs a bit of refacoring that we do two pases over the inode and/or
> move the ->mark_deal call for partitions into blk_drop_partitions.

Might be worth a comment. Otherwise looks good to me,
Acked-by: Christian Brauner <brauner@kernel.org>