Change in ...nfs-ganesha[next]: Allow EXPORT pseudo path to be changed during export update
by Frank Filz (GerritHub)
Frank Filz has uploaded this change for review. ( https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/490334 )
Change subject: Allow EXPORT pseudo path to be changed during export update
......................................................................
Allow EXPORT pseudo path to be changed during export update
This also fully allows adding or removing NFSv4 support from an export
since we can now handle the PseudoFS swizzing that occurs.
Note that an explicit PseudoFS export may be removed or added, though
you can not change it from export_id 0 because we currently don't allow
changing the export_id.
Note that this patch doesn't handle DBUS add or remove export though
that is an option to improve. I may add them to this patch (it wouldn't
be that hard) but I want to get this reviewed as is right now.
There are implications to a client of changing the PseudoFS. I have
tested moving an export in the PseudoFS with a client mounted. The
client will be able to continue accessing the export, though it may
see an ESTALE error if it navigates out of the export. The current
working directory will go bad and the pwd comment will fail indicating
a disconnected mount. I have also seen referencing .. from the root of
the export wrapping around back to the root (I believe this is how
disconnected mounts are set up).
FSAL_PSEUDO lookups and create handles (PUTFH or any use of an NFSv3
handle where the inode isn't cached) which fail during an export update
are instead turned into ERR_FSAL_DELAY which turns into NFS4ERR_DELAY or
NFS3ERR_JUKEBOX to force the client to retry under the completed update.
Change-Id: I507dc17a651936936de82303ff1291677ce136be
Signed-off-by: Frank S. Filz <ffilzlnx(a)mindspring.com>
---
M src/FSAL/FSAL_PSEUDO/handle.c
M src/MainNFSD/libganesha_nfsd.ver
M src/Protocols/NFS/nfs4_pseudo.c
M src/include/export_mgr.h
M src/include/nfs_proto_functions.h
M src/support/export_mgr.c
M src/support/exports.c
7 files changed, 560 insertions(+), 203 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/34/490334/1
--
To view, visit https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/490334
To unsubscribe, or for help writing mail filters, visit https://review.gerrithub.io/settings
Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-Change-Id: I507dc17a651936936de82303ff1291677ce136be
Gerrit-Change-Number: 490334
Gerrit-PatchSet: 1
Gerrit-Owner: Frank Filz <ffilzlnx(a)mindspring.com>
Gerrit-MessageType: newchange
10 months
Monitoring in Ganesha?
by Bjorn Leffler
Apart from the counters that you can access through dbus, is there any
other monitoring built into Ganesha?
I'm thinking of adding it with this higher level plan:
- Exporting metrics from Ganesha to Prometheus.
- Aggregate data in Prometheus.
- Display monitoring consoles and graphs with Grafana.
- Package up Prometheus, Grafana and the preconfigured rules/dashboards as
a Docker image.
- This makes it straightforward to deploy monitoring alongside a Gansha
binary.
My rough coding plan for the code is to:
- Add a USE_MONITORING directive to the CMakeLists.txt files.
- Add a build dependency to the Prometheus C client
<https://github.com/digitalocean/prometheus-client-c>.
- Create a src/monitoring directory for the new source files and templates.
- Increment counters and timers throughout the code.
- Use histograms to compute latency percentiles, heatmaps, etc.
Is this a good idea? Any objections or suggestions?
Thanks,
Bjorn
3 years
Change in ...nfs-ganesha[next]: Get time_delta from FSAL dynamic fsinfo
by Frank Filz (GerritHub)
Frank Filz has uploaded this change for review. ( https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/523214 )
Change subject: Get time_delta from FSAL dynamic fsinfo
......................................................................
Get time_delta from FSAL dynamic fsinfo
Note that this change by itself doesn't do much. All in-tree FSALs
report 1 second time_delta...
Change-Id: I259eaa032fcc90e5e4d9b90d0ec7a3c3e9231ef1
Signed-off-by: Frank S. Filz <ffilzlnx(a)mindspring.com>
---
M src/Protocols/NFS/nfs3_fsinfo.c
M src/Protocols/NFS/nfs_proto_tools.c
2 files changed, 30 insertions(+), 7 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/14/523214/1
--
To view, visit https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/523214
To unsubscribe, or for help writing mail filters, visit https://review.gerrithub.io/settings
Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-Change-Id: I259eaa032fcc90e5e4d9b90d0ec7a3c3e9231ef1
Gerrit-Change-Number: 523214
Gerrit-PatchSet: 1
Gerrit-Owner: Frank Filz <ffilzlnx(a)mindspring.com>
Gerrit-MessageType: newchange
3 years, 3 months
VFS FSAL : directory remove problem
by Rahul Deshmukh
Hello All,
This is regarding the problem observed in nfs ganesha. The problem is when
one try to
remove the directory (in case of VFS FSAL) it returned with an error
"Device or
resource busy".Interestingly it mount that directory at client side.
I have investigated this problem and found out that the fsid is getting
changed and hence
problem is when we try to remove the directory. Further investigation
revealed that problem
actually happening at the time of directory creation time.
Following is portion of code from makedir()
--------------->8--------------------------
❘⠀⠀⠀if (attrib->valid_mask) {
❘⠀⠀⠀❘⠀⠀⠀/* Now per support_ex API, if there are any other attributes
❘⠀⠀⠀❘⠀⠀⠀ * set, go ahead and get them set now.
❘⠀⠀⠀❘⠀⠀⠀ */
❘⠀⠀⠀❘⠀⠀⠀status = (*handle)->obj_ops->setattr2(*handle, false, NULL,
❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀ attrib);
❘⠀⠀⠀❘⠀⠀⠀if (FSAL_IS_ERROR(status)) {
❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀/* Release the handle we just allocated. */
❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀LogFullDebug(COMPONENT_FSAL,
❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀ "setattr2 status=%s",
❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀ fsal_err_txt(status));
❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀(*handle)->obj_ops->release(*handle);
❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀*handle = NULL;
❘⠀⠀⠀❘⠀⠀⠀} else if (attrs_out != NULL) {
❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀status = (*handle)->obj_ops->getattrs(*handle,
❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀ attrs_out);
❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀if (FSAL_IS_ERROR(status) &&
❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀ (attrs_out->request_mask & ATTR_RDATTR_ERR) == 0) {
❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀/* Get attributes failed and caller expected
❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀ * to get the attributes.
❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀ */
❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀goto fileerr;
❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀}
❘⠀⠀⠀❘⠀⠀⠀}
❘⠀⠀⠀} else {
❘⠀⠀⠀❘⠀⠀⠀status.major = ERR_FSAL_NO_ERROR;
❘⠀⠀⠀❘⠀⠀⠀status.minor = 0;
❘⠀⠀⠀❘⠀⠀⠀if (attrs_out != NULL) {
❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀/* Since we haven't set any attributes other than what
❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀ * was set on create, just use the stat results we used
❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀ * to create the fsal_obj_handle.
❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀ */
❘⠀⠀⠀❘⠀⠀⠀❘⠀⠀⠀posix2fsal_attributes_all(&stat, attrs_out); <=========
❘⠀⠀⠀❘⠀⠀⠀}
----------------->8--------------------------
It is observed that when we create a directory (VFS FSAL case) we land in
else block and
we set the fsid using device major and minor number irrespective of fsid
type or even
fsid_device setting. Because of this mdcache entry has a fsid setting where
device major
and minor number is used. This causes the directory removal operation to
fail.
This code change is added by following commit :
--------------->8--------------------------
commit de7f5712c898d9f5b51a8188cbee5282a9b9d533
Author: Frank S. Filz <ffilzlnx(a)mindspring.com>
Date: Wed Jun 15 09:34:14 2016 -0700
Pass attributes out on fsal_obj_handle create and readdir
When an FSAL object is created, most FSALs must get the file attributes
in order to properly create the fsal_obj_handle, in this case, since
many
callers (including MDCACHE) will need attributes, it makes sense to pass
them up instead of having an additional getattrs call.
The same can be said of readdir, so go ahead an pass the attributes up
on the call back.
MDCACHE has also been somewhat re-organized to perform cached object
creates in the same way as much as makes sense.
Change-Id: Ia89bb16356fa5117169e80b66b7d27e0a6a0e23e
Signed-off-by: Frank S. Filz <ffilzlnx(a)mindspring.com>
---------------->8--------------------------
Looks like mkdir is one of the operations affected. Though I have not
tested others.
One possible solution, I think, is to fill fsid based on fsid_device global
setting
Or maybe call getattr blindly. I have tested getattr call instead of using
stat data.
Please suggest.
Thanks,
Rahul.
3 years, 3 months
Announce Push of V4-dev.72
by Frank Filz
Branch next
Tag:V4-dev.72
Merge Highlights
* Fix crash when trying to export a VFS directory that doesn't exist
Signed-off-by: Frank S. Filz <ffilzlnx(a)mindspring.com>
Contents:
be092f7e5 Frank S. Filz V4-dev.72
fcfd5bab9 Frank S. Filz Fix crash when trying to export a VFS directory that
doesn't exist
3 years, 3 months
Announce Push of V4-dev.71
by Frank Filz
Branch next
Tag:V4-dev.71
Merge Highlights
* Fix issues with op_ctx->client being NULL
Signed-off-by: Frank S. Filz <ffilzlnx(a)mindspring.com>
Contents:
6e41c2210 Frank S. Filz V4-dev.71
10e60b6d6 Frank S. Filz FSAL_GLUSTER: replace SET_GLUSTER_CREDS with smarter
macros
cba557ea2 Frank S. Filz Set op_ctx->client for NLM or NFSv4 locks if not set
in op_ctx
3 years, 4 months