Lines Matching full:fs
17 use std::fs;
18 use std::os::unix::fs::MetadataExt;
47 fs::write(format!("/sys/block/{device_name}/queue/scheduler"), "none") in clear_block_device_scheduler()
68 fs::read_to_string(format!("{sysfs_path}/class/block/{file_backing_device}/mq/0/nr_tags"))?; in configure_block_device_queue_depth_with_sysfs()
71 fs::write( in configure_block_device_queue_depth_with_sysfs()
97 fs::metadata(file_path).map_err(BlockDeviceError::InputFileMetadata)?.dev() as libc::dev_t; in get_block_device_name()
101 let device_path = std::fs::canonicalize(format!("{sysfs_path}/dev/block/{major}:{minor}"))?; in get_block_device_name()
131 for entry in fs::read_dir(format!("{sysfs_path}/block/{device_name}/slaves"))? { in get_parent_block_device()
149 for entry in fs::read_dir(format!("{sysfs_path}/class/block"))? { in partition_parent()
157 if fs::exists(format!("{sysfs_path}/class/block/{name}/{device_name}"))? { in partition_parent()
166 use std::os::unix::fs::symlink;
189 fs::create_dir_all(link.parent().unwrap()).unwrap(); in build()
194 fs::create_dir_all(path.parent().unwrap()).unwrap(); in build()
195 fs::write(path, content).unwrap(); in build()
198 fs::create_dir_all(root.join(path.trim_start_matches("/"))).unwrap(); in build()
202 let devnum = fs::metadata(file_path).unwrap().dev() as libc::dev_t; in build()
207 fs::create_dir_all(link.parent().unwrap()).unwrap(); in build()
288 fs::read_to_string(fake_fs.path().join("sys/class/block/loop97/queue/nr_requests")) in configure_block_device_queue_depth()