Why? Because XFS inodes have a generation number (to handle inode reuse), and the low-level API lets us pass that back to the kernel’s dcache.
This is where the kernel-to-userspace shift gets interesting. In the kernel, XFS uses xfs_buf_t with b_ops for verification. In fuse-xfs , we just cast: fuse-xfs
struct xfs_agf *agf = (struct xfs_agf *)(ag->map + XFS_AGF_OFFSET); if (be32_to_cpu(agf->agf_magicnum) != XFS_AGF_MAGIC) return -EINVAL; // or crash, which is more fun No buffer cache. No I/O scheduling. Just the filesystem’s raw data laid out in virtual memory. XFS’s extent B+tree is elegant: internal nodes point to other blocks, leaves point to extents. In kernel space, traversing it is cheap. In fuse-xfs , every bmap lookup might require reading several blocks—each of which is a pread() or a memory access, depending on your cache. In the kernel, XFS uses xfs_buf_t with b_ops