Skip to content

Instantly share code, notes, and snippets.

@djwong
djwong / xfsfuzz.sh
Created March 6, 2015 19:19
fuzzy XFS kernel/repair fuzzer script
#!/bin/bash
# Test harness to fuzz a filesystem over and over...
# Copyright (C) 2014 Oracle.
DIR=/tmp
PASSES=10000
SZ=32m
SCRIPT_DIR="$(dirname "$0")"
FEATURES="-m crc=1,finobt=1"
@djwong
djwong / bleh.patch
Created November 4, 2014 23:19
bleh hack fubar meh
diff --git a/lib/blkid/blkid_types.h.in b/lib/blkid/blkid_types.h.in
index 2bb3d85..d4c81d0 100644
--- a/lib/blkid/blkid_types.h.in
+++ b/lib/blkid/blkid_types.h.in
@@ -164,19 +164,4 @@ typedef long __s64;
#undef __S64_TYPEDEF
#undef __U64_TYPEDEF
-#ifdef __CHECKER__
-#define __bitwise __attribute__((bitwise))
@djwong
djwong / fuse2fs-mount.sh
Created October 1, 2013 00:19
fuse2fs fake /bin/mount script. Sort of.
#!/bin/bash
# Mount ext4 via fuse. If you're using this with icsum.sh to use fuse2fs
# instead of the kernel driver, put the fuse2fs binary and this script in a
# directory; rename this script to "mount"; and then put the directory
# containing this script at the head of $PATH before running icsum.sh.
for arg in "$@"; do
if [ -b "${arg}" ]; then
DEV="${arg}"
@djwong
djwong / icsum.sh
Last active December 21, 2015 22:09
ext4 metadata checksumming test script
#!/bin/bash -e
# ext4 metadata checksum test script
# licensed under gplv2
# copyright (c) 2013 oracle corporation. all rights reserved.
function tncmount {
mount "$@" && return 0
sleep 1
set +e
#!/usr/bin/env python
#
# Dumb script to dump (some) of bcache status
# Copyright 2014 Darrick J. Wong. All rights reserved.
#
# This file is part of Bcache. Bcache is free software: you can
# redistribute it and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT