Skip to content

fix metadata locking - #411

Merged
rhafer merged 5 commits into
mainfrom
fix-metadata-locking
Nov 12, 2025
Merged

rhafer merged 5 commits into
mainfrom
fix-metadata-locking

Conversation

@butonic

@butonic butonic commented Nov 10, 2025

Copy link
Copy Markdown
Member

fixes opencloud-eu/opencloud#1793

This will leave empty mlock files on disk. We MUST NOT delete them, or the inode might change, which will allow more than one goroutine to "lock" the file, because file handles used by FLOCK underneath use the inode.

We need to find another solution if we want to keep the disk tidy. For now, the mlock files have to stay. In posix we have moved them to a metadata folder so they do not clutter the normal files.

@butonic butonic self-assigned this Nov 10, 2025
@butonic
butonic requested a review from rhafer November 10, 2025 12:07
@github-project-automation github-project-automation Bot moved this to Qualification in OpenCloud Team Board Nov 10, 2025
@butonic butonic moved this from Qualification to In Progress in OpenCloud Team Board Nov 10, 2025
@butonic

butonic commented Nov 10, 2025

Copy link
Copy Markdown
Member Author

hm, we should at least delete the mlock file when deleting the file 🤔

Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
@butonic
butonic force-pushed the fix-metadata-locking branch from a0bfab3 to be86d8b Compare November 10, 2025 14:24
@butonic

butonic commented Nov 10, 2025

Copy link
Copy Markdown
Member Author

Leaving opencloud-eu/opencloud#1827 as a followup issue

@butonic

butonic commented Nov 10, 2025 •

Copy link
Copy Markdown
Member Author
  • also recursively purge metadata for decomposedfs
  • use concurrency to speed up listing of trash

@butonic
butonic force-pushed the fix-metadata-locking branch from 7196109 to beb7cab Compare November 11, 2025 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Treesize propagation seems to be broken

2 participants