diff options
author | NeilBrown <neilb@cse.unsw.edu.au> | 2005-09-09 19:23:47 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-09 19:39:10 -0400 |
commit | 4b6d287f627b5fb6a49f78f9e81649ff98c62bb7 (patch) | |
tree | 7b6cbc6a997e25a7fb6185da7129e539c4ffda8b /include/linux/raid/md_k.h | |
parent | 8ddf9efe6708f3674f0ddfeb6425fd27bea109a2 (diff) |
[PATCH] md: add write-behind support for md/raid1
If a device is flagged 'WriteMostly' and the array has a bitmap, and the
bitmap superblock indicates that write_behind is allowed, then write_behind is
enabled for WriteMostly devices.
Write requests will be acknowledges as complete to the caller (via b_end_io)
when all non-WriteMostly devices have completed the write, but will not be
cleared from the bitmap until all devices complete.
This requires memory allocation to make a local copy of the data being
written. If there is insufficient memory, then we fall-back on normal write
semantics.
Signed-Off-By: Paul Clements <paul.clements@steeleye.com>
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/raid/md_k.h')
-rw-r--r-- | include/linux/raid/md_k.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h index 7ef78e15ce04..2514e5fcda7f 100644 --- a/include/linux/raid/md_k.h +++ b/include/linux/raid/md_k.h | |||
@@ -275,6 +275,9 @@ struct mddev_s | |||
275 | atomic_t writes_pending; | 275 | atomic_t writes_pending; |
276 | request_queue_t *queue; /* for plugging ... */ | 276 | request_queue_t *queue; /* for plugging ... */ |
277 | 277 | ||
278 | atomic_t write_behind; /* outstanding async IO */ | ||
279 | unsigned int max_write_behind; /* 0 = sync */ | ||
280 | |||
278 | struct bitmap *bitmap; /* the bitmap for the device */ | 281 | struct bitmap *bitmap; /* the bitmap for the device */ |
279 | struct file *bitmap_file; /* the bitmap file */ | 282 | struct file *bitmap_file; /* the bitmap file */ |
280 | long bitmap_offset; /* offset from superblock of | 283 | long bitmap_offset; /* offset from superblock of |