9 Feb 22:38
[PATCH/RFC] Btrfs: Add conditional ENOSPC debugging.
Mitch Harder <mitch.harder <at> sabayonlinux.org>
2012-02-09 21:38:41 GMT
2012-02-09 21:38:41 GMT
This patch isn't intended for inclusion in the kernel, but is provided to facilitate ENOSPC debugging in a framework that will have no impact on Btrfs unless compiled conditionally. Debugging printk statements are wrapped in #ifdef macros to allow btrfs to be built in its original form unless debugging is explicitly requested when the kernel is built. The debugging can be enabled as follows: KCFLAGS="-DBTRFS_DEBUG_ENOSPC" \ KCPPFLAGS="-DBTRFS_DEBUG_ENOSPC" \ make The patch was constructed by searching the Btrfs code for "ENOSPC", and inserting printk statements as appropriate if the occurance was a generation point for an ENOSPC. I initially developed this patch to track down where ENOSPC errors were being generated when using zlib compression. This patch will occasionally generate some false positives, since ENOSPC conditions are sometimes corrected before returning an error to the caller. It is also interesting for highlighting all the places in Btrfs where an ENOSPC can be generated. Signed-off-by: Mitch Harder <mitch.harder <at> sabayonlinux.org> --- fs/btrfs/delayed-inode.c | 10 ++++ fs/btrfs/extent-tree.c | 84 +++++++++++++++++++++++++++++++++(Continue reading)
RSS Feed