On 2018/3/7 10:59, Kinglong Mee wrote:
> When using nfsv3 on glusterfs-3.13.1-1.el7.x86_64 and 
> nfs-ganesha-2.6.0-0.2rc3.el7.centos.x86_64,
> I gets strange "Invalid argument" when writing file.
> 
> 1. With quota disabled;
> nfs client mount nfs-ganesha share, and do 'll' in the testing directory.
> 
> 2. Enable quota;
> # getfattr -d -m . -e hex /root/rpmbuild/gvtest/nfs-ganesha/testfile92
> getfattr: Removing leading '/' from absolute path names
> # file: root/rpmbuild/gvtest/nfs-ganesha/testfile92
> trusted.gfid=0xe2edaac0eca8420ebbbcba7e56bbd240
> trusted.gfid2path.b3250af8fa558e66=0x39663134343566662d653530332d343831352d396635312d3236633565366332633137642f7465737466696c653932
> trusted.glusterfs.quota.9f1445ff-e503-4815-9f51-26c5e6c2c17d.contri.3=0x00000000000002000000000000000001
> 
> Notice: testfile92 without trusted.pgfid xattr.

The trusted.pgfid will be created by the next name lookup; nameless lookup 
don't create it.

> 3. restart glusterfs volume by "gluster volume stop/start gvtest"

Restarting glusterfsd here cleanup all inode cache from memory;
after starting, inode of testfile92's parent is NULL.

> 4. echo somedata > testfile92

Because, nfs-ganesha and nfs client has cache for testfile92,
before write fops, no name lookup happens that trusted.pgfid is not created for 
testfile92.

Quota_writev call quota_build_ancestry building the ancestry in 
quota_check_limit,
but testfile92 doesn't contain trusted.pgfid, so that write fops failed with 
Invalid argument.

I have no idea of fixing this problem, any comments are welcome.

thanks,
Kinglong Mee

> 5. ll testfile92
> -rw-r--r-- 1 root root    0 Mar  6 21:43 testfile92
> 
> There are some error in brick log message,
> [2018-03-07 02:30:19.222045] W [MSGID: 120003] 
> [quota.c:821:quota_build_ancestry_cbk] 0-gvtest-quota: parent is NULL 
> [Invalid argument]
> [2018-03-07 02:30:32.328977] W [marker-quota.c:33:mq_loc_copy] 0-marker: src 
> loc is not valid
> [2018-03-07 02:30:32.329001] E [marker-quota.c:1488:mq_initiate_quota_task] 
> 0-gvtest-marker: loc copy failed
> The message "W [MSGID: 120003] [quota.c:821:quota_build_ancestry_cbk] 
> 0-gvtest-quota: parent is NULL [Invalid argument]" repeated 136 times between 
> [2018-03-07 02:30:19.222045] and [2018-03-07 02:30:32.329708]
> [2018-03-07 02:30:32.329725] E [MSGID: 115067] 
> [server-rpc-fops.c:1407:server_writev_cbk] 0-gvtest-server: 211: WRITEV 5 
> (e2edaac0-eca8-420e-bbbc-ba7e56bbd240), client: 
> CENTOS7-MINI-2758-2018/03/07-02:26:14:328922-gvtest-client-1-0-2, 
> error-xlator: gvtest-quota [Invalid argument]
> [2018-03-07 02:43:18.435729] W [MSGID: 120003] 
> [quota.c:821:quota_build_ancestry_cbk] 0-gvtest-quota: parent is NULL 
> [Invalid argument]
> [2018-03-07 02:43:18.435781] E [MSGID: 115067] 
> [server-rpc-fops.c:1407:server_writev_cbk] 0-gvtest-server: 387: WRITEV 5 
> (e2edaac0-eca8-420e-bbbc-ba7e56bbd240), client: 
> CENTOS7-MINI-2758-2018/03/07-02:26:14:328922-gvtest-client-1-0-2, 
> error-xlator: gvtest-quota [Invalid argument]
> 
> Ps, the corresponding tcpdump is attached.
> 
> 
_______________________________________________
Gluster-devel mailing list
Gluster-devel@gluster.org
http://lists.gluster.org/mailman/listinfo/gluster-devel

Reply via email to