9 Star 0 Fork 13

src-anolis-os/mdadm

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0046-tests-00readonly-Run-udevadm-settle-before-setting-r.patch 1.07 KB
一键复制 编辑 原始数据 按行查看 历史
小龙 提交于 2023-05-16 18:45 . update to mdadm-4.2-7.el8
From 39b381252c32275079344d30de18b76fda4bba26 Mon Sep 17 00:00:00 2001
From: Logan Gunthorpe <logang@deltatee.com>
Date: Wed, 27 Jul 2022 15:52:45 -0600
Subject: [PATCH 46/83] tests/00readonly: Run udevadm settle before setting ro
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>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
---
tests/00readonly | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/00readonly b/tests/00readonly
index 39202487..afe243b3 100644
--- a/tests/00readonly
+++ b/tests/00readonly
@@ -12,6 +12,7 @@ do
$dev1 $dev2 $dev3 $dev4 --assume-clean
check nosync
check $level
+ udevadm settle
mdadm -ro $md0
check readonly
state=$(cat /sys/block/md0/md/array_state)
--
2.38.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-anolis-os/mdadm.git
git@gitee.com:src-anolis-os/mdadm.git
src-anolis-os
mdadm
mdadm
a8

搜索帮助

0d507c66 1850385 C8b1a773 1850385