Comments (6)
Hi,
though the spec doesn't clearly says it, server should return subsequent entries. IOW, if cookie is 102 then server should return directory listing starting from entry 103, as Linux server correctly does. If nfs4j re-sends 102, then this is a clear bug. However, the READDIR operation expects that VFS layer does the right thing
The returned listing will contain only entries with cookies greater than specified value.
Does your filesystem backend preserves this behavior?
from nfs4j.
Thank for pointing that! We have found a bug in th VFS and we'll fix it.
Do you have any opinion about the last directory entry cookie set to 2147483647 by the Linux NFS server?
from nfs4j.
Great! The 2147483647 is 0x7fffffff and looks like a magic number used by the backend file system to indicate some special value, last block, for example. Do you use xfs?
from nfs4j.
The filesystem used was btrfs with Fedora Linux OS.
It's clearly looking like a magic number, but I didn't find any reference of this value in the RFC.
from nfs4j.
This is linux fs specific and have nothing to do with NFS spec.
linux-kernel $ git grep 0x7fffffff fs
fs/affs/file.c: BUG_ON(block > (sector_t)0x7fffffffUL);
fs/afs/internal.h:#define __AFS_PAGE_PRIV_MASK 0x7fffffffUL
fs/ext2/inode.c: if (inode->i_size > 0x7fffffffULL) {
fs/ext4/hash.c: hash -= 0x7fffffff;
fs/ext4/hash.c: hash -= 0x7fffffff;
fs/ext4/inode-test.c:#define UPPER_MSB_0 0x7fffffffL
fs/ext4/inode-test.c: .expected = {.tv_sec = 0x7fffffffLL, .tv_nsec = 0L},
fs/ext4/inode.c: if (pos + len <= 0x7fffffffULL)
fs/ext4/inode.c: if (ei->i_disksize > 0x7fffffffULL) {
fs/kernfs/dir.c: hash &= 0x7fffffffU;
fs/nfs/proc.c:#define NFS_LOCK32_OFFSET_MAX ((__s32)0x7fffffffUL)
fs/nfsd/vfs.c: v_mtime = verifier[0]&0x7fffffff;
fs/nfsd/vfs.c: v_atime = verifier[1]&0x7fffffff;
fs/ntfs/super.c: if (i_size <= 0 || i_size > 0x7fffffff)
fs/ocfs2/cluster/tcp.h:#define O2NET_TCP_USER_TIMEOUT 0x7fffffff
fs/ocfs2/quota_local.c: info->dqi_max_spc_limit = 0x7fffffffffffffffLL;
fs/ocfs2/quota_local.c: info->dqi_max_ino_limit = 0x7fffffffffffffffLL;
fs/proc/array.c: seq_put_decimal_ull(m, " ", task->pending.signal.sig[0] & 0x7fffffffUL);
fs/proc/array.c: seq_put_decimal_ull(m, " ", task->blocked.sig[0] & 0x7fffffffUL);
fs/proc/array.c: seq_put_decimal_ull(m, " ", sigign.sig[0] & 0x7fffffffUL);
fs/proc/array.c: seq_put_decimal_ull(m, " ", sigcatch.sig[0] & 0x7fffffffUL);
fs/quota/quota_v2.c: info->dqi_max_spc_limit = 0x7fffffffffffffffLL; /* 2^63-1 */
fs/quota/quota_v2.c: info->dqi_max_ino_limit = 0x7fffffffffffffffLL;
fs/vboxsf/shfl_hostintf.h: SHFLFSOBJATTRADD_32BIT_SIZE_HACK = 0x7fffffff
fs/xfs/libxfs/xfs_types.h:#define MAXEXTNUM ((xfs_extnum_t)0x7fffffff) /* signed int */
fs/xfs/xfs_dir2_readdir.c: ctx->pos = dot_offset & 0x7fffffff;
fs/xfs/xfs_dir2_readdir.c: ctx->pos = dotdot_offset & 0x7fffffff;
fs/xfs/xfs_dir2_readdir.c: ctx->pos = off & 0x7fffffff;
fs/xfs/xfs_dir2_readdir.c: 0x7fffffff;
fs/xfs/xfs_dir2_readdir.c: ctx->pos = cook & 0x7fffffff;
fs/xfs/xfs_dir2_readdir.c: 0x7fffffff;
fs/xfs/xfs_dir2_readdir.c: ctx->pos = xfs_dir2_byte_to_dataptr(curoff) & 0x7fffffff;
fs/xfs/xfs_dir2_readdir.c: ctx->pos = XFS_DIR2_MAX_DATAPTR & 0x7fffffff;
fs/xfs/xfs_dir2_readdir.c: ctx->pos = xfs_dir2_byte_to_dataptr(curoff) & 0x7fffffff;
linux-kernel $
from nfs4j.
Clearly a magic number widley used...
Thank you for all you help!
from nfs4j.
Related Issues (20)
- "Failed to collect dependencies at org.dcache...." during mvn package HOT 3
- Kerberos authentication HOT 9
- How to use nfs4j-client to create a Kerberos authentication mount and perform io operations with authentication information HOT 3
- Can nfs4j-client automatically reclaim expired resources? HOT 1
- NFS client problem with mkdir HOT 4
- Byte-range locks of expired clients not ignored
- Can this library be used for inter server file copy? HOT 1
- NFSv4 server looses open-stateid sequence in concurrent environment
- Nanosecond timestamp support HOT 1
- Simple hello "nfs4j" world java with main() class? HOT 2
- Executable JAR file for nfs4j?
- nfs4j does not work with ms-nfs41-client, 'Too many ops' error HOT 1
- Implement rquota protocol HOT 3
- dCache won't deliver a file if there is staging of this file in progress even if there is cached replica available
- The lock owner is not allowed to be re-created after last lock released
- Whether it support user management? HOT 5
- seqid mismatch during CLOSE HOT 5
- Can nfs4j library be used for NFS Client implementation for 4 and 4.1 versions on prod? HOT 3
- Missing artifact com.sleepycat:je:jar:7.3.7 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nfs4j.