You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
posix: with enable_fs_revisions every upload fails at finalize #840
pkg/storage/fs/posix/blobstore/blobstore.go, Upload, renames the upload source into
place on the default (same-device) path (os.Rename(source, tempName)). Later, when copyTarget != "", it calls os.Open(source) to write the "current" copy. The source no
longer exists, so Upload returns an error after the blob was already stored. Tree.WriteBlob passes a non-empty copyTarget exactly when EnableFSRevisions
(STORAGE_USERS_POSIX_ENABLE_FS_REVISIONS) is set, so finalizing every upload fails and the
file stays in processing.
Separately, Blobstore.canUseRenameForUpload is a plain bool written by concurrent
uploads when a rename fails with EXDEV: a data race.
Steps to reproduce
Set STORAGE_USERS_POSIX_ENABLE_FS_REVISIONS=true (posix driver).
Upload a file.
Or call Blobstore.Upload(n, source, copyTarget) with a copy target on the rename path;
see the test in the linked PR.
Expected behavior
The upload finalizes; the file and its "current" copy match the uploaded content.
Actual behavior
could not open source file '<upload>' for reading; WriteBlob fails and the upload is
not finalized. go test -race with concurrent cross-device uploads reports a race on canUseRenameForUpload (written at blobstore.go:77, read at :70).
Setup
reva 11d87fb6b985, posix driver. The option is off by default.
The first part of this is fixed by #807, merged on 2026-10-13. It is the same bug as opencloud-eu/opencloud#3462, which is closed now. Upload keeps a handle on the stored blob and writes the copy target from it, so uploads with enable_fs_revisions finalize again.
The data race is still there. On main, canUseRenameForUpload is a plain bool (blobstore.go:49), read at line 70 and written at line 77. #841 also changes the copy-target code, so it overlaps with #807.
Activity
NickWalters commentedon Oct 14, 2026
The first part of this is fixed by #807, merged on 2026-10-13. It is the same bug as opencloud-eu/opencloud#3462, which is closed now.
Uploadkeeps a handle on the stored blob and writes the copy target from it, so uploads withenable_fs_revisionsfinalize again.The data race is still there. On main,
canUseRenameForUploadis a plainbool(blobstore.go:49), read at line 70 and written at line 77. #841 also changes the copy-target code, so it overlaps with #807.Mortimer-RR commentedon Oct 14, 2026
Thank you! #841 (comment) I've updated #841 to remove the changes to the copy-target code.