Thread (10 messages) flat view 10 messages, 2 authors, 2021-02-18

Re: [PATCH 0/2] block: avoid to drop & re-add partitions if partitions aren't changed

From: Ming Lei <hidden>
Date: 2021-02-18 09:20:16
Also in: lkml

On Wed, Feb 17, 2021 at 08:16:29AM +0100, Christoph Hellwig wrote:
On Wed, Feb 17, 2021 at 11:07:14AM +0800, Ming Lei wrote:
quoted
Do you think it is correct for ioctl(BLKRRPART) to always drop/re-add
partition device node?
Yes, that is what it is designed to do.  The only reason to call this
ioctl is when userspace software has written new partition table
information to the disk.
I am wondering how userspace can know this design or implication since
this behavior wasn't documented anywhere.

For example, 'blockdev --rereadpt' can do it simply, without updating
partition table at all.

The reality is that almost of all the main userspace consumers of
ioctl(BLKRRPART) didn't follow such 'rule', then partitions node from
'bdev' fs can disappear & re-appear anytime. I believe it is one bug
from userspace view.


Thanks,
Ming
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help