WebAssembly / WebAssembly/WASI

fsync on directories on Windows

Open
#756 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

P-filesystem S-inactive
Dominant language
Rust
Stars
5.8k
Forks
333
Avg merge
2d 13h
Merged PRs (30d)
3

Description

In POSIX circles, which WASI generally tries to follow, there are some use cases for fsyncing a directory, to ensure that a file's directory entry has been written to storage.

However, on Windows, there's FlushFileBuffers for syncing files to storage, but it only works on files. There doesn't appear to be a way to do this for directories. There is some discussion in the FlushFileBuffers documentation about optimizing buffering, but I don't see any documentation about syncing directory entries.

Should Windows implementations of the sync function just silently succeed, indicating that the implementation did the best it could? Or should it unconditionally fail to signal that nothing could be done?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the WASI sync function semantics and the linked FlushFileBuffers documentation, focusing on directory support on Windows. Compare the possible silent-success and unconditional-failure behaviors and record the chosen specification outcome as done.

Written by the indexing model from the issue text.

Assessment

Domain
operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.