New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ceph-fuse: add process to ceph-fuse --help #6821
Conversation
I think that currently we're hitting the fuse --help hander instead of the ceph one, so does the ceph output also include the fuse options? FUSE options: -d -o debug enable debug output (implies -f) -f foreground operation -s disable multi-threaded operation By the way, if you wanted to add help for "-r" (sets client_mountpoint) while you're at it, that would be great (http://tracker.ceph.com/issues/12175) |
@jcsp Has the "-r" option implemented in ceph-fuse? |
@flywayway yes, it's a synonym for --client-mountpoint |
you can see where it's handled here: https://github.com/ceph/ceph/blob/master/src/common/config.cc#L420 |
@jcsp I add "-r" option and the default ceph options. The fuse did not provide API to output fuse option. |
@jcsp @gregsfortytwo Can you review this? |
@@ -57,6 +62,9 @@ int main(int argc, const char **argv, const char *envp[]) { | |||
} else if (ceph_argparse_flag(args, i, "--localize-reads", (char*)NULL)) { | |||
cerr << "setting CEPH_OSD_FLAG_LOCALIZE_READS" << std::endl; | |||
filer_flags |= CEPH_OSD_FLAG_LOCALIZE_READS; | |||
} else if (ceph_argparse_flag(args, i, "-h", "--help", (char*)NULL)) { | |||
usage(); | |||
return 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
writing "return 0" here is confusing because it makes it seem like calling this will result in the process exiting with status zero. What actually happens is that generic_usage calls exit(1), so you should actually assert(0) here because we don't expect to ever return.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right!
Signed-off-by: Wei Feng <feng.wei@h3c.com>
@jcsp Can you review this? I add fuse_usage(), it can output part of the fuse help. |
Hmm, so it looks like the main fuse help output (i.e. all the "-o" stuff) comes from the actual fuse_init part, so there's no way to get to that. I think this will do. |
ceph-fuse: add process to ceph-fuse --help Reviewed-by: John Spray <john.spray@redhat.com>
Add the process to the command line "ceph-fuse --help" and "ceph-fuse -h"
Signed-off-by: Wei Feng feng.wei@h3c.com