----- Original Message ----- > From: "Poornima Gurusiddaiah" <pgurusid@xxxxxxxxxx> > To: "Raghavendra Gowdappa" <rgowdapp@xxxxxxxxxx> > Cc: "Raghavendra Talur" <rtalur@xxxxxxxxxx>, "Gluster Devel" <gluster-devel@xxxxxxxxxxx>, "Jeff Cody" > <jcody@xxxxxxxxxx>, "Rajesh Joseph" <rjoseph@xxxxxxxxxx> > Sent: Monday, May 9, 2016 12:24:44 PM > Subject: Re: xlator option setting in gfapi > > Hi, > > This is what happens when glfs_set_xlator_option is called: > - It updates ctx->cmd_args->xlator_options > - gf_add_cmdline_options (during glusterfs_graph_prepare.. pub_glfs_init) > adds it to xl->options > - glusterfs_graph_unknown_options (during glusterfs_graph_activate.. > pub_glfs_init) checks if the options in xl->options are present or not. If > the option is not present it just logs a warning message. These options are > treated as command line args. > > To report the option as a failure, at the least we can fail glfs_init() failing glfs_init is an acceptable way. Though, there are some thoughts here: 1. We identify xlator (in gf_add_cmdline_options) by providing the name of xlator. This might be a little cumbersome if not wrong. 2. Probably we need to provide a way for the application to know why glfs_init failed (like unknown option, incompatible value for an option, improper xlator configuration etc). This way if some applications want to ignore an error (like ignore an unknown option, which is current behaviour) they can do that. Or providing an option to glfs_init like STRICT_OPTION_CHECKING, IGNORE_UNKNOWN_OPTIONS etc can be passed to fine tune the behavior of glfs_init. 3. If pub_xlator_set_options is specific to mount, what happens if someone else changes a global option? Is the current option remembered and carried forward in new graph too after gfapi receives graph change notification from glusterd? regards, Raghavendra. > > Regards, > Poornima > > ----- Original Message ----- > > From: "Raghavendra Gowdappa" <rgowdapp@xxxxxxxxxx> > > To: "Poornima Gurusiddaiah" <pgurusid@xxxxxxxxxx>, "Raghavendra Talur" > > <rtalur@xxxxxxxxxx> > > Cc: "Gluster Devel" <gluster-devel@xxxxxxxxxxx>, "Jeff Cody" > > <jcody@xxxxxxxxxx>, "Rajesh Joseph" <rjoseph@xxxxxxxxxx> > > Sent: Monday, May 9, 2016 8:45:56 AM > > Subject: xlator option setting in gfapi > > > > Hi Poornima/Raghavendra, > > > > This mail is an initiation of a thread to discuss how to make xlator > > options > > setting in gfapi synchronous (so, that caller will know the result) or > > providing a cbk to let the application know about the status. > > > > My very naive attempt of code-reading showed me that > > pub_glfs_set_xlator_option just adds the option to cmd_args.xlator_options. > > Can you please explain how/when these values are communicated to glusterd > > to > > change volfile? From there we can carry forward the conversation. > > > > regards, > > Raghavendra > > > _______________________________________________ Gluster-devel mailing list Gluster-devel@xxxxxxxxxxx http://www.gluster.org/mailman/listinfo/gluster-devel