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
Crash in dupreq
by katcherw@gmail.com
We saw a crash in version 2.8.2 running an iozone crash:
Program terminated with signal 11, Segmentation fault.
#0 0x00007ff028dce240 in atomic_sub_uint32_t (var=0x104, sub=1) at /usr/src/debug/nfs-ganesha-2.8.2/include/abstract_atomic.h:384
384 return __atomic_sub_fetch(var, sub, __ATOMIC_SEQ_CST);
Missing separate debuginfos, use: debuginfo-install bzip2-libs-1.0.6-12.el7.x86_64 dbus-libs-1.11.16-1.fc26.x86_64 elfutils-libelf-0.158-3.el7.x86_64 elfutils-libs-0.158-3.el7.x86_64 glibc-2.17-55.el7.x86_64 gssproxy-0.3.0-9.el7.x86_64 keyutils-libs-1.5.8-3.el7.x86_64 krb5-libs-1.15.1-8.el7.x86_64 libacl-2.2.51-12.el7.x86_64 libattr-2.4.46-12.el7.x86_64 libblkid-2.23.2-16.el7.x86_64 libcap-2.22-8.el7.x86_64 libcom_err-1.42.9-10.el7.x86_64 libgcrypt-1.5.3-4.el7.x86_64 libgpg-error-1.12-3.el7.x86_64 libnfsidmap-0.25-9.el7.x86_64 libselinux-2.5-11.el7.x86_64 libuuid-2.23.2-16.el7.x86_64 libwbclient-4.8.3-4.el7.x86_64 pcre-8.32-12.el7.x86_64 samba-client-libs-4.8.3-4.el7.x86_64 samba-winbind-modules-4.8.3-4.el7.x86_64 sssd-client-1.11.2-65.el7.x86_64 systemd-libs-219-42.el7_4.1.x86_64 userspace-rcu-0.7.16-1.el7.x86_64 xz-libs-5.1.2-8alpha.el7.x86_64 zlib-1.2.7-13.el7.x86_64
(gdb) bt
#0 0x00007ff028dce240 in atomic_sub_uint32_t (var=0x104, sub=1) at /usr/src/debug/nfs-ganesha-2.8.2/include/abstract_atomic.h:384
#1 0x00007ff028dce265 in atomic_dec_uint32_t (var=0x104) at /usr/src/debug/nfs-ganesha-2.8.2/include/abstract_atomic.h:405
#2 0x00007ff028dd1b65 in dupreq_entry_put (dv=0x0) at /usr/src/debug/nfs-ganesha-2.8.2/RPCAL/nfs_dupreq.c:912
#3 0x00007ff028dd4630 in nfs_dupreq_rele (req=0x7fec44a269f0, func=0x7ff029159d60 <nfs3_func_desc+672>) at /usr/src/debug/nfs-ganesha-2.8.2/RPCAL/nfs_dupreq.c:1382
#4 0x00007ff028d74bc5 in free_args (reqdata=0x7fec44a269f0) at /usr/src/debug/nfs-ganesha-2.8.2/MainNFSD/nfs_worker_thread.c:693
#5 0x00007ff028d77783 in nfs_rpc_process_request (reqdata=0x7fec44a269f0) at /usr/src/debug/nfs-ganesha-2.8.2/MainNFSD/nfs_worker_thread.c:1509
#6 0x00007ff028d77a74 in nfs_rpc_valid_NFS (req=0x7fec44a269f0) at /usr/src/debug/nfs-ganesha-2.8.2/MainNFSD/nfs_worker_thread.c:1601
#7 0x00007ff028b2632d in svc_vc_decode (req=0x7fec44a269f0) at /usr/src/debug/nfs-ganesha-2.8.2/libntirpc/src/svc_vc.c:829
#8 0x00007ff028b227bf in svc_request (xprt=0x7fee0c202ad0, xdrs=0x7fec3c987a70) at /usr/src/debug/nfs-ganesha-2.8.2/libntirpc/src/svc_rqst.c:793
#9 0x00007ff028b2623e in svc_vc_recv (xprt=0x7fee0c202ad0) at /usr/src/debug/nfs-ganesha-2.8.2/libntirpc/src/svc_vc.c:802
#10 0x00007ff028b22740 in svc_rqst_xprt_task (wpe=0x7fee0c202cf0) at /usr/src/debug/nfs-ganesha-2.8.2/libntirpc/src/svc_rqst.c:774
#11 0x00007ff028b23048 in svc_rqst_epoll_loop (wpe=0x108d570) at /usr/src/debug/nfs-ganesha-2.8.2/libntirpc/src/svc_rqst.c:1089
#12 0x00007ff028b2baff in work_pool_thread (arg=0x7fed44052070) at /usr/src/debug/nfs-ganesha-2.8.2/libntirpc/src/work_pool.c:184
#13 0x00007ff0270c8df3 in start_thread () from /lib64/libpthread.so.0
#14 0x00007ff0267cd3dd in clone () from /lib64/libc.so.6
(gdb) frame 5
#5 0x00007ff028d77783 in nfs_rpc_process_request (reqdata=0x7fec44a269f0) at /usr/src/debug/nfs-ganesha-2.8.2/MainNFSD/nfs_worker_thread.c:1509
1509 free_args(reqdata);
(gdb) p *reqdata
$2 = {
svc = {
rq_xprt = 0x7fee0c202ad0,
rq_clntname = 0x0,
rq_svcname = 0x0,
rq_xdrs = 0x7fec3c987a70,
rq_u1 = 0x0,
rq_u2 = 0x0,
rq_cksum = 14781944753697519387,
rq_auth = 0x7ff028d45cd0 <svc_auth_none>,
rq_ap1 = 0x0,
rq_ap2 = 0x0,
...
Notice rq_u1 == 0. nfs_rpc_process_request is calling free_args which is calling nfs_dupreq_rele. There is a comment at the beginning of nfs_dupreq_rele:
* We assert req->rq_u1 now points to the corresponding duplicate request
* cache entry (dv).
But this assumption doesn't seem to be true, and eventually this will be dereferenced leading to a crash. We're trying to reproduce the problem with NIV_FULL_DEBUG.
Has anyone seen this problem before, or know what would cause rq_u1 to be 0? Should there be a check for NULL in nfs_dupreq_rele in addition to DUPREQ_NOCACHE?
Bill
4 years, 8 months
Change in ...nfs-ganesha[next]: Remove unused DUPREQ_ERROR and DUPREQ_INSERT_MALLOC_ERROR
by Malahal (GerritHub)
Malahal has uploaded this change for review. ( https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/478789 )
Change subject: Remove unused DUPREQ_ERROR and DUPREQ_INSERT_MALLOC_ERROR
......................................................................
Remove unused DUPREQ_ERROR and DUPREQ_INSERT_MALLOC_ERROR
DUPREQ_INSERT_MALLOC_ERROR is used in the case of coding bugs. Used an
assert instead and removed the enum.
Change-Id: Ic5e1b89fd9d9a1df48389f0dd137a1631cd79d49
Signed-off-by: Malahal Naineni <malahal(a)us.ibm.com>
---
M src/MainNFSD/nfs_worker_thread.c
M src/RPCAL/nfs_dupreq.c
M src/include/nfs_dupreq.h
3 files changed, 2 insertions(+), 30 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/89/478789/1
--
To view, visit https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/478789
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: Ic5e1b89fd9d9a1df48389f0dd137a1631cd79d49
Gerrit-Change-Number: 478789
Gerrit-PatchSet: 1
Gerrit-Owner: Malahal <malahal(a)gmail.com>
Gerrit-MessageType: newchange
4 years, 11 months
Change in ...nfs-ganesha[next]: Enable ACL disable option for FSAL_CEPH
by Shangzhong Zhu (GerritHub)
Shangzhong Zhu has uploaded this change for review. ( https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/478707 )
Change subject: Enable ACL disable option for FSAL_CEPH
......................................................................
Enable ACL disable option for FSAL_CEPH
Change-Id: I684b9f9fa7e6779268556e938828b908e4b683b3
Signed-off-by: Shangzhong Zhu <zhu.shangzhong(a)zte.com.cn>
Signed-off-by: Luo Muyao <luo.muyao(a)zte.com.cn>
---
M src/FSAL/FSAL_CEPH/export.c
M src/FSAL/FSAL_CEPH/internal.h
M src/MainNFSD/libganesha_nfsd.ver
3 files changed, 22 insertions(+), 0 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/07/478707/1
--
To view, visit https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/478707
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: I684b9f9fa7e6779268556e938828b908e4b683b3
Gerrit-Change-Number: 478707
Gerrit-PatchSet: 1
Gerrit-Owner: Shangzhong Zhu <zhu.shangzhong(a)zte.com.cn>
Gerrit-MessageType: newchange
4 years, 11 months
Change in ...nfs-ganesha[next]: Fix accessing object handle after freeing its last state
by Malahal (GerritHub)
Malahal has uploaded this change for review. ( https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/478659 )
Change subject: Fix accessing object handle after freeing its last state
......................................................................
Fix accessing object handle after freeing its last state
nfs4_op_close() calls state_del_locked() while deleting the state found.
This could be the last state for the object handle and the last refcount as
well leading to access after free in state_del_locked() while accessing the
object handle after deleting state.
Fix this by using state_del() instead.
Also, nfs4_op_close() uses data->current_obj instead of the corresponding
state's object handle. These could be different especially when an object
handle gets re-allocated as an earlier object handle gets deleted from the
hash table due to state_wipe_file call on it.
Change-Id: I65d58921d33bd38eb877615811a7220bdd55cb26
Signed-off-by: Malahal Naineni <malahal(a)us.ibm.com>
---
M src/Protocols/NFS/nfs4_op_close.c
1 file changed, 17 insertions(+), 13 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/59/478659/1
--
To view, visit https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/478659
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: I65d58921d33bd38eb877615811a7220bdd55cb26
Gerrit-Change-Number: 478659
Gerrit-PatchSet: 1
Gerrit-Owner: Malahal <malahal(a)gmail.com>
Gerrit-MessageType: newchange
4 years, 11 months
Announce Push of V3.2
by Frank Filz
Branch next
Tag:V3.2
Note this release is an ntirpc pullup please update your submodule
Merge Highlights
* ntirpc 3.2 pullup to fix async and nonblocking
* Ganesha async fixes to fix async and nonblocking
* Stats for all ops by a client
* nfs3_FhandleToExportId returns an int (not a short)
* Crash under duplicate request "being processed"
Signed-off-by: Frank S. Filz <ffilzlnx(a)mindspring.com>
Contents:
8d07e25 Frank S. Filz V3.2
56cec52 Frank S. Filz Move async callback to svc_req and give it its own wpe
bc42132 TweakySolution Crash under duplicate request "being processed"
bf52d6d Malahal Naineni nfs3_FhandleToExportId returns an int (not a short)
3eab00c Sachin Punadikar Stats for all ops by a client
4 years, 11 months
Change in ...nfs-ganesha[next]: Add get and set ACLs attr support for FSAL_CEPH
by Zhu Shangzhong (GerritHub)
Zhu Shangzhong has uploaded this change for review. ( https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/478572 )
Change subject: Add get and set ACLs attr support for FSAL_CEPH
......................................................................
Add get and set ACLs attr support for FSAL_CEPH
Change-Id: I9d92a824e9a37515ad00af2e77135eb7b53f745f
Signed-off-by: Shangzhong Zhu <zhu.shangzhong(a)zte.com.cn>
Signed-off-by: Luo Muyao <luo.muyao(a)zte.com.cn>
---
M src/FSAL/FSAL_CEPH/handle.c
1 file changed, 29 insertions(+), 0 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/72/478572/1
--
To view, visit https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/478572
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: I9d92a824e9a37515ad00af2e77135eb7b53f745f
Gerrit-Change-Number: 478572
Gerrit-PatchSet: 1
Gerrit-Owner: Zhu Shangzhong <zhu.shangzhong(a)zte.com.cn>
Gerrit-MessageType: newchange
4 years, 11 months
Change in ...nfs-ganesha[next]: Get and set ACLs API for FSAL_CEPH
by Zhu Shangzhong (GerritHub)
Zhu Shangzhong has uploaded this change for review. ( https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/478556 )
Change subject: Get and set ACLs API for FSAL_CEPH
......................................................................
Get and set ACLs API for FSAL_CEPH
For ceph_get_acl, first get extended attr from CephFS by
ceph_ll_getxattr, then convert the extended attr to POSIX ACLs by
xattr_2_posix_acl,finally convert the POSIX ACLs to FSAL ACL by
posix_acl_2_fsal_acl.
For ceph_set_acl, it is a reverse procedure.
Change-Id: Ie49e2fa3c84323817af733beacd04ec8c17ccfc4
Signed-off-by: Shangzhong Zhu <zhu.shangzhong(a)zte.com.cn>
Signed-off-by: Luo Muyao <luo.muyao(a)zte.com.cn>
---
M src/FSAL/FSAL_CEPH/internal.c
M src/FSAL/FSAL_CEPH/internal.h
2 files changed, 229 insertions(+), 0 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/56/478556/1
--
To view, visit https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/478556
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: Ie49e2fa3c84323817af733beacd04ec8c17ccfc4
Gerrit-Change-Number: 478556
Gerrit-PatchSet: 1
Gerrit-Owner: Zhu Shangzhong <zhu.shangzhong(a)zte.com.cn>
Gerrit-MessageType: newchange
4 years, 11 months
Change in ...nfs-ganesha[next]: for ceph backend, if chk_fscid == 0, cache always miss in "mdcache_lo...
by Name of user not set (GerritHub)
wei.qiaomiao(a)zte.com.cn has uploaded this change for review. ( https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/478552 )
Change subject: for ceph backend, if chk_fscid == 0, cache always miss in "mdcache_locate_host" function because fh_desc->len is 16bytes,but the key length in mdcache is 24bytes
......................................................................
for ceph backend, if chk_fscid == 0, cache always miss in "mdcache_locate_host" function
because fh_desc->len is 16bytes,but the key length in mdcache is 24bytes
Change-Id: If9ec80251e42962cc282e00077d912b4f28df612
Signed-off-by: Wei Qiaomiao <wei.qiaomiao(a)zte.com.cn>
---
M src/FSAL/FSAL_CEPH/handle.c
1 file changed, 4 insertions(+), 1 deletion(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/52/478552/1
--
To view, visit https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/478552
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: If9ec80251e42962cc282e00077d912b4f28df612
Gerrit-Change-Number: 478552
Gerrit-PatchSet: 1
Gerrit-Owner: wei.qiaomiao(a)zte.com.cn
Gerrit-MessageType: newchange
4 years, 11 months