-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
fuse, meta: make fuse options adjustable via .meta #2891
Conversation
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.
@csabahenk overall this looks good. Is it possible to add a test case for testing this feature?
TUN_LOCK(priv); | ||
fopen_keep_cache = priv->fopen_keep_cache; | ||
TUN_UNLOCK(priv); |
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.
It makes no sense to use a mutex just to load a flag. An atomic load should be enough. As soon as we leave the mutex, the value may have changed, so the potential races on the following code are the same as using the atomic.
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.
Good idea, I'll consult you how to go about this.
@amarts The latest revision includes the test case. |
4bdc651
to
bf1f312
Compare
The .meta synthetic tree features the options entry for each xlator, which lets us see the options with which the translator was configured. Technically, 'options' exports the options dict with which the given xlator has been configured. This approach provides read-only access to the xlator options, and only those options are visible which has been set. We implement an alternative options entry (referred to as 'adjustable options' in the sequel) that exports the full option set of the xlator. We extended the volume_options stucture wih 'fetch' and 'update' methods, that facilitate access to the realtime values of the xlator options. In the adjustable options dict each option is readable which has 'fetch' and if they have 'update' too, then they shall be writable (this is properly reflected in file modes since 2554080). While the dict-based options is generic and provides an export mechanism for xlator options without specific support from the xlators, adjustable options will export only those options for which the xlator implements fetch/update. We made this effort for the fuse xlator, which is positioned in glusterfs client as the root of the xlator tree, and thus can't be 'hot-swapped' like other xlators via graph switch. All the fuse options obained 'fetch'; and the ones where runtime update is possible also 'update' (ie. those which control the internal behavior of the filesystem server, can be updated; the ones which are mount options or init options for the FUSE infrastucture, can't). Change-Id: I72cb0f3c2f93712cd08147a4ae2e076354d8d9d8 Fixes: gluster#1785 Signed-off-by: Csaba Henk <csaba@redhat.com>
Thank you for your contributions. |
Closing this issue as there was no update since my last update on issue. If this is an issue which is still valid, feel free to open it. |
The .meta synthetic tree features the options entry
for each xlator, which lets us see the options with
which the translator was configured. Technically,
'options' exports the options dict with which the
given xlator has been configured. This approach
provides read-only access to the xlator options,
and only those options are visible which has been
set.
We implement an alternative options entry (referred
to as 'aadjustable options' in the sequel) that
exports the full option set of the xlator. We
extended the volume_options stucture wih 'fetch'
and 'update' methods, that facilitate access to
the realtime values of the xlator options. In
the adjustable options dict each option is readable
which has 'fetch' and if they have 'update' too,
then they shall be writable (this is properly
reflected in file modes since 2554080).
While the dict-based options is generic and provides
an export mechanism for xlator options without specific
support from the xlators, adjustable options will export
only those options for which the xlator implements
fetch/update.
We made this effort for the fuse xlator, which is positioned
in glusterfs client as the root of the xlator tree, and thus
can't be 'hot-swapped' like other xlators via graph switch.
All the fuse options obained 'fetch'; and the ones where
runtime update is possible also 'update' (ie. those which
control the internal behavior of the filesystem server, can
be updated; the ones which are mount options or init options
for the FUSE infrastucture, can't).
Change-Id: I72cb0f3c2f93712cd08147a4ae2e076354d8d9d8
Fixes: #1785
Signed-off-by: Csaba Henk csaba@redhat.com