diff options
author | Josef Bacik <jbacik@fusionio.com> | 2013-08-05 15:15:21 (GMT) |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2013-09-01 12:04:47 (GMT) |
commit | 36cce922875563a1e2a4b6a53fbe1147f652a51e (patch) | |
tree | fad46576765b99267f7906de13343886f8a5a361 /fs/btrfs/ctree.h | |
parent | 0f0fe8f710f29dbd4b2c915fc1c36962e4957b3b (diff) | |
download | linux-36cce922875563a1e2a4b6a53fbe1147f652a51e.tar.xz |
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.h | 1 |
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 { |