virtiofsd: Add options for virtio

Add options to specify parameters for virtio-fs paths, i.e.

   ./virtiofsd -o vhost_user_socket=/tmp/vhostqemu

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Misono Tomohiro <misono.tomohiro@jp.fujitsu.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
This commit is contained in:
Dr. David Alan Gilbert 2018-06-07 17:22:33 +01:00
parent 1b209805f8
commit 205de006aa
3 changed files with 16 additions and 10 deletions

View File

@ -63,6 +63,7 @@ struct fuse_session {
struct fuse_notify_req notify_list;
size_t bufsize;
int error;
char *vu_socket_path;
};
struct fuse_chan {

View File

@ -2115,8 +2115,11 @@ reply_err:
}
static const struct fuse_opt fuse_ll_opts[] = {
LL_OPTION("debug", debug, 1), LL_OPTION("-d", debug, 1),
LL_OPTION("--debug", debug, 1), LL_OPTION("allow_root", deny_others, 1),
LL_OPTION("debug", debug, 1),
LL_OPTION("-d", debug, 1),
LL_OPTION("--debug", debug, 1),
LL_OPTION("allow_root", deny_others, 1),
LL_OPTION("--socket-path=%s", vu_socket_path, 0),
FUSE_OPT_END
};
@ -2132,7 +2135,9 @@ void fuse_lowlevel_help(void)
* These are not all options, but the ones that are
* potentially of interest to an end-user
*/
printf(" -o allow_root allow access by root\n");
printf(
" -o allow_root allow access by root\n"
" --socket-path=PATH path for the vhost-user socket\n");
}
void fuse_session_destroy(struct fuse_session *se)

View File

@ -127,13 +127,13 @@ static const struct fuse_opt conn_info_opt_spec[] = {
void fuse_cmdline_help(void)
{
printf(
" -h --help print help\n"
" -V --version print version\n"
" -d -o debug enable debug output (implies -f)\n"
" -f foreground operation\n"
" -o max_idle_threads the maximum number of idle worker threads\n"
" allowed (default: 10)\n");
printf(" -h --help print help\n"
" -V --version print version\n"
" -d -o debug enable debug output (implies -f)\n"
" -f foreground operation\n"
" -o max_idle_threads the maximum number of idle worker "
"threads\n"
" allowed (default: 10)\n");
}
static int fuse_helper_opt_proc(void *data, const char *arg, int key,