aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/volumes.h
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-08-05 10:13:57 -0400
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:04:06 -0400
commit7d2b4daa67379960477568abda62b8ba9ee3a8aa (patch)
treeaa24628bd7a0db2f827da77b86c9df94c19d6355 /fs/btrfs/volumes.h
parentae01a0abf343aefe923ace5c1a8c634adfbe29c5 (diff)
Btrfs: Fix the multi-bio code to save the original bio for completion
The multi-bio code is responsible for duplicating blocks in raid1 and single spindle duplication. It has counters to make sure all of the locations for a given extent are properly written before io completion is returned to the higher layers. But, it didn't always complete the same bio it was given, sometimes a clone was completed instead. This lead to problems with the async work queues because they saved a pointer to the bio in a struct off bi_private. The fix is to remember the original bio and only complete that one. Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/volumes.h')
-rw-r--r--fs/btrfs/volumes.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/volumes.h b/fs/btrfs/volumes.h
index 48a44f7a9385..c50e50580b51 100644
--- a/fs/btrfs/volumes.h
+++ b/fs/btrfs/volumes.h
@@ -95,6 +95,7 @@ struct btrfs_bio_stripe {
95struct btrfs_multi_bio { 95struct btrfs_multi_bio {
96 atomic_t stripes_pending; 96 atomic_t stripes_pending;
97 bio_end_io_t *end_io; 97 bio_end_io_t *end_io;
98 struct bio *orig_bio;
98 void *private; 99 void *private;
99 atomic_t error; 100 atomic_t error;
100 int max_errors; 101 int max_errors;