Files
Mykhaylo Sul b5a23bb553 erofs: add fsync_on_commit to sync a layer before its commit
Commit records a snapshot in the metadata store, which syncs its own
file, while layer.erofs and the snapshot directory may still be in the
page cache. A power loss shortly after a pull can then leave a committed
snapshot whose blob is corrupt or whose directory is missing. A later
pull does nothing because the chain ID exists, and running the image
fails to mount the layer.

With fsync_on_commit = true, Commit fsyncs everything in the snapshot
directory, the directory itself and snapshots/ before the snapshot is
recorded. Blobs served from a layer content cache are not synced. The
option is off by default and lives in the snapshotter because the
differ's SyncFs does not reach Commit, where the walking differ's blob
is created.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Mykhaylo Sul <mykhaylo.sul@oss.qualcomm.com>
2026-10-14 18:55:32 +00:00
..
2026-03-15 18:24:15 +01:00
2026-03-17 13:36:11 +01:00
2026-03-17 13:36:17 +01:00
2026-03-15 18:24:15 +01:00
2026-09-01 16:54:55 +02:00