{
  "slug": "file-flag-no-buffering",
  "term": "FILE_FLAG_NO_BUFFERING",
  "aliases": [
    "Windows unbuffered file I/O"
  ],
  "definition": "FILE_FLAG_NO_BUFFERING is a Windows CreateFile flag that disables system caching for data reads and writes through the opened file or device handle.",
  "note": "The flag does not change hardware disk caching or memory-mapped access. File metadata may still be cached; FlushFileBuffers addresses that separate boundary. Cache bypass alone is not a durability guarantee. [windows-create-file] [windows-file-caching]\n\nFor seekable files, transfer lengths and offsets must be multiples of the volume's logical sector size. The documentation separately recommends physical-sector alignment for unbuffered I/O, including buffer addresses. An aligned allocation does not validate the request length or offset. Query the actual geometry instead of assuming 512 or 4096 bytes. [windows-file-buffering]\n\nSTORAGE_ACCESS_ALIGNMENT_DESCRIPTOR reports BytesPerLogicalSector, BytesPerPhysicalSector and BytesOffsetForSectorAlignment. The last field locates the first logical sector within a physical sector; it is not an application-buffer address. [windows-storage-alignment]\n\nFILE_FLAG_WRITE_THROUGH is independent and can be combined with NO_BUFFERING. The combination also requests hardware-cache write-through, subject to device support. Neither alignment nor cache bypass supplies a multi-operation transaction. [windows-create-file]",
  "related": [
    "file-flag-write-through",
    "flush-file-buffers",
    "flush-view-of-file",
    "direct-io",
    "direct-io-alignment",
    "512e",
    "4kn-native"
  ],
  "citations": [
    {
      "id": "windows-create-file",
      "title": "Microsoft: CreateFileA, Caching Behavior and independent file flags",
      "url": "https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilea#caching-behavior",
      "accessed": "2026-11-14"
    },
    {
      "id": "windows-file-caching",
      "title": "Microsoft: File Caching, write-through and metadata",
      "url": "https://learn.microsoft.com/en-us/windows/win32/fileio/file-caching",
      "accessed": "2026-11-14"
    },
    {
      "id": "windows-file-buffering",
      "title": "Microsoft: File Buffering, alignment and hardware-cache scope",
      "url": "https://learn.microsoft.com/en-us/windows/win32/fileio/file-buffering",
      "accessed": "2026-11-14"
    },
    {
      "id": "windows-storage-alignment",
      "title": "Microsoft: STORAGE_ACCESS_ALIGNMENT_DESCRIPTOR, logical and physical sector geometry",
      "url": "https://learn.microsoft.com/en-us/windows/win32/api/winioctl/ns-winioctl-storage_access_alignment_descriptor",
      "accessed": "2026-11-14"
    },
    {
      "id": "hesela-windows-flush",
      "title": "Hesela: Windows mapped-file synchronization and cache boundaries",
      "url": "https://hesela.com/analyses/mmap-visibility-size-durability/#windows-flush",
      "accessed": "2026-11-14"
    }
  ],
  "provenance": [
    "Microsoft Win32 documentation reviewed 14 November 2026; no Windows runtime, power-loss or remote-server experiment was performed.",
    "Related POSIX and Linux APIs are comparisons, not claims of equivalent completion or error semantics."
  ],
  "status": "shipping",
  "advantages": [],
  "limitations": [],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-11-14"
}
