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, 1 week
Change in ...nfs-ganesha[next]: MDCACHE - Add MDCACHE {} config block
by Daniel Gryniewicz (GerritHub)
Daniel Gryniewicz has uploaded this change for review. ( https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/454929
Change subject: MDCACHE - Add MDCACHE {} config block
......................................................................
MDCACHE - Add MDCACHE {} config block
Add a config block name MDCACHE that is a copy of CACHEINODE. Both can
be configured, but MDCACHE will override CACHEINODE. This allows us to
deprecate CACHEINODE.
Change-Id: I49012723132ae6105b904a60d1a96bb2bf78d51b
Signed-off-by: Daniel Gryniewicz <dang(a)fprintf.net>
---
M src/FSAL/Stackable_FSALs/FSAL_MDCACHE/mdcache_read_conf.c
M src/config_samples/ceph.conf
M src/config_samples/config.txt
M src/config_samples/ganesha.conf.example
M src/doc/man/ganesha-cache-config.rst
M src/doc/man/ganesha-config.rst
6 files changed, 31 insertions(+), 7 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/29/454929/1
--
To view, visit https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/454929
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: I49012723132ae6105b904a60d1a96bb2bf78d51b
Gerrit-Change-Number: 454929
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Gryniewicz <dang(a)redhat.com>
Gerrit-MessageType: newchange
4 years, 1 month
Issues seen with krb5i and krb5p mounts
by Trishali Nayar
Hi all,
There are a few clients eg- Ubuntu 18.04.3 (4.15.0-55-generic) and RH7.8
(3.10.0-1127.el7.x86_64) for which we have observed... simple command like
'dd' either hangs or returns EIO. This is happening only on krb5i and krb5p
mounts. It seems to happen for file sizes eg- 100MB and larger mostly. But
sometimes even a 30 MB file sees failures.
A client eg- RH7.6 (3.10.0-957.el7.x86_64) does not seem to hit this
issue...so might be with more recent kernels?
We fixed the issue with check-in
https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/490802 The idea was to
let clients know that Ganesha denied the request VS just dropping the
request.
This fix did seem to help and hangs/errors stopped completely... but for
larger file sizes eg- 1000MB we started seeing "Permission Denied" errors.
This was different than the EIO errors seen earlier. Reason could be we are
now sending an "AUTH DENIED" error so clients translate it to this new
error.
We tried to add more logging into Ganesha and observe that these particular
clients seem to send a lot of requests together. When we process same, the
sequence no. is pretty much out or order and we drop the requests outside
the sequence window, as per the RFC 2203 Section 7.2.1. The sequence window
that we have is 32.
Testing these clients with kNFS does not hit the issue...The kNFS sequence
window seems to be larger and is 128.
So, tried to increase the sequence window as well to 128 for ganesha. That
does not seem to help fix the issue.
We also have below additional 'seqmask' check and many of the requests went
into that category as well and were dropped.
"libntirpc/src/svc_auth_gss.c":
} else if (offset >= gd->win || (gd->seqmask & (1 << offset))) {
*no_dispatch = true;
goto gd_free;
}
Also observed that now these clients sent many requests above the 128
window...which we would again drop.
Wondering what is the proper way to fix this and any idea on what these
clients are doing different.
Thanks and regards,
Trishali.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Trishali Nayar
IBM Systems
ETZ, Pune.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4 years, 2 months
lseek gets bad offset from nfs client with ganesha/gluster which supports SEEK
by Kinglong Mee
The latest ganesha/gluster supports seek according to,
https://tools.ietf.org/html/draft-ietf-nfsv4-minorversion2-41#section-15.11
From the given sa_offset, find the next data_content4 of type sa_what
in the file. If the server can not find a corresponding sa_what,
then the status will still be NFS4_OK, but sr_eof would be TRUE. If
the server can find the sa_what, then the sr_offset is the start of
that content. If the sa_offset is beyond the end of the file, then
SEEK MUST return NFS4ERR_NXIO.
For a file's filemap as,
Part 1: HOLE 0x0000000000000000 ---> 0x0000000000600000
Part 2: DATA 0x0000000000600000 ---> 0x0000000000700000
Part 3: HOLE 0x0000000000700000 ---> 0x0000000001000000
SEEK(0x700000, SEEK_DATA) gets result (sr_eof:1, sr_offset:0x70000) from ganesha/gluster;
SEEK(0x700000, SEEK_HOLE) gets result (sr_eof:0, sr_offset:0x70000) from ganesha/gluster.
If an application depends the lseek result for data searching, it may enter infinite loop.
while (1) {
next_pos = lseek(fd, cur_pos, seek_type);
if (seek_type == SEEK_DATA) {
seek_type = SEEK_HOLE;
} else {
seek_type = SEEK_DATA;
}
if (next_pos == -1) {
return ;
cur_pos = next_pos;
}
The lseek syscall always gets 0x70000 from nfs client for those two cases,
but, if underlying filesystem is ext4/f2fs, or the nfs server is knfsd,
the lseek(0x700000, SEEK_DATA) gets ENXIO.
I wanna to know,
should I fix the ganesha/gluster as knfsd return ENXIO for the first case?
or should I fix the nfs client to return ENXIO for the first case?
thanks,
Kinglong Mee
4 years, 3 months
Change in ...nfs-ganesha[next]: Test value before freeing response for TEST_STATEID.
by xijinyu (GerritHub)
xijinyu has uploaded this change for review. ( https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/496562 )
Change subject: Test value before freeing response for TEST_STATEID.
......................................................................
Test value before freeing response for TEST_STATEID.
When res->tsr_status_codes.tsr_status_codes_val is null,
gsh_free(res->tsr_status_codes.tsr_status_codes_val) will trigger abort
().
Signed-off-by: Xi Jinyu <xijinyu(a)cmss.chinamobile.com>
Change-Id: Iba8ddb4371d03a2cddd6100748f53bdbf99358db
---
M src/Protocols/NFS/nfs4_op_test_stateid.c
1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/62/496562/1
--
To view, visit https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/496562
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: Iba8ddb4371d03a2cddd6100748f53bdbf99358db
Gerrit-Change-Number: 496562
Gerrit-PatchSet: 1
Gerrit-Owner: xijinyu <xijinyu(a)cmss.chinamobile.com>
Gerrit-MessageType: newchange
4 years, 6 months
Announce Push of V4-dev.23
by Frank Filz
Branch next
Tag:V4-dev.23
Merge Highlights
* FSAL_CEPH: several changes related to including export_id in mdcache hash
* Several patches Clean up op_context management
* Make sure that gsh_export refcounting is correct
* Some symbol renaming to make debugging and code examination easier
* Dead code removal
* Make fullpath and pseudopath gsh_refstr and keep a ref in op_ctx
* FSAL_VFS: On create export, refresh file system table
* Allow EXPORT pseudo path to be changed during export update
Signed-off-by: Frank S. Filz <ffilzlnx(a)mindspring.com>
Contents:
ab6e3a2 Frank S. Filz V4-dev.23
100a7ed Frank S. Filz Get rid of dead code in include/sal_functions.h
0f92c51 Frank S. Filz RQUOTA: use the op_context from nfs_request_t
50b5ae5 Frank S. Filz Cleanup export refcounting for exports that are only
config objects
188a9c2 Frank S. Filz Add clarification about removal of cih_remove_checked
call in 0693097d6
b7f02fe Frank S. Filz Add some debug for working with exports
8189df1 Frank S. Filz Allow EXPORT pseudo path to be changed during export
update
7541e15 Frank S. Filz FSAL_VFS: On create export, refresh file system table
645cef6 Frank S. Filz Make fullpath and pseudopath gsh_refstr and keep a ref
in op_ctx
13fb285 Frank S. Filz Add gsh_refstr_dup function to simplify setting up a
refstr
ed5c6cf Frank S. Filz Move put_gsh_export(op_ctx->ctx_export) into
op_context functions
9a5f75d Frank S. Filz EXPORT: Cleanup iniital refcounting and alloc/free of
exports
9c72abe Frank S. Filz Add struct saved_export_context to standardize saving
op_ctx bits
067058a Frank S. Filz Assure and clarify references held for
op_ctx->ctx_export
5554586 Frank S. Filz Introduce set_op_context_export and
clear_op_context_export
64c0498 Frank S. Filz Eliminate extra function - unexport
e2e9957 Frank S. Filz Merge req_op_context and root_op_context and normalize
use
4969c8a Frank S. Filz FSAL: rename fullpath identifiers for easier code xref
fc15119 Frank S. Filz Add wrapper for pthread_mutex_trylock
e6baef3 Frank S. Filz Split state_lock into st_lock and jct_lock
a81dd76 Frank S. Filz Remove broken Copy export that was intended to restore
on update failure
0a56f58 Frank S. Filz Remove req_op_context parameters from FSAL API and
other functions
44d7611 Jeff Layton FSAL_CEPH: remove handle argument from ceph_close_my_fd
13799cf Jeff Layton FSAL_CEPH: drop export pointer from ceph_handle
a546719 Jeff Layton FSAL_CEPH: endian-convert wire handles
3f45eba Jeff Layton FSAL_CEPH: break up vinodeno_t in wire handle portion
e45743b Jeff Layton FSAL_CEPH: track export id as part of the host handle
5d3e202 Jeff Layton NFS: add an on-stack buffer for wire_to_host conversions
971bb2e Jeff Layton FSAL_CEPH: call fsal_attach_export last
4 years, 6 months
Change in ...nfs-ganesha[next]: FSAL_CEPH: drop export pointer from ceph_handle
by Jeff Layton (GerritHub)
Jeff Layton has uploaded this change for review. ( https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/496255 )
Change subject: FSAL_CEPH: drop export pointer from ceph_handle
......................................................................
FSAL_CEPH: drop export pointer from ceph_handle
Now that we're keeping different handles for different exports, we no
longer need to track to which export each handle belongs.
Change-Id: I9b152c8cc4f37ce57b23f2f9c846f42d7b1f1543
Signed-off-by: Jeff Layton <jlayton(a)redhat.com>
---
M src/FSAL/FSAL_CEPH/handle.c
M src/FSAL/FSAL_CEPH/internal.c
M src/FSAL/FSAL_CEPH/internal.h
3 files changed, 21 insertions(+), 24 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/55/496255/1
--
To view, visit https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/496255
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: I9b152c8cc4f37ce57b23f2f9c846f42d7b1f1543
Gerrit-Change-Number: 496255
Gerrit-PatchSet: 1
Gerrit-Owner: Jeff Layton <jlayton(a)redhat.com>
Gerrit-MessageType: newchange
4 years, 6 months