Blogs ›

A memo for Linux I/O and Filesystem

November 27, 2025
DBMS

A memo for Linux I/O and Filesystem, collected from AI chat threads

This memo is an extended memo for this post, consolidates knowledge about:

  • VFS & Filesystem Delegation
  • File descriptors & open file table
  • stdio / unbuffered / direct I/O
  • Page Cache, Writeback
  • fsync vs fdatasync (accurate across ext4, XFS, Btrfs, ZFS)
  • open flags
  • Pipes, dup2
  • fork, clone, exec
  • splice / zero-copy design

Designed as a reference entry for systems and storage engine development.

...

Rust type categories

December 17, 2024
rust

Notes for the rust type categories

For rust fundamental types, the serde crate serializer and deserializer provide a reasonable type categories for grouping the complex types when serializing or deserializing a type.

...

Reference in Rust vs. C++

March 20, 2024
rust

Notes for the reference in rust

Switching to Rust from C++ would encounter this question: does the reference sematics in rust is same as the C++?, Let’s describe it with an example.

...

Kubernetes LoadBalancer Service with MetalLB

May 24, 2023

In kubernetes, LoadBalancer is the most common way of exposing backend applications to the outside world. Its API is very similar to NodePort with the only exception being the spec.type: LoadBalancer. At the very least, a user is expected to define which ports to expose and a label selector to match backend Pods:

...

Leak debugging with LeakSanitizer

May 22, 2023

LeakSanitizer internally uses ptrace, probably to suspend all threads such that it can scan for leaks without false positives (see issue 9). Only one application can use ptrace, so if we run application under gdb or strace, then LeakSanitizer won’t be able to attach via ptrace. if we are using clion, it probably end up with a error message like “LeakSanitizer does not work under ptrace (strace, gdb, etc)”

...

big-endian vs. little-endian

May 16, 2023

Big-endian and little-endian are two byte ordering schemes used to store multibyte data types (such as integers and floating-point numbers) in computer memory.

...