gentoo-overlay/sys-fs/stratisd/files/0001-disable-xfs-uuid-chang...

45 lines
1.6 KiB
Diff
Raw Normal View History

From ef8231267c4ebb54977e3ea3d389693b20dcf1a1 Mon Sep 17 00:00:00 2001
From: Alexander Miroshnichenko <alex@millerson.name>
Date: Sun, 29 Mar 2020 12:20:08 +0300
Subject: [PATCH] disable xfs uuid change after snapshot create
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Signed-off-by: Alexander Miroshnichenko <alex@millerson.name>
---
src/engine/strat_engine/cmd.rs | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/engine/strat_engine/cmd.rs b/src/engine/strat_engine/cmd.rs
index 5265ed19ff03..b9dac8a72fbb 100644
--- a/src/engine/strat_engine/cmd.rs
+++ b/src/engine/strat_engine/cmd.rs
@@ -46,6 +46,7 @@ const THIN_CHECK: &str = "thin_check";
const THIN_REPAIR: &str = "thin_repair";
const UDEVADM: &str = "udevadm";
const XFS_DB: &str = "xfs_db";
+const BINTRUE: &str = "true";
const XFS_GROWFS: &str = "xfs_growfs";
lazy_static! {
@@ -55,6 +56,7 @@ lazy_static! {
(THIN_REPAIR.to_string(), find_binary(THIN_REPAIR)),
(UDEVADM.to_string(), find_binary(UDEVADM)),
(XFS_DB.to_string(), find_binary(XFS_DB)),
+ (BINTRUE.to_string(), find_binary(BINTRUE)),
(XFS_GROWFS.to_string(), find_binary(XFS_GROWFS)),
]
.iter()
@@ -148,7 +150,7 @@ pub fn xfs_growfs(mount_point: &Path) -> StratisResult<()> {
/// Set a new UUID for filesystem on the devnode.
pub fn set_uuid(devnode: &Path, uuid: Uuid) -> StratisResult<()> {
execute_cmd(
- Command::new(get_executable(XFS_DB).as_os_str())
+ Command::new(get_executable(BINTRUE).as_os_str())
.arg("-x")
.arg(format!("-c uuid {}", uuid))
.arg(devnode),
--
2.24.1