aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent_io.h
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-05-12 13:39:03 -0400
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:04:03 -0400
commit1259ab75c62462b8ffad90067b5e1f6312786a18 (patch)
treeccc6b795e524a74b3fb9666409ca2f7f33bf98dd /fs/btrfs/extent_io.h
parentca7a79ad8dbe24669a8ced01f9fc0126b872745d (diff)
Btrfs: Handle write errors on raid1 and raid10
When duplicate copies exist, writes are allowed to fail to one of those copies. This changeset includes a few changes that allow the FS to continue even when some IOs fail. It also adds verification of the parent generation number for btree blocks. This generation is stored in the pointer to a block, and it ensures that missed writes to are detected. Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/extent_io.h')
-rw-r--r--fs/btrfs/extent_io.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/btrfs/extent_io.h b/fs/btrfs/extent_io.h
index e48346147514..f1960dafaa19 100644
--- a/fs/btrfs/extent_io.h
+++ b/fs/btrfs/extent_io.h
@@ -36,9 +36,12 @@ struct extent_io_ops {
36 int (*readpage_io_failed_hook)(struct bio *bio, struct page *page, 36 int (*readpage_io_failed_hook)(struct bio *bio, struct page *page,
37 u64 start, u64 end, 37 u64 start, u64 end,
38 struct extent_state *state); 38 struct extent_state *state);
39 int (*writepage_io_failed_hook)(struct bio *bio, struct page *page,
40 u64 start, u64 end,
41 struct extent_state *state);
39 int (*readpage_end_io_hook)(struct page *page, u64 start, u64 end, 42 int (*readpage_end_io_hook)(struct page *page, u64 start, u64 end,
40 struct extent_state *state); 43 struct extent_state *state);
41 void (*writepage_end_io_hook)(struct page *page, u64 start, u64 end, 44 int (*writepage_end_io_hook)(struct page *page, u64 start, u64 end,
42 struct extent_state *state); 45 struct extent_state *state);
43 int (*set_bit_hook)(struct inode *inode, u64 start, u64 end, 46 int (*set_bit_hook)(struct inode *inode, u64 start, u64 end,
44 unsigned long old, unsigned long bits); 47 unsigned long old, unsigned long bits);
@@ -212,6 +215,8 @@ int set_extent_buffer_dirty(struct extent_io_tree *tree,
212 struct extent_buffer *eb); 215 struct extent_buffer *eb);
213int set_extent_buffer_uptodate(struct extent_io_tree *tree, 216int set_extent_buffer_uptodate(struct extent_io_tree *tree,
214 struct extent_buffer *eb); 217 struct extent_buffer *eb);
218int clear_extent_buffer_uptodate(struct extent_io_tree *tree,
219 struct extent_buffer *eb);
215int extent_buffer_uptodate(struct extent_io_tree *tree, 220int extent_buffer_uptodate(struct extent_io_tree *tree,
216 struct extent_buffer *eb); 221 struct extent_buffer *eb);
217int map_extent_buffer(struct extent_buffer *eb, unsigned long offset, 222int map_extent_buffer(struct extent_buffer *eb, unsigned long offset,