diff --git a/src/bin/nydusd/main.rs b/src/bin/nydusd/main.rs
index e0ee57d8..c9b41fc5 100644
@@ -196,11 +196,12 @@ extern "C" fn sig_exit(_sig: std::os::raw::c_int) {
}
#[cfg(feature = "virtiofs")]
-const SHARED_DIR_HELP_MESSAGE: &str = "Directory to share between host and guest by virtiofs, which also enables `passthroughfs` mode";
+const SHARED_DIR_HELP_MESSAGE: &str = "Directory shared by host and guest for \
+passthroughfs, which also enables passthroughfs mode";
#[cfg(feature = "fusedev")]
-const SHARED_DIR_HELP_MESSAGE: &str =
- "Directory to share by FUSE for testing, which also enables `passthroughfs` mode";
+const SHARED_DIR_HELP_MESSAGE: &str = "A passthroughfs source for FUSE (the \
+purpose of testing and demonstration), which also enables passthroughfs mode";
#[cfg(any(feature = "fusedev", feature = "virtiofs"))]
fn append_fs_options(app: App<'static, 'static>) -> App<'static, 'static> {
@@ -208,7 +209,7 @@ fn append_fs_options(app: App<'static, 'static>) -> App<'static, 'static> {
Arg::with_name("bootstrap")
.long("bootstrap")
.short("B")
- .help("Bootstrap file of a rafs filesystem, which also enables `rafs` mode")
+ .help("Bootstrap/metadata file for rafs filesystem, which also enables rafs mode")
.takes_value(true)
.requires("config")
.conflicts_with("shared-dir"),
@@ -235,7 +236,7 @@ fn append_fs_options(app: App<'static, 'static>) -> App<'static, 'static> {
Arg::with_name("virtual-mountpoint")
.long("virtual-mountpoint")
.short("m")
- .help("Path within the FUSE/virtiofs device to mount the filesystem")
+ .help("Path inside FUSE/virtiofs virtual filesystem to mount the rafs/passthroughfs instance")
.takes_value(true)
.default_value("/")
.required(false),
@@ -267,7 +268,7 @@ fn append_fuse_options(app: App<'static, 'static>) -> App<'static, 'static> {
.long("thread-num")
.short("T")
.default_value("1")
- .help("Number of worker threads to serve IO requests")
+ .help("Number of working threads to serve FUSE IO requests")
.takes_value(true)
.required(false)
.validator(|v| {
@@ -286,7 +287,7 @@ fn append_fuse_options(app: App<'static, 'static>) -> App<'static, 'static> {
Arg::with_name("writable")
.long("writable")
.short("W")
- .help("Mounts FUSE filesystem in rw mode")
+ .help("Mount FUSE filesystem in rw mode")
.takes_value(false),
)
}
@@ -305,7 +306,7 @@ fn append_virtiofs_options(app: App<'static, 'static>) -> App<'static, 'static>
Arg::with_name("hybrid-mode")
.long("hybrid-mode")
.short("H")
- .help("Enables both `rafs` and `passthroughfs` modes")
+ .help("Enable support for both rafs and passthroughfs modes")
.required(false)
.takes_value(false),
)
@@ -334,13 +335,13 @@ fn append_services_subcmd_options(app: App<'static, 'static>) -> App<'static, 's
Arg::with_name("fscache")
.long("fscache")
.short("F")
- .help("Working directory for Linux fscache driver to store cached files")
+ .help("Working directory fscache driver to cache files")
.takes_value(true),
)
.arg(
Arg::with_name("fscache-tag")
.long("fscache-tag")
- .help("Tag to identify the fscache daemon instance")
+ .help("Fscache tag to identify the fs daemon instance")
.takes_value(true)
.requires("fscache"),
);
@@ -423,7 +424,7 @@ fn prepare_commandline_options() -> App<'static, 'static> {
Arg::with_name("upgrade")
.long("upgrade")
.short("U")
- .help("Starts daemon in upgrade mode")
+ .help("Start in upgrade mode")
.takes_value(false)
.required(false)
.global(true),
@@ -546,7 +547,6 @@ impl<'a> SubCmdArgs<'a> {
}
}
-#[cfg(any(feature = "fusedev", feature = "virtiofs"))]
fn process_default_fs_service(
args: SubCmdArgs,
bti: BuildTimeInfo,
@@ -676,18 +676,6 @@ fn process_default_fs_service(
Ok(())
}
-#[cfg(not(any(feature = "fusedev", feature = "virtiofs")))]
-fn process_default_fs_service(
- _args: SubCmdArgs,
- _bti: BuildTimeInfo,
- _apisock: Option<&str>,
- _is_fuse: bool,
-) -> Result<()> {
- return Err(einval!(
- "Neither fusedev nor virtiofs is enabled, please recompile nydusd with required features!"
- ));
-}
-
fn process_daemon_arguments(
subargs: &SubCmdArgs,
_apisock: Option<&str>,
@@ -710,6 +698,7 @@ fn main() -> Result<()> {
setup_logging(logging_file, level)?;
dump_program_info(crate_version!());
+ handle_rlimit_nofile_option(&args, "rlimit-nofile")?;
match args.subcommand_name() {
Some("daemon") => {
@@ -736,13 +725,9 @@ fn main() -> Result<()> {
process_default_fs_service(subargs, bti, apisock, true)?;
#[cfg(feature = "virtiofs")]
process_default_fs_service(subargs, bti, apisock, false)?;
- #[cfg(not(any(feature = "fusedev", feature = "virtiofs")))]
- process_default_fs_service(subargs, bti, apisock, false)?;
}
}
- handle_rlimit_nofile_option(&args, "rlimit-nofile")?;
-
let daemon = DAEMON_CONTROLLER.get_daemon();
if let Some(fs) = daemon.get_default_fs_service() {
DAEMON_CONTROLLER.set_fs_service(fs);