Skip to content
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

Merged
merged 1 commit into from Dec 15, 2015
Merged

ceph-fuse: add process to ceph-fuse --help #6821

merged 1 commit into from Dec 15, 2015

Conversation

flywayway
Copy link

Add the process to the command line "ceph-fuse --help" and "ceph-fuse -h"
Signed-off-by: Wei Feng feng.wei@h3c.com

@jcsp
Copy link
Contributor

jcsp commented Dec 7, 2015

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)

@gregsfortytwo gregsfortytwo added the cephfs Ceph File System label Dec 7, 2015
@flywayway
Copy link
Author

@jcsp Has the "-r" option implemented in ceph-fuse?

@jcsp
Copy link
Contributor

jcsp commented Dec 8, 2015

@flywayway yes, it's a synonym for --client-mountpoint

@jcsp
Copy link
Contributor

jcsp commented Dec 8, 2015

you can see where it's handled here: https://github.com/ceph/ceph/blob/master/src/common/config.cc#L420

@flywayway
Copy link
Author

@jcsp I add "-r" option and the default ceph options. The fuse did not provide API to output fuse option.

@flywayway
Copy link
Author

@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;
Copy link
Contributor

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.

Copy link
Author

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>
@flywayway
Copy link
Author

@jcsp Can you review this? I add fuse_usage(), it can output part of the fuse help.

@jcsp
Copy link
Contributor

jcsp commented Dec 15, 2015

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.

jcsp added a commit that referenced this pull request Dec 15, 2015
ceph-fuse: add process to ceph-fuse --help

Reviewed-by: John Spray <john.spray@redhat.com>
@jcsp jcsp merged commit d278134 into ceph:master Dec 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cephfs Ceph File System
Projects
None yet
4 participants