Repository navigation
Conversation
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. Signed-off-by: Horst Birthelmer <hbirthelmer@ddn.com>
|
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. |
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.