A bunch of my thesis work involved hacking on existing systems (specifically, LVM & device-mapper, Xen and iptables). Here are some independent pieces, that may (or may not) be of use to folks into this kind of stuff. I will take the pain to convert all this into html and link the source code (with some documentation, as bonus), if I hear atleast 6 people asking me for it ;). And, this I doubt. Anyways, fwiw, here goes.. Linux Branching Storage Sys (LVM) If you missed ZFS- or NetApp Filer-like (or even CVS-like) instant clones and snapshots for Linux filesystems, this may be of some use to you. My hacks add such functionality to LVM snapshots. Basically, in addition to snapshots (which I've made read-only), you have branches (or clones), which you can create off (or more accurately ``branch off'') snapshots. You can create further snapshots off these branches and so forth recursively. Watch out for memory consumption and runtime overheads with wider branching levels -- in the worst case metadata lookups may happen all the way from a snapshot/branch down until the original volume. Additionally, branch writes are now way cheaper when compared to writes to the current LVM snapshots. But the catch is, you have to match FS block size (that's right, this only works for fixed blocksize FSes) with the LVM chunksize. Time-chained snapshots (LVM) When you take plenty of snapshots off an LVM volume, writes to the volume can really really suffer. The problem is that LVM treats all snapshots of a volume as independent, so does copy-on-write (COW) to each of them. My hack chains multiple snapshots of a volume (based on time of creation), so that volume writes always incur a constant (equal to a single snapshot) COW overhead independent of the number of snapshots. Utilities for dumping mappings, merging and re-ordering of snapshot exception store (LVM) Need for dumping and merging may be evident. The (offline) re-ordering thingy could improve I/O performance to these snapshot/branch devices. Rate-limited mirroring with `preferred read mirror' (LVM) LVM mirrors were found to sync data at a rapid pace, disrupting normal I/O activity considerably. So, I've added two parameters to rate-limit syncing activity (One parameter says at what rate of the normal I/O, should rate-limiting kick in. The other parameter says what the rate-limited syncing rate should be). Further, there is now an option to choose the mirror that reads should preferentially go to when the data is in sync across mirrors (e.g., I use this to direct reads to a local mirror, as opposed to a remote mirror). Online FS-aware free-block detection (LVM) A kernel module (that plugs into the DM ``snapshot-origin'' target) for tracking FS free-blocks corresponding to the on-disk data, at any point in time. I've used it for two purposes. First, this helps reduce snapshot COW overheads. How? -- by not doing COW for those data blocks that were actually free as of the time of creating snapshots (copying their original content is not required because they were anyway free from an FS-perspective). Second, in the VM suspend/resume environment this may be useful for disk-space reductions. Here, a simple parsing-the-disk-with-FS-knowledge kind of approach won't work, because you have the VM memory to deal with. It has been implemented for Linux EXT FS. Packet logging and replay (iptables) Minor extensions to ULOG target for logging packets (yup, including ethernet headers) that are received on an interface, without (or with) delivering them to the application. New iptables extension for replaying these packets at a later time. (Optionally) Queueing of incoming packets while replay is in progress. Continuous time flow (or Virtualize time) across VM suspend and resume (Xen) When a Xen VM is resumed after being suspended for a while, the applications in the VM see a sudden time jump. We let VM time continue from the moment of suspend. This works for para-virtualized Xen (Linux) user VMs. In-kernel NFS protocol parsing and timestamp mangling (iptables) I simply ported Dan Ellard's nfsdump packet parsing to the Linux kernel and wrapped it into an iptables target. After parsing NFS packets, this target can ``transduce'' file timestamps based on the specified parameters. What for? -- I needed this when time virtualized VMs (see previous point) interacts with an external NFS server, so that files don't show weird future times. Ok, ok, I know what you're thinking. ``God, why am I ever going to need things like these?'' You're blessed if you don't. There are certainly more interesting and important things in life than inevitably buggy software.