Lines Matching refs:gconf

291 static int parse_volume_options(BlockdevOptionsGluster *gconf, const char *path)  in parse_volume_options()  argument
305 gconf->volume = g_strndup(q, p - q); in parse_volume_options()
312 gconf->path = g_strdup(p); in parse_volume_options()
348 static int qemu_gluster_parse_uri(BlockdevOptionsGluster *gconf, in qemu_gluster_parse_uri() argument
363 QAPI_LIST_PREPEND(gconf->server, gsconf); in qemu_gluster_parse_uri()
378 ret = parse_volume_options(gconf, g_uri_get_path(uri)); in qemu_gluster_parse_uri()
416 static struct glfs *qemu_gluster_glfs_init(BlockdevOptionsGluster *gconf, in qemu_gluster_glfs_init() argument
425 glfs = glfs_find_preopened(gconf->volume); in qemu_gluster_glfs_init()
430 glfs = glfs_new(gconf->volume); in qemu_gluster_glfs_init()
435 glfs_set_preopened(gconf->volume, glfs); in qemu_gluster_glfs_init()
437 for (server = gconf->server; server; server = server->next) { in qemu_gluster_glfs_init()
466 ret = glfs_set_logging(glfs, gconf->logfile, gconf->debug); in qemu_gluster_glfs_init()
474 " to connect", gconf->volume, gconf->path); in qemu_gluster_glfs_init()
475 for (server = gconf->server; server; server = server->next) { in qemu_gluster_glfs_init()
509 static int qemu_gluster_parse_json(BlockdevOptionsGluster *gconf, in qemu_gluster_parse_json() argument
538 gconf->volume = g_strdup(ptr); in qemu_gluster_parse_json()
545 gconf->path = g_strdup(ptr); in qemu_gluster_parse_json()
547 tail = &gconf->server; in qemu_gluster_parse_json()
679 static int qemu_gluster_parse(BlockdevOptionsGluster *gconf, in qemu_gluster_parse() argument
685 ret = qemu_gluster_parse_uri(gconf, filename); in qemu_gluster_parse()
695 ret = qemu_gluster_parse_json(gconf, options, errp); in qemu_gluster_parse()
715 static struct glfs *qemu_gluster_init(BlockdevOptionsGluster *gconf, in qemu_gluster_init() argument
721 ret = qemu_gluster_parse(gconf, filename, options, errp); in qemu_gluster_init()
727 return qemu_gluster_glfs_init(gconf, errp); in qemu_gluster_init()
802 BlockdevOptionsGluster *gconf = NULL; in qemu_gluster_open() local
822 gconf = g_new0(BlockdevOptionsGluster, 1); in qemu_gluster_open()
823 gconf->debug = s->debug; in qemu_gluster_open()
824 gconf->has_debug = true; in qemu_gluster_open()
829 gconf->logfile = g_strdup(s->logfile); in qemu_gluster_open()
831 s->glfs = qemu_gluster_init(gconf, filename, options, errp); in qemu_gluster_open()
856 s->fd = glfs_open(s->glfs, gconf->path, open_flags); in qemu_gluster_open()
865 s->fd = glfs_open(s->glfs, gconf->path, open_flags); in qemu_gluster_open()
875 qapi_free_BlockdevOptionsGluster(gconf); in qemu_gluster_open()
901 BlockdevOptionsGluster *gconf; in qemu_gluster_reopen_prepare() local
914 gconf = g_new0(BlockdevOptionsGluster, 1); in qemu_gluster_reopen_prepare()
915 gconf->debug = s->debug; in qemu_gluster_reopen_prepare()
916 gconf->has_debug = true; in qemu_gluster_reopen_prepare()
917 gconf->logfile = g_strdup(s->logfile); in qemu_gluster_reopen_prepare()
924 reop_s->glfs = qemu_gluster_init(gconf, state->bs->exact_filename, NULL, in qemu_gluster_reopen_prepare()
927 reop_s->glfs = qemu_gluster_init(gconf, NULL, state->options, errp); in qemu_gluster_reopen_prepare()
944 reop_s->fd = glfs_open(reop_s->glfs, gconf->path, open_flags); in qemu_gluster_reopen_prepare()
953 qapi_free_BlockdevOptionsGluster(gconf); in qemu_gluster_reopen_prepare()
1124 BlockdevOptionsGluster *gconf; in qemu_gluster_co_create_opts() local
1133 gconf = g_new0(BlockdevOptionsGluster, 1); in qemu_gluster_co_create_opts()
1134 gopts->location = gconf; in qemu_gluster_co_create_opts()
1149 gconf->debug = qemu_opt_get_number_del(opts, GLUSTER_OPT_DEBUG, in qemu_gluster_co_create_opts()
1151 if (gconf->debug < 0) { in qemu_gluster_co_create_opts()
1152 gconf->debug = 0; in qemu_gluster_co_create_opts()
1153 } else if (gconf->debug > GLUSTER_DEBUG_MAX) { in qemu_gluster_co_create_opts()
1154 gconf->debug = GLUSTER_DEBUG_MAX; in qemu_gluster_co_create_opts()
1156 gconf->has_debug = true; in qemu_gluster_co_create_opts()
1158 gconf->logfile = qemu_opt_get_del(opts, GLUSTER_OPT_LOGFILE); in qemu_gluster_co_create_opts()
1159 if (!gconf->logfile) { in qemu_gluster_co_create_opts()
1160 gconf->logfile = g_strdup(GLUSTER_LOGFILE_DEFAULT); in qemu_gluster_co_create_opts()
1163 ret = qemu_gluster_parse(gconf, filename, NULL, errp); in qemu_gluster_co_create_opts()