| Previous | Next |
| ERROR_ENCRYPTED_IO_NOT_POSSIBLE | ERROR_QUOTA_ACTIVITY |
ERROR_FILE_METADATA_OPTIMIZATION_IN_PROGRESS
File metadata optimization is already in progress.
ERROR_FILE_METADATA_OPTIMIZATION_IN_PROGRESS is Win32 error 809 (0x329) and belongs to filesystem metadata optimization. The system description identifies the immediate condition but does not identify the caller, object, policy, device, service instance, or transition that produced it.
Interpret this result at the API boundary that returned it. Capture it before logging, cleanup, or another Windows call can replace the thread-local last-error value. Compare the recorded inputs with the documented precondition for filesystem metadata optimization rather than starting with a broad system repair.
Where the result appears
- This result can surface during a filesystem maintenance request that compacts or reorganizes metadata.
- This result can surface during volume servicing code coordinating a long-running optimization.
- It can surface during administrative tooling polling the state of an optimization job.
- It can surface during a second caller attempting to start work already owned by another request.
Likely causes
- an earlier metadata optimization has not completed.
- the service or filesystem retained an active operation context after the initiating process disconnected.
- two maintenance tools scheduled overlapping work on the same volume.
- the operation is progressing normally but the caller interpreted the state as a hard failure.
Diagnostic sequence
Diagnosis of it starts with the exact request type: read, write, create, transition, validation, cancellation, or administrative action. Identify the object generation and subsystem owner, then decide whether the failure happened before side effects, during a partial transition, or after completion. This ordering matters in filesystem metadata optimization because a blind retry can hide stale state or repeat a non-idempotent change.
- record volume GUID and filesystem type.
- record identifier and start time of the active optimization request.
- record maintenance events and filesystem operational logs.
- record whether the first owner still has a live handle or service job.
- record free space and I/O latency during the optimization window.
Correlate it with the owning component’s operational log, the Windows System log, and any subsystem trace. Telemetry for this Win32 error should preserve native identifiers such as a path or file ID, handle generation, node or peer identity, policy ID, object version, offset and length, or transaction token. Retain decimal 809, hexadecimal 0x329, and the producing API even when a localized message is also shown.
State boundary to prove
The decisive boundary for this Win32 error is whether an earlier metadata optimization has not completed. Prove or disprove that proposition using volume GUID and filesystem type together with identifier and start time of the active optimization request. When observations for this Win32 error disagree, preserve both and inspect the transition between them instead of choosing the more convenient value.
A focused validation for this Win32 error should recreate the relevant part of this situation: two scheduled maintenance tasks overlap after a delayed boot. The second receives this code, records the active job, and exits cleanly instead of competing for the same metadata structures. The negative case should keep the responsible condition unchanged and confirm error 809; the recovery case should change only that condition and verify a successful result without an unrecorded side effect.
Handling, retry, and recovery
Do not start a parallel optimizer. Observe the existing operation, wait for its documented completion state, and retry only after the volume reports that no optimization is active.
Retry it only after evidence shows a change in filesystem metadata optimization. Initialization, asynchronous completion, recall, or service readiness can justify bounded backoff; malformed metadata, invalid identifiers, policy rejection, unsupported versions, and integrity failures require correction. Before repeating a write or configuration operation after it, query completion state explicitly.
What to log for support and telemetry
- log decimal 809, hexadecimal
0x329, and the producing API. - log the target object and observed filesystem metadata optimization state.
- log caller identity, process and thread IDs, machine or node identity, and UTC time.
- log attempt number, elapsed time, previous result, and any partial side effect.
- retain the first lower-level or component-specific error before Win32 translation.
Difference from nearby codes
The code does not mean that general file metadata is unavailable; it reports serialization of a specific maintenance activity.
Practical example
Two scheduled maintenance tasks overlap after a delayed boot.
Developer and administrator guidance
Code that handles it should keep its Win32 domain visible across exceptions, RPC responses, and JSON or REST wrappers. Administrators should verify the subsystem evidence before changing policy, deleting state, forcing failover, or replacing storage. Recovery is demonstrated only when a test observes 809, changes the responsible condition, and confirms that the same operation succeeds without hidden data loss.
References
- Microsoft: System Error Codes (500–999) — reference for error 809.
- Microsoft: File management functions — reference for error 809.
Looking for a different code? Search another status or error code.