{
  "schemaVersion": 1,
  "evidenceType": "fiemap-observer-intervention",
  "generatedAt": "2026-10-16T07:07:44.426Z",
  "license": "CC0-1.0",
  "environment": {
    "kernel": "6.8.0-146-generic",
    "architecture": "x64",
    "libc": "glibc 2.39",
    "compiler": "cc (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0",
    "filesystem": {
      "fstype": "ext4",
      "options": "rw,relatime,discard,errors=remount-ro,commit=30"
    }
  },
  "files": [
    {
      "path": "/research/fiemap-observer.c",
      "sha256": "5e069b77a22188d5791b81c72ae0d222f2812ebb9c9c2e5b81b28c0b13cc40d1"
    },
    {
      "path": "/research/fiemap-observer.mjs",
      "sha256": "545ce653992c372aef91c4c4dffc41f154b3e434a460e133f1a6690dfba87a03"
    }
  ],
  "method": {
    "fileBytes": 1048576,
    "temporaryFiles": 9,
    "repeatsPerArm": 3,
    "armOrder": [
      "control",
      "fsync",
      "fiemap-sync"
    ],
    "bufferedWrite": "pwrite of byte pattern (offset % 251) + 1",
    "firstObservation": "fstat, FIEMAP flags 0, fstat; no explicit synchronization",
    "interventions": {
      "control": "Repeat fstat, FIEMAP flags 0, fstat without explicit synchronization",
      "fsync": "Checked fsync, then fstat, FIEMAP flags 0, fstat",
      "fiemap-sync": "fstat, FIEMAP_FLAG_SYNC (1), fstat; no separate fsync"
    },
    "readback": "All bytes checked after the second mapping",
    "allocationCountUnitBytes": 512,
    "extentBufferCapacity": 256,
    "reproduce": "node fiemap-observer.mjs /path/to/disposable-work-directory"
  },
  "runs": [
    {
      "repetition": 1,
      "arm": "control",
      "observations": [
        {
          "stage": "before",
          "requestFlags": 0,
          "returnedFlags": 0,
          "logicalBytes": 1048576,
          "blocks512Before": 2048,
          "blocks512After": 2048,
          "extents": [
            {
              "logicalBytes": 0,
              "lengthBytes": 1048576,
              "flags": 7
            }
          ]
        },
        {
          "stage": "after",
          "requestFlags": 0,
          "returnedFlags": 0,
          "logicalBytes": 1048576,
          "blocks512Before": 2048,
          "blocks512After": 2048,
          "extents": [
            {
              "logicalBytes": 0,
              "lengthBytes": 1048576,
              "flags": 7
            }
          ]
        }
      ],
      "bytesRead": 1048576,
      "mismatchedBytes": 0
    },
    {
      "repetition": 1,
      "arm": "fsync",
      "observations": [
        {
          "stage": "before",
          "requestFlags": 0,
          "returnedFlags": 0,
          "logicalBytes": 1048576,
          "blocks512Before": 2048,
          "blocks512After": 2048,
          "extents": [
            {
              "logicalBytes": 0,
              "lengthBytes": 1048576,
              "flags": 7
            }
          ]
        },
        {
          "stage": "after",
          "requestFlags": 0,
          "returnedFlags": 0,
          "logicalBytes": 1048576,
          "blocks512Before": 2048,
          "blocks512After": 2048,
          "extents": [
            {
              "logicalBytes": 0,
              "lengthBytes": 1048576,
              "flags": 1
            }
          ]
        }
      ],
      "bytesRead": 1048576,
      "mismatchedBytes": 0
    },
    {
      "repetition": 1,
      "arm": "fiemap-sync",
      "observations": [
        {
          "stage": "before",
          "requestFlags": 0,
          "returnedFlags": 0,
          "logicalBytes": 1048576,
          "blocks512Before": 2048,
          "blocks512After": 2048,
          "extents": [
            {
              "logicalBytes": 0,
              "lengthBytes": 1048576,
              "flags": 7
            }
          ]
        },
        {
          "stage": "after",
          "requestFlags": 1,
          "returnedFlags": 1,
          "logicalBytes": 1048576,
          "blocks512Before": 2048,
          "blocks512After": 2048,
          "extents": [
            {
              "logicalBytes": 0,
              "lengthBytes": 1048576,
              "flags": 1
            }
          ]
        }
      ],
      "bytesRead": 1048576,
      "mismatchedBytes": 0
    },
    {
      "repetition": 2,
      "arm": "control",
      "observations": [
        {
          "stage": "before",
          "requestFlags": 0,
          "returnedFlags": 0,
          "logicalBytes": 1048576,
          "blocks512Before": 2048,
          "blocks512After": 2048,
          "extents": [
            {
              "logicalBytes": 0,
              "lengthBytes": 1048576,
              "flags": 7
            }
          ]
        },
        {
          "stage": "after",
          "requestFlags": 0,
          "returnedFlags": 0,
          "logicalBytes": 1048576,
          "blocks512Before": 2048,
          "blocks512After": 2048,
          "extents": [
            {
              "logicalBytes": 0,
              "lengthBytes": 1048576,
              "flags": 7
            }
          ]
        }
      ],
      "bytesRead": 1048576,
      "mismatchedBytes": 0
    },
    {
      "repetition": 2,
      "arm": "fsync",
      "observations": [
        {
          "stage": "before",
          "requestFlags": 0,
          "returnedFlags": 0,
          "logicalBytes": 1048576,
          "blocks512Before": 2048,
          "blocks512After": 2048,
          "extents": [
            {
              "logicalBytes": 0,
              "lengthBytes": 1048576,
              "flags": 7
            }
          ]
        },
        {
          "stage": "after",
          "requestFlags": 0,
          "returnedFlags": 0,
          "logicalBytes": 1048576,
          "blocks512Before": 2048,
          "blocks512After": 2048,
          "extents": [
            {
              "logicalBytes": 0,
              "lengthBytes": 1048576,
              "flags": 1
            }
          ]
        }
      ],
      "bytesRead": 1048576,
      "mismatchedBytes": 0
    },
    {
      "repetition": 2,
      "arm": "fiemap-sync",
      "observations": [
        {
          "stage": "before",
          "requestFlags": 0,
          "returnedFlags": 0,
          "logicalBytes": 1048576,
          "blocks512Before": 2048,
          "blocks512After": 2048,
          "extents": [
            {
              "logicalBytes": 0,
              "lengthBytes": 1048576,
              "flags": 7
            }
          ]
        },
        {
          "stage": "after",
          "requestFlags": 1,
          "returnedFlags": 1,
          "logicalBytes": 1048576,
          "blocks512Before": 2048,
          "blocks512After": 2048,
          "extents": [
            {
              "logicalBytes": 0,
              "lengthBytes": 1048576,
              "flags": 1
            }
          ]
        }
      ],
      "bytesRead": 1048576,
      "mismatchedBytes": 0
    },
    {
      "repetition": 3,
      "arm": "control",
      "observations": [
        {
          "stage": "before",
          "requestFlags": 0,
          "returnedFlags": 0,
          "logicalBytes": 1048576,
          "blocks512Before": 2048,
          "blocks512After": 2048,
          "extents": [
            {
              "logicalBytes": 0,
              "lengthBytes": 1048576,
              "flags": 7
            }
          ]
        },
        {
          "stage": "after",
          "requestFlags": 0,
          "returnedFlags": 0,
          "logicalBytes": 1048576,
          "blocks512Before": 2048,
          "blocks512After": 2048,
          "extents": [
            {
              "logicalBytes": 0,
              "lengthBytes": 1048576,
              "flags": 7
            }
          ]
        }
      ],
      "bytesRead": 1048576,
      "mismatchedBytes": 0
    },
    {
      "repetition": 3,
      "arm": "fsync",
      "observations": [
        {
          "stage": "before",
          "requestFlags": 0,
          "returnedFlags": 0,
          "logicalBytes": 1048576,
          "blocks512Before": 2048,
          "blocks512After": 2048,
          "extents": [
            {
              "logicalBytes": 0,
              "lengthBytes": 1048576,
              "flags": 7
            }
          ]
        },
        {
          "stage": "after",
          "requestFlags": 0,
          "returnedFlags": 0,
          "logicalBytes": 1048576,
          "blocks512Before": 2048,
          "blocks512After": 2048,
          "extents": [
            {
              "logicalBytes": 0,
              "lengthBytes": 1048576,
              "flags": 1
            }
          ]
        }
      ],
      "bytesRead": 1048576,
      "mismatchedBytes": 0
    },
    {
      "repetition": 3,
      "arm": "fiemap-sync",
      "observations": [
        {
          "stage": "before",
          "requestFlags": 0,
          "returnedFlags": 0,
          "logicalBytes": 1048576,
          "blocks512Before": 2048,
          "blocks512After": 2048,
          "extents": [
            {
              "logicalBytes": 0,
              "lengthBytes": 1048576,
              "flags": 7
            }
          ]
        },
        {
          "stage": "after",
          "requestFlags": 1,
          "returnedFlags": 1,
          "logicalBytes": 1048576,
          "blocks512Before": 2048,
          "blocks512After": 2048,
          "extents": [
            {
              "logicalBytes": 0,
              "lengthBytes": 1048576,
              "flags": 1
            }
          ]
        }
      ],
      "bytesRead": 1048576,
      "mismatchedBytes": 0
    }
  ],
  "summary": [
    {
      "arm": "control",
      "files": 3,
      "delayedBefore": 3,
      "delayedAfter": 3,
      "accountingUnchanged": 3
    },
    {
      "arm": "fsync",
      "files": 3,
      "delayedBefore": 3,
      "delayedAfter": 0,
      "accountingUnchanged": 3
    },
    {
      "arm": "fiemap-sync",
      "files": 3,
      "delayedBefore": 3,
      "delayedAfter": 0,
      "accountingUnchanged": 3
    }
  ],
  "limits": [
    "Nine files on one host, not nine independent machines or a filesystem population.",
    "Background writeback can race with either observation; a flags-zero query is not a frozen snapshot.",
    "No assertion requires DELALLOC to appear; a repeat may observe already-written extents.",
    "fstat and FIEMAP are sequential observations, not an atomic combined snapshot.",
    "st_blocks is filesystem accounting, including reservations on some implementations, not a backend occupancy meter.",
    "No timing, fragmentation ranking, power-loss test, thin-pool measurement or equivalence of FIEMAP sync and fsync durability contracts.",
    "Unsupported operations fail; no mount changes, global cache dropping, raw-device access or existing user-file writes."
  ]
}
