← Blog
0.6.0 · protocol + VFS

NFS3 + SMB2 Network Protocol Stack: LINK, IOCTL, CHANGE_NOTIFY, tmpfs Rename

June 22, 2026 · sigil-fs · Sigil-Docs
fs nfs3 smb2 network vfs 0.6.0

Four protocol and VFS landings close out the sigil-fs 0.6.0 network stack: NFS3 LINK completes all 15 NFS3 standard procedures; SMB2 IOCTL adds FSCTL dispatch; CHANGE_NOTIFY and OPLOCK_BREAK finish all 18 SMB2 commands; tmpfs rename is wired via vfsdev_rename_path. 348/348 ALL PASS (bbf52ae, d73f287, d332828)


NFS3 LINK (proc 15)

nfs3_link.sg — the final NFS3 standard procedure. Wire format:

call:  [file_fh][dir_fh][name_opaque]
reply: [status][has_link_attrs][post_op_attr][wcc_data]

Signatures: nfs3_link_call(buf, xid, file_fh_id, dir_fh_id, name_ptr, name_len) and nfs3_link_parse(buf, xid). The reply carries optional post-op file attributes (has_link_attrs flag) and weak cache consistency data (wcc_data) for the target directory. With proc 15 landing, all 15 NFS3 standard operations are complete.


SMB2 IOCTL (cmd 11)

smb2_ioctl.sg — FSCTL dispatch layer. Signatures: smb2_ioctl_call and smb2_ioctl_parse. Three FSCTL constants implemented:


tmpfs rename

d332828 wires tmpfs_rename_in(old_par, old_ptr, old_n, new_par, new_ptr, new_n): O(n) scan of the parent directory, updates the parent pointer and name field in-place. No copy needed for same-parent renames. Routed via vfsdev_rename_path.

Surrounding VFS completions in the same sprint: 985cc49 adds vfs_mkdir / vfs_unlink / vfs_rename / vfs_readdir; eb39db6 adds vfs_fwrite + vfs_stat. The combined harness hit 346/346 before the IOCTL and CHANGE_NOTIFY pushes brought the total to 348.


Protocol completion matrix

ProtocolProc/Cmd rangeCountStatus
NFS3proc 0–15 (NULL through COMMIT + LINK)15 procsCOMPLETE
SMB2cmd 0–18 (NEGOTIATE through OPLOCK_BREAK)18 cmdsCOMPLETE
tmpfs VFScreate/read/write/stat/mkdir/unlink/rename/readdir8 opsCOMPLETE
NFS3 procNameNFS3 procName
0NULL8CREATE
1GETATTR9MKDIR
2SETATTR10SYMLINK
3LOOKUP11MKNOD
4ACCESS12REMOVE
5READLINK13RMDIR
6READ14RENAME
7WRITE15LINK ✓