* mount: drop a peer-unlinked name only while its inode keeps another
Move the survivor check from followSurvivingLink into InodeToPath.RemoveAlias
so the check and the removal happen under one table lock.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* mount: follow a peer unlink to the surviving hard link for closed inodes
A peer deleting one name of a hard link only moved an open handle to the
surviving name. A closed inode kept the deleted name as its primary path, so
the next open by the kernel's nodeid failed with ENOENT.
Co-authored-by: skymazer <54621405+skymazer@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* mount: share the cached-entry freshness check of peer invalidations
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* mount: keep a name a local rename reclaimed before the peer unlink arrived
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* mount: keep a name a local rename or link gave the inode after an older peer delete
The cached-entry check only covers a cached parent. InodeToPath now records,
per hard-linked inode, the newest name a local rename or link gave it with
the filer stamp, and the closed-inode peer-delete path keeps that name when
the delete is older. The record lives in a side map dropped on Forget, so
InodeEntry keeps its size class.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* filer: sign rename stream responses with the filer signature
A rename response carries the stamp of the filer that applied it, so the mount
can tell which clock the stamp belongs to, as it does for create acks.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* mount: order a peer delete against a local rename or link only on one filer clock
The stamp of a local rename or link comes from the filer that applied it, and
a delete logged by another filer runs on a different clock. Keep the name only
when both carry the same nonzero filer signature; otherwise drop it as before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* mount: drop the local-name stamp fence for uncached parents
Ordering a delayed peer delete against a local rename by filer stamp needs a
record per alias, a shared filer clock, and the open-handle path to follow;
that is a larger change than this fix. Back to the cached-entry check, which
covers a cached parent.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: skymazer <54621405+skymazer@users.noreply.github.com>
* mount: record a hard link's looked-up names on its inode
Lookup mapped a second name of a hard-linked file to the existing inode
without adding it to the inode's names, so GetAllPaths missed it and the
final forget left it mapped to a released inode.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* mount: keep an open file publishing when a peer unlinks one of its names
A delete event from another client marked the inode's open handle deleted
even when other names still held the hard-linked file, so every later
fsync reported success without saving metadata. The delete event's entry
carries the link count the filer decided on, so an alias delete now drops
only that name, keeps the handle on a name this mount knows, and has the
next flush read the survivor's stored entry before publishing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* mount: test peer unlinks of a hard link name held open
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* mount: leave an unlinked file out of the periodic metadata flush
flushFileMetadata did not check the handle's delete mark. A file
unlinked while open before its deferred create reached the filer was
created again by the next periodic flush, which expects no entry.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* 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>
* mount: test the periodic flush after a peer unlinks a hard link name
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>