[pbs-devel] [PATCH proxmox-backup 2/7] fuse_loop: add documentation

Stefan Reiter s.reiter at proxmox.com
Wed Oct 7 13:53:03 CEST 2020


Signed-off-by: Stefan Reiter <s.reiter at proxmox.com>
---
 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<R: AsyncRead + AsyncSeek + Unpin> {
     session: Option<Fuse>,
     stat: libc::stat,
-- 
2.20.1






More information about the pbs-devel mailing list