Fuse-xfs Apr 2026

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.

Or, Why I Spent a Weekend Reimplementing a Journaling Filesystem as a Debugging Tool fuse-xfs

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. struct xfs_agf *agf = (struct xfs_agf *)(ag->map +

But fuse-xfs isn’t a port. It’s a reconstruction . XFS’s extent B+tree is elegant: internal nodes point

fuse-xfs is available at github.com/yourname/fuse-xfs . Use it on loopback files only. I am not responsible for lost data, but I am responsible for your sudden, deep understanding of B+trees.

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: