wip: Removing swap

This commit is contained in:
J M
2021-12-20 13:48:55 -07:00
committed by Aiden McClelland
parent 4840ddecf9
commit 03edd7a4b8

View File

@@ -157,7 +157,7 @@ pub async fn create_all_fs<P: AsRef<Path>>(
password: &str,
) -> Result<(), Error> {
create_fs(guid, &datadir, "main", MAIN_FS_SIZE, false, password).await?;
create_fs(guid, &datadir, "swap", SWAP_SIZE, true, password).await?;
// create_fs(guid, &datadir, "swap", SWAP_SIZE, true, password).await?;
create_fs(
guid,
&datadir,
@@ -198,7 +198,7 @@ pub async fn unmount_fs<P: AsRef<Path>>(
#[instrument(skip(datadir))]
pub async fn unmount_all_fs<P: AsRef<Path>>(guid: &str, datadir: P) -> Result<(), Error> {
unmount_fs(guid, &datadir, "main", false).await?;
unmount_fs(guid, &datadir, "swap", true).await?;
// unmount_fs(guid, &datadir, "swap", true).await?;
unmount_fs(guid, &datadir, "package-data", false).await?;
Command::new("dmsetup")
.arg("remove_all") // TODO: find a higher finesse way to do this for portability reasons
@@ -295,7 +295,7 @@ pub async fn mount_all_fs<P: AsRef<Path>>(
password: &str,
) -> Result<(), Error> {
mount_fs(guid, &datadir, "main", false, password).await?;
mount_fs(guid, &datadir, "swap", true, password).await?;
// mount_fs(guid, &datadir, "swap", true, password).await?;
mount_fs(guid, &datadir, "package-data", false, password).await?;
Ok(())
}