mirror of
https://github.com/ceph/ceph
synced 2025-01-20 01:51:34 +00:00
mount: accept monitor host (mon_host
) mount option
With new mount device syntax monitor host(s) can be passed during mount as option parameter. This option is not mandatory as it can be fetched from the cluster configuration file if available. Signed-off-by: Venky Shankar <vshankar@redhat.com>
This commit is contained in:
parent
7dee504a41
commit
f47b7bcbf8
@ -327,6 +327,15 @@ static int parse_options(const char *data, struct ceph_mount_info *cmi)
|
||||
/* Only legacy ms_mode needs v1 addrs */
|
||||
v2_addrs = strcmp(value, "legacy");
|
||||
skip = false;
|
||||
} else if (strcmp(data, "mon_host") == 0) {
|
||||
/* monitor address to use for mounting */
|
||||
if (!value || !*value) {
|
||||
fprintf(stderr, "mount option mon_host requires a value.\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
cmi->cmi_mons = strdup(value);
|
||||
if (!cmi->cmi_mons)
|
||||
return -ENOMEM;
|
||||
} else {
|
||||
/* unrecognized mount options, passing to kernel */
|
||||
skip = false;
|
||||
|
Loading…
Reference in New Issue
Block a user