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
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, 2 months
GPFS LogCrit on lock_op2
by Frank Filz
On the call, I mentioned I would look at bypassing permission check for the
file owner for the open_func call in fsal_find_fd with open_for_locks.
It turns out there is a difference between FSAL_GPFS and FSAL_VFS
FSAL_VFS makes the ultimate call to open_by_handle as root, and therefor
even a non-owner of the file will not be an issue in opening the file
read/write.
GPFS calls GPFSFSAL_open which calls fsal_set_credentials so if the
permissions do not allow read/write when open_for_locks occurs, then the
file will instead be opened in the same mode as the OPEN stateid.
I think it would be good to evaluate when GPFSFSAL_open actually needs to be
called, and whether open_func should make a more direct call to
fsal_internal_handle2fd.
Frank
5 years, 2 months
MDCACHE Crash with V2.7.4
by Rungta, Vandana
Nfs-ganesha V2.7.4 with the following MDCACHE patches applied:
https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/457970
https://github.com/nfs-ganesha/nfs-ganesha/commit/c98ad1e238f5db9db5ab8db...
https://github.com/nfs-ganesha/nfs-ganesha/commit/136df4f262c3f9bc29df456...
Crash when freeing a dirent.
(gdb) bt
#0 0x00007fe0a2084277 in raise () from /lib64/libc.so.6
#1 0x00007fe0a2085968 in abort () from /lib64/libc.so.6
#2 0x00007fe0a20c6d97 in __libc_message () from /lib64/libc.so.6
#3 0x00007fe0a20cf4f9 in _int_free () from /lib64/libc.so.6
#4 0x0000000000543e9c in gsh_free (p=0x1b72140) at /src/src/include/abstract_mem.h:246
#5 0x0000000000544b0c in mdcache_avl_remove (parent=0x1b17000, dirent=0x1b72140)
at /src/src/FSAL/Stackable_FSALs/FSAL_MDCACHE/mdcache_avl.c:240
#6 0x0000000000545e4d in mdcache_avl_clean_trees (parent=0x1b17000)
at /src/src/FSAL/Stackable_FSALs/FSAL_MDCACHE/mdcache_avl.c:614
#7 0x000000000053a11b in mdcache_dirent_invalidate_all (entry=0x1b17000)
at /src/src/FSAL/Stackable_FSALs/FSAL_MDCACHE/mdcache_helpers.c:606
#8 0x0000000000541b15 in mdcache_readdir_chunked (directory=0x1b17000, whence=5012127, dir_state=0x7fe097debaf0,
cb=0x4323ed <populate_dirent>, attrmask=0, eod_met=0x7fe097debfeb)
at /src/src/FSAL/Stackable_FSALs/FSAL_MDCACHE/mdcache_helpers.c:2864
#9 0x000000000053054c in mdcache_readdir (dir_hdl=0x1b17038, whence=0x7fe097debad0, dir_state=0x7fe097debaf0,
cb=0x4323ed <populate_dirent>, attrmask=0, eod_met=0x7fe097debfeb)
at /src/src/FSAL/Stackable_FSALs/FSAL_MDCACHE/mdcache_handle.c:559
#10 0x0000000000432d14 in fsal_readdir (directory=0x1b17038, cookie=5012127, nbfound=0x7fe097debfec,
eod_met=0x7fe097debfeb, attrmask=0, cb=0x491d35 <nfs3_readdir_callback>, opaque=0x7fe097debfa0)
at /src/src/FSAL/fsal_helper.c:1164
#11 0x0000000000491b1d in nfs3_readdir (arg=0x1e12508, req=0x1e11e00, res=0x1be41e0)
at /src/src/Protocols/NFS/nfs3_readdir.c:289
#12 0x0000000000457c16 in nfs_rpc_process_request (reqdata=0x1e11e00) at /src/src/MainNFSD/nfs_worker_thread.c:1328
#13 0x00000000004583d5 in nfs_rpc_valid_NFS (req=0x1e11e00) at /src/src/MainNFSD/nfs_worker_thread.c:1548
#14 0x00007fe0a3821034 in svc_vc_decode (req=0x1e11e00) at /src/src/libntirpc/src/svc_vc.c:829
#15 0x000000000044adc5 in nfs_rpc_decode_request (xprt=0x1b040e0, xdrs=0x1be4000)
at /src/src/MainNFSD/nfs_rpc_dispatcher_thread.c:1345
#16 0x00007fe0a3820f45 in svc_vc_recv (xprt=0x1b040e0) at /src/src/libntirpc/src/svc_vc.c:802
#17 0x00007fe0a381d689 in svc_rqst_xprt_task (wpe=0x1b042f8) at /src/src/libntirpc/src/svc_rqst.c:769
#18 0x00007fe0a381dae6 in svc_rqst_epoll_events (sr_rec=0x1ae45f0, n_events=1)
at /src/src/libntirpc/src/svc_rqst.c:941
#19 0x00007fe0a381dd7b in svc_rqst_epoll_loop (sr_rec=0x1ae45f0) at /src/src/libntirpc/src/svc_rqst.c:1014
---Type <return> to continue, or q <return> to quit---q
Quit
(gdb) select-frame 5
(gdb) info args
parent = 0x1b17000
dirent = 0x1b72140
(gdb) info locals
chunk = 0x1b4b510
__func__ = "mdcache_avl_remove"
(gdb) print *chunk
$1 = {chunks = {next = 0x1b172a0, prev = 0x1b172a0}, dirents = {next = 0x1b29930, prev = 0x1bc2840},
parent = 0x1b17000, chunk_lru = {q = {next = 0x0, prev = 0x0}, qid = LRU_ENTRY_L1, refcnt = 0, flags = 0,
lane = 16, cf = 0}, reload_ck = 5012127, next_ck = 0, num_entries = 297}
(gdb) print *dirent
$2 = {chunk_list = {next = 0x0, prev = 0x0}, chunk = 0x0, node_name = {left = 0x0, right = 0x0, parent = 28852730},
node_ck = {left = 0x1b78ff0, right = 0x1b68970, parent = 28718322}, node_sorted = {left = 0x0, right = 0x0,
parent = 0}, ck = 5019809, eod = false, namehash = 6207075547366218433, ckey = {hk = 15362064496009940491,
fsal = 0x7fe09f949080 <FOO>, kv = {addr = 0x0, len = 0}}, flags = 0, entry = 0x0, name = 0x1b721f0 "random.37",
name_buffer = 0x1b721f0 "random.37"}
(gdb)
I am happy to provide any additional debug info you want from the core.
Thanks,
Vandana
5 years, 5 months
2.7.4 core in mdcache (includes the patches)
by Rungta, Vandana
Daniel,
Core in mdcache when mdcache_lru_unref_chunk. Ref count is 0.
I started these tests 10 days ago with all the mdcache patches including the one moving the unref_chunk in readdir_chunked to inside the lock. The test continues to readdir over 5 million entries while writing/reading/deleting content. I have 2 test setups – both using a Windows client that hit this core.
Let me know if there is additional information you need from the cores.
Thanks,
Vandana
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `bin/ganesha.nfsd -f etc/ganesha/ganesha.conf -p var/run/ganesha.pid -F'.
Program terminated with signal 11, Segmentation fault.
#0 0x00007fbd14d39c40 in pthread_mutex_lock () from /lib64/libpthread.so.0
Missing separate debuginfos, use: debuginfo-install sgw-nfs-ganesha-2.0.93.0-1.x86_64
(gdb) bt
#0 0x00007fbd14d39c40 in pthread_mutex_lock () from /lib64/libpthread.so.0
#1 0x000000000052af4a in _mdcache_lru_unref_chunk (chunk=0x3836d1a0, func=0x598a00 <__func__.23678> "mdcache_readdir_chunked", line=3133)
at /src/src/FSAL/Stackable_FSALs/FSAL_MDCACHE/mdcache_lru.c:2058
#2 0x0000000000542d84 in mdcache_readdir_chunked (directory=0x664fa280, whence=37935356, dir_state=0x7fbd0a3dfaf0,
cb=0x4323ed <populate_dirent>, attrmask=0, eod_met=0x7fbd0a3dffeb) at /src/src/FSAL/Stackable_FSALs/FSAL_MDCACHE/mdcache_helpers.c:3133
#3 0x000000000053054c in mdcache_readdir (dir_hdl=0x664fa2b8, whence=0x7fbd0a3dfad0, dir_state=0x7fbd0a3dfaf0, cb=0x4323ed <populate_dirent>,
attrmask=0, eod_met=0x7fbd0a3dffeb) at /src/src/FSAL/Stackable_FSALs/FSAL_MDCACHE/mdcache_handle.c:559
#4 0x0000000000432d14 in fsal_readdir (directory=0x664fa2b8, cookie=37935356, nbfound=0x7fbd0a3dffec, eod_met=0x7fbd0a3dffeb, attrmask=0,
cb=0x491d35 <nfs3_readdir_callback>, opaque=0x7fbd0a3dffa0) at /src/src/FSAL/fsal_helper.c:1164
#5 0x0000000000491b1d in nfs3_readdir (arg=0xa8fc5d48, req=0xa8fc5640, res=0xa32fbb30) at /src/src/Protocols/NFS/nfs3_readdir.c:289
#6 0x0000000000457c16 in nfs_rpc_process_request (reqdata=0xa8fc5640) at /src/src/MainNFSD/nfs_worker_thread.c:1328
#7 0x00000000004583d5 in nfs_rpc_valid_NFS (req=0xa8fc5640) at /src/src/MainNFSD/nfs_worker_thread.c:1548
#8 0x00007fbd15d14034 in svc_vc_decode (req=0xa8fc5640) at /src/src/libntirpc/src/svc_vc.c:829
#9 0x000000000044adc5 in nfs_rpc_decode_request (xprt=0x7ae54c90, xdrs=0x36434390) at /src/src/MainNFSD/nfs_rpc_dispatcher_thread.c:1345
#10 0x00007fbd15d13f45 in svc_vc_recv (xprt=0x7ae54c90) at /src/src/libntirpc/src/svc_vc.c:802
#11 0x00007fbd15d10689 in svc_rqst_xprt_task (wpe=0x7ae54ea8) at /src/src/libntirpc/src/svc_rqst.c:769
#12 0x00007fbd15d10ae6 in svc_rqst_epoll_events (sr_rec=0x1acd4d0, n_events=1) at /src/src/libntirpc/src/svc_rqst.c:941
#13 0x00007fbd15d10d7b in svc_rqst_epoll_loop (sr_rec=0x1acd4d0) at /src/src/libntirpc/src/svc_rqst.c:1014
#14 0x00007fbd15d10e2e in svc_rqst_run_task (wpe=0x1acd4d0) at /src/src/libntirpc/src/svc_rqst.c:1050
#15 0x00007fbd15d197f6 in work_pool_thread (arg=0x75491e70) at /src/src/libntirpc/src/work_pool.c:181
#16 0x00007fbd14d37de5 in start_thread () from /lib64/libpthread.so.0
#17 0x00007fbd1463ef1d in clone () from /lib64/libc.so.6
(gdb) select-frame 1
(gdb) info locals
rc = 32701
refcnt = 171833376
lane = 268435456
qlane = 0xe007e24e0
__func__ = "_mdcache_lru_unref_chunk"
(gdb) info args
chunk = 0x3836d1a0
func = 0x598a00 <__func__.23678> "mdcache_readdir_chunked"
line = 3133
(gdb) print *chunk
$1 = {chunks = {next = 0xed43cd15, prev = 0xa386010002000000}, dirents = {next = 0x300000003000000, prev = 0x1c00000001000000},
parent = 0x7000000aaaaaaaa, chunk_lru = {q = {next = 0x6e776f6e6b6e75, prev = 0xfefffffffeffffff}, qid = LRU_ENTRY_NONE, refcnt = 0,
flags = 0, lane = 268435456, cf = 16777283}, reload_ck = 1099511627778, next_ck = 7236828793636126720, num_entries = 841903471}
(gdb) select-frame 2
(gdb) info locals
status = {major = ERR_FSAL_NOENT, minor = 0}
cb_result = DIR_CONTINUE
entry = 0x0
attrs = {request_mask = 0, valid_mask = 1433550, supported = 1433582, type = REGULAR_FILE, filesize = 51682, fsid = {major = 0, minor = 0},
acl = 0x0, fileid = 37935372, mode = 493, numlinks = 1, owner = 4294967294, group = 4294967294, rawdev = {major = 0, minor = 0}, atime = {
tv_sec = 1561811134795000, tv_nsec = 0}, creation = {tv_sec = 0, tv_nsec = 0}, ctime = {tv_sec = 1561811134795000, tv_nsec = 0}, mtime = {
tv_sec = 1561795757, tv_nsec = 842000000}, chgtime = {tv_sec = 1561811134795000, tv_nsec = 0}, spaceused = 51682,
change = 1561811134795000000, generation = 0, expire_time_attr = 60, fs_locations = 0x0, sec_label = {slai_lfs = {lfs_lfs = 0, lfs_pi = 0},
slai_data = {slai_data_len = 0, slai_data_val = 0x0}}}
dirent = 0xa57f3030
has_write = true
set_first_ck = false
next_ck = 37935375
look_ck = 37935377
chunk = 0x3836d1a0
first_pass = true
eod = false
reload_chunk = false
__func__ = "mdcache_readdir_chunked"
__PRETTY_FUNCTION__ = "mdcache_readdir_chunked"
(gdb) info args
directory = 0x664fa280
whence = 37935356
dir_state = 0x7fbd0a3dfaf0
cb = 0x4323ed <populate_dirent>
attrmask = 0
eod_met = 0x7fbd0a3dffeb
(gdb)
5 years, 5 months
V2.8.1 not tagged yet
by Frank Filz
Matt mentioned he had one patch he's working on finishing up. I thought I'd
wait for that before tagging V2.8.1.
We can make a quick merge next week if it makes sense.
Frank
5 years, 5 months
Announce Push of V2.8.0.3
by Frank Filz
Branch next
Tag:V2.8.0.3
Release Highlights
* MDCACHE - several readdir fixes for whence_is_name
* FSAL_VFS: If lookup crosses into unknown filesystem reload and claim
* selinux: add portmap access
* Several fixes to issues coverity exposed
* Handle deleting open state before lock state
* ganesha_stats gets a new option to capture authentication statistics
* dbus command to display version of running Ganesha
Signed-off-by: Frank S. Filz <ffilzlnx(a)mindspring.com>
Contents:
1e2989d Frank S. Filz V2.8.0.3
295c86c Nicolas Belouin Add show_version to ganesha_mgr
df1e579 Nicolas Belouin Add dbus entries for version display
86464b4 Trishali Nayar ganesha_stats gets a new option to capture
authentication statistics
1e90df5 Suhrud Patankar Handle deleting open state before lock state
a790b15 Kaleb S. KEITHLEY coverity: string is not null terminated
6161d20 Kaleb S. KEITHLEY coverity: unused value in posix_acl_2_fsal_acl()
05f6c72 Kaleb S. KEITHLEY coverity: uninitialized variable in
nlm_send_async()
9abafcd Kaleb S. KEITHLEY selinux: add portmap access
a5c6111 Frank S. Filz FSAL_VFS: If lookup crosses into unknown filesystem
reload and claim
e306c01 Daniel Gryniewicz MDCACHE - Hold lock while dropping ref on chunk
ac5742d Daniel Gryniewicz MDCACHE - delay invalidate of dir for
whence-is-name
d0f9e95 Daniel Gryniewicz MDCACHE - add a name-cookie mapping for
whence-is-name
5 years, 5 months
Change in ...nfs-ganesha[next]: FSAL_VFS: If lookup crosses into unknown filesystem reload and claim
by Frank Filz (GerritHub)
Frank Filz has uploaded this change for review. ( https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/459830
Change subject: FSAL_VFS: If lookup crosses into unknown filesystem reload and claim
......................................................................
FSAL_VFS: If lookup crosses into unknown filesystem reload and claim
If a lookup crosses into an unknown filesystem, then reload the
filesystems and allow FSAL_VFS to claim the filesystem.
Change-Id: Ib4f8e6a12015907cae3a00ab5cb600aac9e08073
Signed-off-by: Frank S. Filz <ffilzlnx(a)mindspring.com>
---
M src/FSAL/FSAL_VFS/handle.c
M src/FSAL/FSAL_VFS/vfs_methods.h
M src/FSAL/commonlib.c
M src/MainNFSD/libganesha_nfsd.ver
M src/include/FSAL/fsal_commonlib.h
5 files changed, 174 insertions(+), 59 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/30/459830/1
--
To view, visit https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/459830
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: Ib4f8e6a12015907cae3a00ab5cb600aac9e08073
Gerrit-Change-Number: 459830
Gerrit-PatchSet: 1
Gerrit-Owner: Frank Filz <ffilzlnx(a)mindspring.com>
Gerrit-MessageType: newchange
5 years, 5 months
Change in ...nfs-ganesha[next]: coverity: unused value in posix_acl_2_fsal_acl()
by Kaleb KEITHLEY (GerritHub)
Kaleb KEITHLEY has uploaded this change for review. ( https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/459783
Change subject: coverity: unused value in posix_acl_2_fsal_acl()
......................................................................
coverity: unused value in posix_acl_2_fsal_acl()
ret is set at line 386, and set again at line 392 without checking
its value anywhere inbetween
Also fix typos
Signed-off-by: Kaleb S. KEITHLEY <kkeithle(a)redhat.com>
Change-Id: Id8dd61484e66d7f6618673bfe5a1eb6de8db1177
---
M src/FSAL/posix_acls.c
1 file changed, 7 insertions(+), 2 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/83/459783/1
--
To view, visit https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/459783
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: Id8dd61484e66d7f6618673bfe5a1eb6de8db1177
Gerrit-Change-Number: 459783
Gerrit-PatchSet: 1
Gerrit-Owner: Kaleb KEITHLEY <kaleb(a)redhat.com>
Gerrit-MessageType: newchange
5 years, 5 months
Change in ...nfs-ganesha[next]: selinux: add portmap access
by Kaleb KEITHLEY (GerritHub)
Kaleb KEITHLEY has uploaded this change for review. ( https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/459656
Change subject: selinux: add portmap access
......................................................................
selinux: add portmap access
Nominally for RHEL7.7 and later. Probably also RHEL8.1 and later.
Signed-off-by: Kaleb S. KEITHLEY <kkeithle(a)redhat.com>
Change-Id: I564b69ba4ebcd7da6d44479f5f7ef3f6e2556267
---
M src/selinux/ganesha.te
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/56/459656/1
--
To view, visit https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/459656
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: I564b69ba4ebcd7da6d44479f5f7ef3f6e2556267
Gerrit-Change-Number: 459656
Gerrit-PatchSet: 1
Gerrit-Owner: Kaleb KEITHLEY <kaleb(a)redhat.com>
Gerrit-MessageType: newchange
5 years, 5 months