代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/udisks2 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From d33d1dda277a78dcf63574c567ca24d7c3462f49 Mon Sep 17 00:00:00 2001
From: Marius Vollmer <mvollmer@redhat.com>
Date: Tue, 30 Apr 2024 14:39:13 +0300
Subject: [PATCH] mdraid: Expose "consistency_policy" sysfs value
---
data/org.freedesktop.UDisks2.xml | 12 ++++++++++++
src/udiskslinuxmdraid.c | 4 ++++
2 files changed, 16 insertions(+)
diff --git a/data/org.freedesktop.UDisks2.xml b/data/org.freedesktop.UDisks2.xml
index 53194c7..5d34901 100644
--- a/data/org.freedesktop.UDisks2.xml
+++ b/data/org.freedesktop.UDisks2.xml
@@ -3137,6 +3137,18 @@
-->
<property name="Degraded" type="u" access="read"/>
+ <!-- ConsistencyPolicy:
+ @since: 2.11.0
+ The consistency policy of the array.
+
+ If the RAID array does not support consistency policies (for
+ example RAID-0 arrays), this is empty.
+
+ This property corresponds to the
+ <literal>consistency_policy</literal> sysfs file.
+ -->
+ <property name="ConsistencyPolicy" type="s" access="read"/>
+
<!-- BitmapLocation:
The location of a write-intent bitmap (empty if the array is not running), if any.
diff --git a/src/udiskslinuxmdraid.c b/src/udiskslinuxmdraid.c
index 900cd65..46ee77e 100644
--- a/src/udiskslinuxmdraid.c
+++ b/src/udiskslinuxmdraid.c
@@ -237,6 +237,7 @@ udisks_linux_mdraid_update (UDisksLinuxMDRaid *mdraid,
const gchar *name = NULL;
gchar *sync_action = NULL;
gchar *sync_completed = NULL;
+ gchar *consistency_policy = NULL;
gchar *bitmap_location = NULL;
guint degraded = 0;
guint64 chunk_size = 0;
@@ -316,6 +317,7 @@ udisks_linux_mdraid_update (UDisksLinuxMDRaid *mdraid,
degraded = udisks_linux_device_read_sysfs_attr_as_int (raid_device, "md/degraded", NULL);
sync_action = udisks_linux_device_read_sysfs_attr (raid_device, "md/sync_action", NULL);
sync_completed = udisks_linux_device_read_sysfs_attr (raid_device, "md/sync_completed", NULL);
+ consistency_policy = udisks_linux_device_read_sysfs_attr (raid_device, "md/consistency_policy", NULL);
bitmap_location = udisks_linux_device_read_sysfs_attr (raid_device, "md/bitmap/location", NULL);
}
@@ -326,6 +328,7 @@ udisks_linux_mdraid_update (UDisksLinuxMDRaid *mdraid,
}
udisks_mdraid_set_degraded (iface, degraded);
udisks_mdraid_set_sync_action (iface, sync_action);
+ udisks_mdraid_set_consistency_policy (iface, consistency_policy);
udisks_mdraid_set_bitmap_location (iface, bitmap_location);
udisks_mdraid_set_chunk_size (iface, chunk_size);
@@ -517,6 +520,7 @@ udisks_linux_mdraid_update (UDisksLinuxMDRaid *mdraid,
bd_md_examine_data_free (raid_data);
g_free (sync_completed);
g_free (sync_action);
+ g_free (consistency_policy);
g_free (bitmap_location);
g_list_free_full (member_devices, g_object_unref);
g_clear_object (&raid_device);
--
2.33.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。