Change in ...nfs-ganesha[next]: WIP: CB_GETATTR implementation
by Soumya (GerritHub)
Soumya has uploaded this change for review. ( https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/441729
Change subject: WIP: CB_GETATTR implementation
......................................................................
WIP: CB_GETATTR implementation
This patch adds CB_GETATTR support. If a file is write delegated
to a client, for any getattr request by other clients, the server
should query and fetch the right size and change attributes of the file
using callback op "CB_GETATTR" before responding to other clients.
Change-Id: I402d80aad591d9e2ae51e3dd9c279b662dabe793
Signed-off-by: Soumya Koduri <skoduri(a)redhat.com>
---
M src/FSAL_UP/fsal_up_async.c
M src/FSAL_UP/fsal_up_top.c
M src/Protocols/NFS/nfs4_op_delegreturn.c
M src/Protocols/NFS/nfs4_op_getattr.c
M src/Protocols/NFS/nfs4_op_nverify.c
M src/Protocols/NFS/nfs4_op_verify.c
M src/Protocols/NFS/nfs_proto_tools.c
M src/SAL/state_deleg.c
M src/include/fsal_up.h
M src/include/nfs_proto_tools.h
M src/include/sal_data.h
M src/include/sal_functions.h
12 files changed, 532 insertions(+), 19 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/29/441729/1
--
To view, visit https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/441729
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: I402d80aad591d9e2ae51e3dd9c279b662dabe793
Gerrit-Change-Number: 441729
Gerrit-PatchSet: 1
Gerrit-Owner: Soumya <skoduri(a)redhat.com>
Gerrit-MessageType: newchange
5 years, 10 months
Change in ...nfs-ganesha[next]: WIP: Modify strmaxcpy definition to be more graceful!
by Malahal (GerritHub)
Malahal has uploaded this change for review. ( https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/441656
Change subject: WIP: Modify strmaxcpy definition to be more graceful!
......................................................................
WIP: Modify strmaxcpy definition to be more graceful!
Currently, strmaxcpy() doesn't change the dest buffer if the src buffer
couldn't be copied in full. This implies that the callers of strmaxcpy
should always check for the return code unless we known for sure that
the src length is small in which case we can use strcpy itself.
There are callers of strmaxcpy that don't check the return value because
they use the dest string for logging purposes only and are lazy.
Ideally, strlcpy is best suited for these callers but making strmaxcpy
behave like strlcpy (copying a truncated string) doesn't seem to have
any downsides. The current implementation of strmaxcpy also forces us to
scan the src string twice.
Change-Id: I06160ea14155a9000bdba4e331a5aa361921d255
Signed-off-by: Malahal Naineni <malahal(a)us.ibm.com>
---
M src/include/common_utils.h
1 file changed, 5 insertions(+), 4 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/56/441656/1
--
To view, visit https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/441656
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: I06160ea14155a9000bdba4e331a5aa361921d255
Gerrit-Change-Number: 441656
Gerrit-PatchSet: 1
Gerrit-Owner: Malahal <malahal(a)gmail.com>
Gerrit-MessageType: newchange
5 years, 10 months
Change in ...nfs-ganesha[next]: Add refcount to COMPOUND4res_extended to protect slot cache
by Frank Filz (GerritHub)
Frank Filz has uploaded this change for review. ( https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/441646
Change subject: Add refcount to COMPOUND4res_extended to protect slot cache
......................................................................
Add refcount to COMPOUND4res_extended to protect slot cache
A race between a SEQUENCE op resulting in a slot cache replay and
CREATE_SESSION or other session/slot cleanup can result in a crash.
This patch refcounts the responses to protect from this.
Change-Id: Ib68435296ba71fa423a9f8cf2c168684525721f0
Signed-off-by: Frank S. Filz <ffilzlnx(a)mindspring.com>
---
M src/MainNFSD/nfs_worker_thread.c
M src/Protocols/NFS/nfs4_Compound.c
M src/Protocols/NFS/nfs4_op_bind_conn.c
M src/Protocols/NFS/nfs4_op_create_session.c
M src/Protocols/NFS/nfs4_op_layoutget.c
M src/Protocols/NFS/nfs4_op_lock.c
M src/Protocols/NFS/nfs4_op_open.c
M src/Protocols/NFS/nfs4_op_sequence.c
M src/SAL/nfs41_session_id.c
M src/include/nfs_proto_data.h
M src/include/nfs_proto_functions.h
M src/include/sal_data.h
12 files changed, 162 insertions(+), 136 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/46/441646/1
--
To view, visit https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/441646
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: Ib68435296ba71fa423a9f8cf2c168684525721f0
Gerrit-Change-Number: 441646
Gerrit-PatchSet: 1
Gerrit-Owner: Frank Filz <ffilzlnx(a)mindspring.com>
Gerrit-MessageType: newchange
5 years, 10 months
Change in ...nfs-ganesha[next]: MDCACHE - Don't return dead entries from hashtable
by Daniel Gryniewicz (GerritHub)
Daniel Gryniewicz has uploaded this change for review. ( https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/441566
Change subject: MDCACHE - Don't return dead entries from hashtable
......................................................................
MDCACHE - Don't return dead entries from hashtable
When the refcount of an entry goes to zero, it's removed from the LRU
under the lane lock, and then the lane lock is dropped, and the entry is
cleaned up. This includes removing it from the hash table.
However, there is a window during which mdcache_find_keyed_reason() or
mdcache_new_entry() can find it from the hash table, and increment it's
refcount to 1. This causes it's refcount to go to zero again, recursing
into cih_remove_checked(), causing an assert.
Fix the hash table to not return an entry if it's refcount is zero.
Change-Id: I9a922a1fb54561f04d71cc83c0bcd3289ec854ae
Signed-off-by: Daniel Gryniewicz <dang(a)redhat.com>
---
M src/FSAL/Stackable_FSALs/FSAL_MDCACHE/mdcache_hash.h
1 file changed, 6 insertions(+), 0 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/66/441566/1
--
To view, visit https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/441566
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: I9a922a1fb54561f04d71cc83c0bcd3289ec854ae
Gerrit-Change-Number: 441566
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Gryniewicz <dang(a)redhat.com>
Gerrit-MessageType: newchange
5 years, 10 months
Change in ...nfs-ganesha[next]: 9P: finer grain control of building 9P support into RPMs
by Name of user not set (GerritHub)
kaleb(a)redhat.com has uploaded this change for review. ( https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/441553
Change subject: 9P: finer grain control of building 9P support into RPMs
......................................................................
9P: finer grain control of building 9P support into RPMs
Give user a 'with 9P' option when building RPMs. Enable 9P_RDMA
based on 9P option and 9P_RDMA.
Signed-off-by: Kaleb S. KEITHLEY <kkeithle(a)redhat.com>
Change-Id: Ibc43faa0b18589c89b6e2f2529123996075dbd67
---
M src/CMakeLists.txt
M src/nfs-ganesha.spec-in.cmake
2 files changed, 22 insertions(+), 5 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/53/441553/1
--
To view, visit https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/441553
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: Ibc43faa0b18589c89b6e2f2529123996075dbd67
Gerrit-Change-Number: 441553
Gerrit-PatchSet: 1
Gerrit-Owner: kaleb(a)redhat.com
Gerrit-MessageType: newchange
5 years, 10 months
re:Crash in cih_latch_entry
by QR
Hi Dang, did you see this issue before?Thanks in advance.
--------------------------------
----- 原始邮件 -----
发件人:"QR" <zhbingyin(a)sina.com>
收件人:"devel" <devel(a)lists.nfs-ganesha.org>
主题:[NFS-Ganesha-Devel] Crash in cih_latch_entry
日期:2019年01月20日 11点28分
We are getting this crash with ganesha2.6.3.There are too many readers(0xFFFFFFFF) waiting on cih_fhcache.partition[0].lock, so pthread_rwlock_rdlock returns EAGAIN.Did anyone see this backtrace before, if so what fixed it?
(gdb) bt#0 0x00007fe5a909c1f7 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56#1 0x00007fe5a909d8e8 in __GI_abort () at abort.c:90#2 0x000000000050c86b in cih_latch_entry (key=0x7fe58300a440, latch=0x7fe58300a2c0, flags=5, func=0x563cd0 <__func__.20115> "mdcache_find_keyed", line=888) at /export/jcloud-zbs/src/jd.com/zfs/FSAL_SkyFS/nfs-ganesha/src/FSAL/Stackable_FSALs/FSAL_MDCACHE/mdcache_hash.h:262#3 0x000000000050c8d4 in cih_get_by_key_latch (key=0x7fe58300a440, latch=0x7fe58300a2c0, flags=5, func=0x563cd0 <__func__.20115> "mdcache_find_keyed", line=888) at /export/jcloud-zbs/src/jd.com/zfs/FSAL_SkyFS/nfs-ganesha/src/FSAL/Stackable_FSALs/FSAL_MDCACHE/mdcache_hash.h:293#4 0x000000000050f6c1 in mdcache_find_keyed (key=0x7fe58300a440, entry=0x7fe58300a4f0) at /export/jcloud-zbs/src/jd.com/zfs/FSAL_SkyFS/nfs-ganesha/src/FSAL/Stackable_FSALs/FSAL_MDCACHE/mdcache_helpers.c:886#5 0x000000000050f9af in mdcache_locate_host (fh_desc=0x7fe58300a970, export=0xd97820, entry=0x7fe58300a4f0, attrs_out=0x0) at /export/jcloud-zbs/src/jd.com/zfs/FSAL_SkyFS/nfs-ganesha/src/FSAL/Stackable_FSALs/FSAL_MDCACHE/mdcache_helpers.c:974#6 0x0000000000508c94 in mdcache_create_handle (exp_hdl=0xd97820, fh_desc=0x7fe58300a970, handle=0x7fe58300a968, attrs_out=0x0) at /export/jcloud-zbs/src/jd.com/zfs/FSAL_SkyFS/nfs-ganesha/src/FSAL/Stackable_FSALs/FSAL_MDCACHE/mdcache_handle.c:1759#7 0x000000000046b4a4 in nfs4_mds_putfh (data=0x7fe58300aa70) at /export/jcloud-zbs/src/jd.com/zfs/FSAL_SkyFS/nfs-ganesha/src/Protocols/NFS/nfs4_op_putfh.c:211#8 0x000000000046b691 in nfs4_op_putfh (op=0x7fe5700022f0, data=0x7fe58300aa70, resp=0x7fe570003830) at /export/jcloud-zbs/src/jd.com/zfs/FSAL_SkyFS/nfs-ganesha/src/Protocols/NFS/nfs4_op_putfh.c:281#9 0x0000000000454494 in nfs4_Compound (arg=0x7fe570004498, req=0x7fe570003d90, res=0x7fe570003720) at /export/jcloud-zbs/src/jd.com/zfs/FSAL_SkyFS/nfs-ganesha/src/Protocols/NFS/nfs4_Compound.c:752#10 0x000000000045157a in nfs_rpc_process_request (reqdata=0x7fe570003d90) at /export/jcloud-zbs/src/jd.com/zfs/FSAL_SkyFS/nfs-ganesha/src/MainNFSD/nfs_worker_thread.c:1329#11 0x0000000000451cc1 in nfs_rpc_valid_NFS (req=0x7fe570003d90) at /export/jcloud-zbs/src/jd.com/zfs/FSAL_SkyFS/nfs-ganesha/src/MainNFSD/nfs_worker_thread.c:1554#12 0x00007fe5a966c4d6 in svc_vc_decode (req=0x7fe570003d90) at /export/jcloud-zbs/src/jd.com/zfs/FSAL_SkyFS/nfs-ganesha/src/libntirpc/src/svc_vc.c:815#13 0x0000000000445816 in nfs_rpc_decode_request (xprt=0x7fe574000c10, xdrs=0x7fe570002110) at /export/jcloud-zbs/src/jd.com/zfs/FSAL_SkyFS/nfs-ganesha/src/MainNFSD/nfs_rpc_dispatcher_thread.c:1341#14 0x00007fe5a966c3e7 in svc_vc_recv (xprt=0x7fe574000c10) at /export/jcloud-zbs/src/jd.com/zfs/FSAL_SkyFS/nfs-ganesha/src/libntirpc/src/svc_vc.c:788#15 0x00007fe5a9668bc5 in svc_rqst_xprt_task (wpe=0x7fe574000e28) at /export/jcloud-zbs/src/jd.com/zfs/FSAL_SkyFS/nfs-ganesha/src/libntirpc/src/svc_rqst.c:751#16 0x00007fe5a966903a in svc_rqst_epoll_events (sr_rec=0xda67b0, n_events=1) at /export/jcloud-zbs/src/jd.com/zfs/FSAL_SkyFS/nfs-ganesha/src/libntirpc/src/svc_rqst.c:923#17 0x00007fe5a96692dc in svc_rqst_epoll_loop (sr_rec=0xda67b0) at /export/jcloud-zbs/src/jd.com/zfs/FSAL_SkyFS/nfs-ganesha/src/libntirpc/src/svc_rqst.c:996#18 0x00007fe5a966938f in svc_rqst_run_task (wpe=0xda67b0) at /export/jcloud-zbs/src/jd.com/zfs/FSAL_SkyFS/nfs-ganesha/src/libntirpc/src/svc_rqst.c:1032#19 0x00007fe5a967249f in work_pool_thread (arg=0x7fe56c0008c0) at /export/jcloud-zbs/src/jd.com/zfs/FSAL_SkyFS/nfs-ganesha/src/libntirpc/src/work_pool.c:176#20 0x00007fe5a9a94e25 in start_thread (arg=0x7fe58300c700) at pthread_create.c:308#21 0x00007fe5a915f34d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113(gdb) frame 2#2 0x000000000050c86b in cih_latch_entry (key=0x7fe58300a440, latch=0x7fe58300a2c0, flags=5, func=0x563cd0 <__func__.20115> "mdcache_find_keyed", line=888) at /export/jcloud-zbs/src/jd.com/zfs/FSAL_SkyFS/nfs-ganesha/src/FSAL/Stackable_FSALs/FSAL_MDCACHE/mdcache_hash.h:262262 PTHREAD_RWLOCK_rdlock(&cp->lock); /* SUBTREE_RLOCK */(gdb) p cp->lock$1 = {__data = {__lock = 0, __nr_readers = 4294967295, __readers_wakeup = 0, __writer_wakeup = 0, __nr_readers_queued = 0, __nr_writers_queued = 0, __writer = 0, __shared = 0, __pad1 = 0, __pad2 = 0, __flags = 0}, __size = "\000\000\000\000\377\377\377\377", '\000' <repeats 47 times>, __align = -4294967296}(gdb) p rc$2 = 11_______________________________________________
Devel mailing list -- devel(a)lists.nfs-ganesha.org
To unsubscribe send an email to devel-leave(a)lists.nfs-ganesha.org
5 years, 10 months
Change in ...nfs-ganesha[next]: MainNFSD: disable UDP listeners to eventually allow running as nonroot
by Name of user not set (GerritHub)
kaleb(a)redhat.com has uploaded this change for review. ( https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/441549
Change subject: MainNFSD: disable UDP listeners to eventually allow running as nonroot
......................................................................
MainNFSD: disable UDP listeners to eventually allow running as nonroot
Add enable_UDP option to core params, default = true.
When enable_UDP = false, don't create UDP listener sockets for
various protocols -- i.e. NFS, NLM, RQUOTA -- and don't attempt to
register them in the portmapper (rpcbind).
Plus:
+ fix an uninitialized variable error in nfs_libmain() when compiling
-DCMAKE_BUILD_TYPE=Debug
+ better (friendlier) logging in fsal_common_is_referral()
+ fix misleading/incorrect log msg in fsal_set_credentials
By default this change is effectively a no-op when running as root.
To run as non-root:
+ build with -DUSE_9P=OFF
+ Add "Enable_UDP = false;" to NFS_Core_Param block
+ add a non-root user, e.g. ganesha. See the nfs-ganesha.spec(.cmake.in)
as an example.
+ run as non-root user, e.g. u/g ganesha:ganesha. E.g.
`runuser -u ganesha -g ganesha -- /usr/bin/ganesha.nfsd
-L /var/log/ganesha/ganesha.log -p /var/run/ganesha/ganesha.pid ...`
Note #0: running as non-root doesn't work with at least FSAL_VFS and
FSAL_GLUSTER, and probably the other FSALs as well. Attempts to mount
an export fail. The smoking gun seems to be in fsal_common_is_referral(),
which is passed 0 (zero) in the attrs->valid_mask and attrs->supported,
(these values are non-zero when running as root) and the call to
obj_hdl->obj_ops->getattrs() returns an error.
Note #1: we should fix the nfs-ganesha.spec.in.cmake to enable/disable 9P.
Note #2: can't register with DBUS when running as non-root.
Signed-off-by: Kaleb S. KEITHLEY <kkeithle(a)redhat.com>
Change-Id: I80468fb179e08cd3b6c28463dcea1a31d05bba68
---
M src/FSAL/access_check.c
M src/FSAL/commonlib.c
M src/MainNFSD/nfs_init.c
M src/MainNFSD/nfs_lib.c
M src/MainNFSD/nfs_rpc_dispatcher_thread.c
M src/config_samples/config.txt
M src/include/gsh_config.h
M src/support/nfs_read_conf.c
8 files changed, 205 insertions(+), 160 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/49/441549/1
--
To view, visit https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/441549
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: I80468fb179e08cd3b6c28463dcea1a31d05bba68
Gerrit-Change-Number: 441549
Gerrit-PatchSet: 1
Gerrit-Owner: kaleb(a)redhat.com
Gerrit-MessageType: newchange
5 years, 10 months
Crash in cih_latch_entry
by QR
We are getting this crash with ganesha2.6.3.There are too many readers(0xFFFFFFFF) waiting on cih_fhcache.partition[0].lock, so pthread_rwlock_rdlock returns EAGAIN.Did anyone see this backtrace before, if so what fixed it?
(gdb) bt#0 0x00007fe5a909c1f7 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56#1 0x00007fe5a909d8e8 in __GI_abort () at abort.c:90#2 0x000000000050c86b in cih_latch_entry (key=0x7fe58300a440, latch=0x7fe58300a2c0, flags=5, func=0x563cd0 <__func__.20115> "mdcache_find_keyed", line=888) at /export/jcloud-zbs/src/jd.com/zfs/FSAL_SkyFS/nfs-ganesha/src/FSAL/Stackable_FSALs/FSAL_MDCACHE/mdcache_hash.h:262#3 0x000000000050c8d4 in cih_get_by_key_latch (key=0x7fe58300a440, latch=0x7fe58300a2c0, flags=5, func=0x563cd0 <__func__.20115> "mdcache_find_keyed", line=888) at /export/jcloud-zbs/src/jd.com/zfs/FSAL_SkyFS/nfs-ganesha/src/FSAL/Stackable_FSALs/FSAL_MDCACHE/mdcache_hash.h:293#4 0x000000000050f6c1 in mdcache_find_keyed (key=0x7fe58300a440, entry=0x7fe58300a4f0) at /export/jcloud-zbs/src/jd.com/zfs/FSAL_SkyFS/nfs-ganesha/src/FSAL/Stackable_FSALs/FSAL_MDCACHE/mdcache_helpers.c:886#5 0x000000000050f9af in mdcache_locate_host (fh_desc=0x7fe58300a970, export=0xd97820, entry=0x7fe58300a4f0, attrs_out=0x0) at /export/jcloud-zbs/src/jd.com/zfs/FSAL_SkyFS/nfs-ganesha/src/FSAL/Stackable_FSALs/FSAL_MDCACHE/mdcache_helpers.c:974#6 0x0000000000508c94 in mdcache_create_handle (exp_hdl=0xd97820, fh_desc=0x7fe58300a970, handle=0x7fe58300a968, attrs_out=0x0) at /export/jcloud-zbs/src/jd.com/zfs/FSAL_SkyFS/nfs-ganesha/src/FSAL/Stackable_FSALs/FSAL_MDCACHE/mdcache_handle.c:1759#7 0x000000000046b4a4 in nfs4_mds_putfh (data=0x7fe58300aa70) at /export/jcloud-zbs/src/jd.com/zfs/FSAL_SkyFS/nfs-ganesha/src/Protocols/NFS/nfs4_op_putfh.c:211#8 0x000000000046b691 in nfs4_op_putfh (op=0x7fe5700022f0, data=0x7fe58300aa70, resp=0x7fe570003830) at /export/jcloud-zbs/src/jd.com/zfs/FSAL_SkyFS/nfs-ganesha/src/Protocols/NFS/nfs4_op_putfh.c:281#9 0x0000000000454494 in nfs4_Compound (arg=0x7fe570004498, req=0x7fe570003d90, res=0x7fe570003720) at /export/jcloud-zbs/src/jd.com/zfs/FSAL_SkyFS/nfs-ganesha/src/Protocols/NFS/nfs4_Compound.c:752#10 0x000000000045157a in nfs_rpc_process_request (reqdata=0x7fe570003d90) at /export/jcloud-zbs/src/jd.com/zfs/FSAL_SkyFS/nfs-ganesha/src/MainNFSD/nfs_worker_thread.c:1329#11 0x0000000000451cc1 in nfs_rpc_valid_NFS (req=0x7fe570003d90) at /export/jcloud-zbs/src/jd.com/zfs/FSAL_SkyFS/nfs-ganesha/src/MainNFSD/nfs_worker_thread.c:1554#12 0x00007fe5a966c4d6 in svc_vc_decode (req=0x7fe570003d90) at /export/jcloud-zbs/src/jd.com/zfs/FSAL_SkyFS/nfs-ganesha/src/libntirpc/src/svc_vc.c:815#13 0x0000000000445816 in nfs_rpc_decode_request (xprt=0x7fe574000c10, xdrs=0x7fe570002110) at /export/jcloud-zbs/src/jd.com/zfs/FSAL_SkyFS/nfs-ganesha/src/MainNFSD/nfs_rpc_dispatcher_thread.c:1341#14 0x00007fe5a966c3e7 in svc_vc_recv (xprt=0x7fe574000c10) at /export/jcloud-zbs/src/jd.com/zfs/FSAL_SkyFS/nfs-ganesha/src/libntirpc/src/svc_vc.c:788#15 0x00007fe5a9668bc5 in svc_rqst_xprt_task (wpe=0x7fe574000e28) at /export/jcloud-zbs/src/jd.com/zfs/FSAL_SkyFS/nfs-ganesha/src/libntirpc/src/svc_rqst.c:751#16 0x00007fe5a966903a in svc_rqst_epoll_events (sr_rec=0xda67b0, n_events=1) at /export/jcloud-zbs/src/jd.com/zfs/FSAL_SkyFS/nfs-ganesha/src/libntirpc/src/svc_rqst.c:923#17 0x00007fe5a96692dc in svc_rqst_epoll_loop (sr_rec=0xda67b0) at /export/jcloud-zbs/src/jd.com/zfs/FSAL_SkyFS/nfs-ganesha/src/libntirpc/src/svc_rqst.c:996#18 0x00007fe5a966938f in svc_rqst_run_task (wpe=0xda67b0) at /export/jcloud-zbs/src/jd.com/zfs/FSAL_SkyFS/nfs-ganesha/src/libntirpc/src/svc_rqst.c:1032#19 0x00007fe5a967249f in work_pool_thread (arg=0x7fe56c0008c0) at /export/jcloud-zbs/src/jd.com/zfs/FSAL_SkyFS/nfs-ganesha/src/libntirpc/src/work_pool.c:176#20 0x00007fe5a9a94e25 in start_thread (arg=0x7fe58300c700) at pthread_create.c:308#21 0x00007fe5a915f34d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113(gdb) frame 2#2 0x000000000050c86b in cih_latch_entry (key=0x7fe58300a440, latch=0x7fe58300a2c0, flags=5, func=0x563cd0 <__func__.20115> "mdcache_find_keyed", line=888) at /export/jcloud-zbs/src/jd.com/zfs/FSAL_SkyFS/nfs-ganesha/src/FSAL/Stackable_FSALs/FSAL_MDCACHE/mdcache_hash.h:262262 PTHREAD_RWLOCK_rdlock(&cp->lock); /* SUBTREE_RLOCK */(gdb) p cp->lock$1 = {__data = {__lock = 0, __nr_readers = 4294967295, __readers_wakeup = 0, __writer_wakeup = 0, __nr_readers_queued = 0, __nr_writers_queued = 0, __writer = 0, __shared = 0, __pad1 = 0, __pad2 = 0, __flags = 0}, __size = "\000\000\000\000\377\377\377\377", '\000' <repeats 47 times>, __align = -4294967296}(gdb) p rc$2 = 11
5 years, 10 months
DNS lookup for client-IP
by Suhrud Patankar
Hello All,
How does Ganesha handle the DNS-IP change for client?
I have given access permission to a client based on its DNS name.
There is a case when the client changes the IP address and updates the
DNS server.
However, I think Ganesha does the DNS lookup only at the time of the
config parsing.
The access permissions do not work for the client which has changed
its IP address.
What is the best way to handle this?
Thanks & Regards,
Suhrud
5 years, 10 months
Change in ...nfs-ganesha[next]: Releasing session refcount after sending response to client
by Sriram Patil (GerritHub)
Sriram Patil has uploaded this change for review. ( https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/441409
Change subject: Releasing session refcount after sending response to client
......................................................................
Releasing session refcount after sending response to client
Session refcount should be decremented only after sending reply back to the
client. If we decrement the refcount after processing the compound request and
before sending the reply, the current response may get freed from the cache.
This happens when there is a concurrent CREATE_SESSION request from a client
whose client owner turns out to be the same as the current one.
In case of client owner conflict the new client decrements the session
refcount. If the current request is still processing the request and has not
sent the response, it may free the cached response when decrementing the
refcount because the refcount now becomes zero. When sending reply this causes
ganesha crash because the result is already freed.
This change fixes the above race condition by always decrementing the session
refcount after the reply is successfully sent.
Change-Id: I9ab34f47347eec6d7438ad6f6c8505949eb1d963
Signed-off-by: Sriram Patil <sriramp(a)vmware.com>
---
M src/MainNFSD/nfs_worker_thread.c
M src/Protocols/NFS/nfs4_Compound.c
M src/include/fsal_api.h
3 files changed, 17 insertions(+), 1 deletion(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/09/441409/1
--
To view, visit https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/441409
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: I9ab34f47347eec6d7438ad6f6c8505949eb1d963
Gerrit-Change-Number: 441409
Gerrit-PatchSet: 1
Gerrit-Owner: Sriram Patil <sriramp(a)vmware.com>
Gerrit-MessageType: newchange
5 years, 10 months