From fcad02e1dedbd48f351a501b0865ea9936243000 Mon Sep 17 00:00:00 2001 From: Stefan Reiter Date: Wed, 7 Oct 2020 13:53:03 +0200 Subject: [PATCH] fuse_loop: add documentation Signed-off-by: Stefan Reiter --- src/tools/fuse_loop.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/tools/fuse_loop.rs b/src/tools/fuse_loop.rs index 8c1e04aa..cdad0230 100644 --- a/src/tools/fuse_loop.rs +++ b/src/tools/fuse_loop.rs @@ -1,3 +1,5 @@ +//! Map a raw data reader as a loop device via FUSE + use anyhow::{Error, format_err, bail}; use std::ffi::OsStr; use std::path::{Path, PathBuf}; @@ -18,6 +20,10 @@ use super::loopdev; const RUN_DIR: &'static str = "/run/pbs-loopdev"; +/// Represents an ongoing FUSE-session that has been mapped onto a loop device. +/// Create with map_loop, then call 'main' and poll until startup_chan reports +/// success. Then, daemonize or otherwise finish setup, and continue polling +/// main's future until completion. pub struct FuseLoopSession { session: Option, stat: libc::stat,