btrfs: replace many BUG_ONs with proper error handling
authorJeff Mahoney <jeffm@suse.com>
Mon, 12 Mar 2012 15:03:00 +0000 (16:03 +0100)
committerDavid Sterba <dsterba@suse.cz>
Thu, 22 Mar 2012 10:52:54 +0000 (11:52 +0100)
commit79787eaab46121d4713ed03c8fc63b9ec3eaec76
treeee6b17d0811ee54ab74a03aa4e0bb92769d2f12a
parent49b25e0540904be0bf558b84475c69d72e4de66e
btrfs: replace many BUG_ONs with proper error handling

 btrfs currently handles most errors with BUG_ON. This patch is a work-in-
 progress but aims to handle most errors other than internal logic
 errors and ENOMEM more gracefully.

 This iteration prevents most crashes but can run into lockups with
 the page lock on occasion when the timing "works out."

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
23 files changed:
fs/btrfs/compression.c
fs/btrfs/ctree.c
fs/btrfs/delayed-inode.c
fs/btrfs/dir-item.c
fs/btrfs/disk-io.c
fs/btrfs/export.c
fs/btrfs/extent-tree.c
fs/btrfs/extent_io.c
fs/btrfs/file-item.c
fs/btrfs/file.c
fs/btrfs/free-space-cache.c
fs/btrfs/inode-item.c
fs/btrfs/inode-map.c
fs/btrfs/inode.c
fs/btrfs/ioctl.c
fs/btrfs/orphan.c
fs/btrfs/relocation.c
fs/btrfs/root-tree.c
fs/btrfs/scrub.c
fs/btrfs/super.c
fs/btrfs/transaction.c
fs/btrfs/tree-log.c
fs/btrfs/volumes.c