Skip to content

Commit

Permalink
Inline format string arguments
Browse files Browse the repository at this point in the history
Signed-off-by: mulhern <[email protected]>
  • Loading branch information
mulkieran committed Oct 2, 2024
1 parent 35a4413 commit e060d83
Showing 1 changed file with 12 additions and 16 deletions.
28 changes: 12 additions & 16 deletions src/engine/strat_engine/thinpool/thinpool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -474,8 +474,7 @@ impl ThinPool {
let fs_uuid = *fs.uuid;
if filesystem_metadata_map.insert(fs_uuid, fs).is_some() {
return Err(StratisError::Msg(format!(
"Two filesystems with the same UUID, {:}, found in filesystem metadata",
fs_uuid
"Two filesystems with the same UUID, {fs_uuid}, found in filesystem metadata"
)));
}
}
Expand Down Expand Up @@ -613,23 +612,23 @@ impl ThinPool {
if let Err(e) = set_uuid(&fs.devnode(), merged.uuid) {
error!(
"Could not set the UUID of the XFS filesystem on th
e Stratis filesystem with UUID {} after revert, reason: {:?}",
merged.uuid, e
e Stratis filesystem with UUID {} after revert, reason: {e:?}",
merged.uuid
);
};
fs.udev_fs_change(pool_name, merged.uuid, &merged.name);

let name = Name::new(merged.name.to_owned());
if let Err(e) = mdv.save_fs(&name, merged.uuid, &fs) {
error!(
"Could not save MDV for fs with UUID {} and name {} belonging to pool with UUID {} after revert, reason: {:?}",
merged.uuid, merged.name, pool_uuid, e
"Could not save MDV for fs with UUID {} and name {} belonging to pool with UUID {pool_uuid} after revert, reason: {e:?}",
merged.uuid, merged.name,
);
}
if let Err(e) = mdv.rm_fs(snap.uuid) {
error!(
"Could not remove old MDV for fs with UUID {} belonging to pool with UUID {} after revert, reason: {:?}",
snap.uuid, pool_uuid, e
"Could not remove old MDV for fs with UUID {} belonging to pool with UUID {pool_uuid} after revert, reason: {e:?}",
snap.uuid,
);
};
assert!(
Expand All @@ -642,8 +641,8 @@ e Stratis filesystem with UUID {} after revert, reason: {:?}",
&format!("delete {:}", origin.thin_id),
) {
warn!(
"Failed to delete space allocated for deleted origin filesystem with UUID {:} and thin id {:}: {:?} after revert",
origin.uuid, origin.thin_id, e
"Failed to delete space allocated for deleted origin filesystem with UUID {:} and thin id {:}: {e:?} after revert",
origin.uuid, origin.thin_id
);
}
for fs in filesystem_metadata_map.values_mut() {
Expand Down Expand Up @@ -675,8 +674,7 @@ e Stratis filesystem with UUID {} after revert, reason: {:?}",
}
Err(err) => {
warn!(
"Filesystem specified by metadata {:?} could not be setup, reason: {:?}",
fssave, err
"Filesystem specified by metadata {fssave:?} could not be setup, reason: {err:?}"
);
}
}
Expand Down Expand Up @@ -1760,15 +1758,13 @@ e Stratis filesystem with UUID {} after revert, reason: {:?}",

if let Some((n, u, _)) = others_scheduled.first() {
return Err(StratisError::Msg(format!(
"Filesystem {:} with UUID {:} is already scheduled to be reverted into origin filesystem {:}, unwilling to schedule two revert operations on the same origin filesystem.",
n, u, origin,
"Filesystem {n} with UUID {u} is already scheduled to be reverted into origin filesystem {origin}, unwilling to schedule two revert operations on the same origin filesystem."
)));
}

if let Some((n, u, _)) = into_scheduled.first() {
return Err(StratisError::Msg(format!(
"Filesystem {:} with UUID {:} is already scheduled to be reverted into this filesystem {:}. The ordering is ambiguous, unwilling to schedule a revert",
n, u, origin,
"Filesystem {n} with UUID {u} is already scheduled to be reverted into this filesystem {origin}. The ordering is ambiguous, unwilling to schedule a revert"
)));
}
}
Expand Down

0 comments on commit e060d83

Please sign in to comment.