summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorJosef Bacik <jbacik@fusionio.com>2013-08-05 11:15:21 -0400
committerChris Mason <chris.mason@fusionio.com>2013-09-01 08:04:47 -0400
commit36cce922875563a1e2a4b6a53fbe1147f652a51e (patch)
treefad46576765b99267f7906de13343886f8a5a361 /fs/btrfs/ctree.h
parent0f0fe8f710f29dbd4b2c915fc1c36962e4957b3b (diff)
downloadop-kernel-dev-36cce922875563a1e2a4b6a53fbe1147f652a51e.zip
op-kernel-dev-36cce922875563a1e2a4b6a53fbe1147f652a51e.tar.gz
Btrfs: handle errors when doing slow caching
Alex Lyakas reported a bug where wait_block_group_cache_progress() would wait forever if a drive failed. This is because we just bail out if there is an error while trying to cache a block group, we don't update anybody who may be waiting. So this introduces a new enum for the cache state in case of error and makes everybody bail out if we have an error. Alex tested and verified this patch fixed his problem. This fixes bz 59431. Thanks, Signed-off-by: Josef Bacik <jbacik@fusionio.com> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r--fs/btrfs/ctree.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index cbb1263..c17acbc 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -1188,6 +1188,7 @@ enum btrfs_caching_type {
BTRFS_CACHE_STARTED = 1,
BTRFS_CACHE_FAST = 2,
BTRFS_CACHE_FINISHED = 3,
+ BTRFS_CACHE_ERROR = 4,
};
enum btrfs_disk_cache_state {
OpenPOWER on IntegriCloud