{
  "slug": "filesystem-block",
  "term": "Filesystem block",
  "aliases": [
    "file system block",
    "filesystem block size"
  ],
  "definition": "A filesystem block is a filesystem-defined unit used to address file data or metadata, distinct from a device's logical sector.",
  "note": "Ext4 records structure locations as block numbers rather than absolute byte offsets; its block size is selected when the filesystem is created. This describes ext4's layout, not every system's use of the word block. [ext4-blocks]\n\nWith ext4 bigalloc, the allocation bitmap tracks clusters of multiple blocks. The filesystem block and allocation unit therefore describe different layers even within one filesystem. Neither name specifies an application's I/O request size. [ext4-bigalloc]\n\nA small ext4 file may store its data inside the inode instead of receiving a separate data block. Distinguish logical file length, allocated data space and metadata when reporting storage use. [ext4-inline]\n\nFreeBSD newfs configures both a block size and a fragment size for UFS1/UFS2. Block size alone therefore does not specify the smallest allocation granularity. [freebsd-newfs]\n\nAPI fields named block size need their own units. On Linux, st_blksize is an I/O-size hint, whereas st_blocks counts allocated space in 512-byte units. Multiplying st_blocks by st_blksize is not the documented conversion to bytes. [linux-stat] These file-level fields are separate from statvfs block counters, which use f_frsize. [linux-statvfs]",
  "status": "shipping",
  "advantages": [],
  "limitations": [],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-11-01",
  "related": [
    "allocation-unit",
    "ext4",
    "ext4-bigalloc",
    "logical-sector",
    "file-extent",
    "sparse-file",
    "statvfs"
  ],
  "citations": [
    {
      "id": "ext4-blocks",
      "title": "Linux kernel documentation: ext4 blocks and block-number addressing",
      "url": "https://docs.kernel.org/filesystems/ext4/blocks.html",
      "accessed": "2026-11-01"
    },
    {
      "id": "ext4-bigalloc",
      "title": "Linux kernel documentation: ext4 clustered allocation",
      "url": "https://docs.kernel.org/filesystems/ext4/bigalloc.html",
      "accessed": "2026-11-01"
    },
    {
      "id": "ext4-inline",
      "title": "Linux kernel documentation: ext4 inline data",
      "url": "https://docs.kernel.org/filesystems/ext4/inlinedata.html",
      "accessed": "2026-11-01"
    },
    {
      "id": "freebsd-newfs",
      "title": "FreeBSD newfs(8): separate block-size and fragment-size parameters",
      "url": "https://man.freebsd.org/cgi/man.cgi?query=newfs&sektion=8&format=html",
      "accessed": "2026-11-01"
    },
    {
      "id": "linux-stat",
      "title": "Linux man-pages: stat(3type), logical length, preferred I/O size and allocated-block units",
      "url": "https://man7.org/linux/man-pages/man3/stat.3type.html",
      "accessed": "2026-11-01"
    },
    {
      "id": "linux-statvfs",
      "title": "Linux man-pages: statvfs(3), block-counter units and field-availability limits",
      "url": "https://man7.org/linux/man-pages/man3/statvfs.3.html",
      "accessed": "2026-11-01"
    },
    {
      "id": "linux-stat-portability",
      "title": "Linux man-pages: stat(2), portability of st_blocks and st_blksize",
      "url": "https://man7.org/linux/man-pages/man2/stat.2.html",
      "accessed": "2026-11-01"
    }
  ],
  "provenance": [
    "Ext4 is an explicit example, not a universal fixed-block-size requirement for all filesystems.",
    "The st_blocks and st_blksize interpretation above is scoped to Linux, not a cross-platform guarantee. [linux-stat-portability]"
  ]
}
