Thread (4 messages) 4 messages, 2 authors, 2022-08-23

Re: [PATCH mdadm v3 1/2] tests/00readonly: Run udevadm settle before setting ro

From: Jes Sorensen <hidden>
Date: 2022-08-23 17:16:43

On 7/27/22 17:52, Logan Gunthorpe wrote:
In some recent kernel versions, 00readonly fails with:

  mdadm: failed to set readonly for /dev/md0: Device or resource busy
  ERROR: array is not read-only!

This was traced down to a race condition with udev holding a reference
to the block device at the same time as trying to set it read only.

To fix this, call udevadm settle before setting the array read only.

Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
---
 tests/00readonly | 1 +
 1 file changed, 1 insertion(+)
Applied,

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