mount: read a pending link change before a periodic metadata flush

Only flushMetadataToFiler applied linkRefresh. After a peer unlinked one
name, the periodic flush kept publishing over the old link count, so the
filer refused every one until a regular flush ran.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Chris LuandClaude Opus 5.5 committed 2026-11-13 02:58:26 -08:00
1 parent 30a90ab1ed
commit 1787a31209
1 file changed
+5
+5
View File
@@ -112,6 +112,11 @@ func (wfs *WFS) flushFileMetadata(fh *FileHandle) error {
if fh.GetEntry() == nil {
return nil
}
if fh.linkRefresh != nil {
if err := wfs.adoptStoredLink(context.Background(), fh, fileFullPath, fh.linkRefresh); err != nil {
return err
}
}
// Snapshot the current chunk list. Async uploader goroutines call
// entry.AppendChunks while we run CompactFileChunks / MaybeManifestize