MCPcopy Create free account
hub / github.com/Dstack-TEE/dstack / setup_swap

Method setup_swap

dstack-util/src/system_setup.rs:975–980  ·  view source on GitHub ↗
(&self, swap_size: u64, opts: &DstackOptions)

Source from the content-addressed store, hash-verified

973 }
974
975 async fn setup_swap(&self, swap_size: u64, opts: &DstackOptions) -> Result<()> {
976 match opts.storage_fs {
977 FsType::Zfs => self.setup_swap_zvol(swap_size).await,
978 FsType::Ext4 => self.setup_swapfile(swap_size).await,
979 }
980 }
981
982 async fn setup_swapfile(&self, swap_size: u64) -> Result<()> {
983 let swapfile = self.args.mount_point.join("swapfile");

Callers 1

setup_fsMethod · 0.80

Calls 2

setup_swap_zvolMethod · 0.80
setup_swapfileMethod · 0.80

Tested by

no test coverage detected