Repository navigation
Conversation
|
Thanks, Horst, please hold on the merge, and let me create a page to make the whole story clear (from fuse kernel to redfsd client and server), then we can move forward. |
Collaborator
Author
|
@hazhou-ddn don't worry! I'm not merging this. I am just testing this, so that we know that we have the code and you can see what I meant. |
hbirth
force-pushed
the
redfs-ubuntu-hwe-6.17.0-16.16-24.04.1
branch
2 times, most recently
from
October 27, 2026 17:56
4e7d8d3 to
685f8eb
Compare
hbirth
force-pushed
the
redfs-ubuntu-hwe-6.17.0-16.16-24.04.1
branch
3 times, most recently
from
October 28, 2026 09:18
6a34146 to
a617517
Compare
hbirth
force-pushed
the
redfs-ubuntu-hwe-6.17.0-16.16-24.04.1
branch
2 times, most recently
from
November 2, 2026 09:40
d87c216 to
c201772
Compare
hbirth
force-pushed
the
redfs-ubuntu-hwe-6.17.0-16.16-24.04.1
branch
2 times, most recently
from
November 6, 2026 15:28
45a597f to
cac9742
Compare
Collaborator
Author
|
@hazhou-ddn @yongzech tell me when you need this merged |
hbirth
force-pushed
the
redfs-ubuntu-hwe-6.17.0-16.16-24.04.1
branch
from
November 10, 2026 10:42
cac9742 to
4817aad
Compare
achhenderson
self-requested a review
November 10, 2026 17:48
achhenderson
approved these changes
Nov 10, 2026
Under DLM the server owns the size, blocks, mtime and ctime of a file another node writes through its writeback cache. To answer a statx exactly, it has to revoke or downgrade that node's write grant, forcing a flush and a later re-acquire. A plain ls -l, find or monitoring agent on one node can so keep breaking the grant of a writer on another. Add FUSE_STATX_LIGHT to fuse_statx_in.sx_flags, telling the server that the caller does not need cluster-coherent size, blocks and timestamps and that it may answer from its current values without recalling locks. It is only sent with the writeback cache on, for a user stat() of a regular file without AT_STATX_FORCE_SYNC. Internal attribute updates (SEEK_END, O_APPEND, EOF checks, permission checks, setattr) keep sending full requests. A light reply with a zero attr_valid may lag behind writes, so it does not update the inode: a stale size must not shrink i_size or the page cache, and i_time, inval_mask and FUSE_I_DLM_LOCKED stay as they were. It only fills the kstat, taking the larger size and the later mtime/ctime of the reply and the inode, so this node still sees its own unflushed writes. A non-zero attr_valid says the values are coherent: the reply updates the inode and is cached like a full one. Signed-off-by: Horst Birthelmer <hbirthelmer@ddn.com>
A read served from the page cache never reaches the server, so the server cannot update atime for it. Record on the inode a cached read(2), splice, sendfile or read fault, unless the file has O_NOATIME. A FUSE_READ, a DLM read lock request, a write, truncate, fallocate or an explicit atime set clears the record. The first release after it reports it with FUSE_RELEASE_CACHED_READ and clears it, so the server stamps atime at release. Signed-off-by: Yan, Zheng <zyan@ddn.com> Signed-off-by: Horst Birthelmer <hbirthelmer@ddn.com>
hbirth
force-pushed
the
redfs-ubuntu-hwe-6.17.0-16.16-24.04.1
branch
from
November 10, 2026 20:30
4817aad to
a844d31
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Under DLM the server owns the size, blocks, mtime and ctime of a file another node writes through its writeback cache. To answer a statx exactly, it has to revoke or downgrade that node's write grant, forcing a flush and a later re-acquire. A plain ls -l, find or monitoring agent on one node can so keep breaking the grant of a writer on another.
Add FUSE_STATX_LIGHT to fuse_statx_in.sx_flags, telling the server that the caller does not need cluster-coherent size, blocks and timestamps and that it may answer from its current values without recalling locks. It is only sent for a user stat() of a regular file without AT_STATX_FORCE_SYNC. Internal attribute updates (SEEK_END, O_APPEND, EOF checks, permission checks, setattr) keep sending full requests.
A light reply may lag behind writes, so it does not update the inode: a stale size must not shrink i_size or the page cache, and i_time, inval_mask and FUSE_I_DLM_LOCKED stay as they were. It only fills the kstat, taking the larger size and the later mtime/ctime of the reply and the inode, so this node still sees its own unflushed writes.