Thread (21 messages) 21 messages, 5 authors, 2021-04-08

Re: [PATCH 01/15] md: remove the code to flush an old instance in md_open

From: Christoph Hellwig <hch@lst.de>
Date: 2021-03-31 06:53:46
Also in: linux-block, linux-s390, linux-scsi

On Wed, Mar 31, 2021 at 11:29:39AM +0800, heming.zhao@suse.com wrote:
when userspace "mdadm -Ss" finish (the ioctl STOP_ARRAY returns),
mddev->flags will be zero. and you can see my patch email (date: 2021-3-30).
At this time, userspace will execute "mdadm --monitor" to scan the
closing md device. the md_open will trigger very soon. at this time,
bdev->bd_disk->private_data is only a skeleton, your shouldn't trust & use it.
Ermm, the block layer rules require the device to be fully set up
when add_disk is called.  So if that is not the case (and I'd like
to see hints how) we need to fix this properly instead of using a hack
in ->open.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help