diff options
author | NeilBrown <neilb@cse.unsw.edu.au> | 2005-09-09 19:23:53 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-09 19:39:12 -0400 |
commit | 0002b2718dd04da67c21f8a7830de8d95a9b0345 (patch) | |
tree | c84f916df71293e0e15643a8a07d9508d1404395 /include/linux/raid | |
parent | 773f7834425e83144c95fbbc553ced3c2b74b828 (diff) |
[PATCH] md: limit size of sb read/written to appropriate amount
version-1 superblocks are not (normally) 4K long, and can be of variable size.
Writing the full 4K can cause corruption (but only in non-default
configurations).
With this patch the super-block-flavour can choose a size to read, and set a
size to write based on what it finds.
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')
-rw-r--r-- | include/linux/raid/md_k.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h index 8042f55dd323..ebce949b1443 100644 --- a/include/linux/raid/md_k.h +++ b/include/linux/raid/md_k.h | |||
@@ -102,6 +102,7 @@ struct mdk_rdev_s | |||
102 | int sb_loaded; | 102 | int sb_loaded; |
103 | sector_t data_offset; /* start of data in array */ | 103 | sector_t data_offset; /* start of data in array */ |
104 | sector_t sb_offset; | 104 | sector_t sb_offset; |
105 | int sb_size; /* bytes in the superblock */ | ||
105 | int preferred_minor; /* autorun support */ | 106 | int preferred_minor; /* autorun support */ |
106 | 107 | ||
107 | /* A device can be in one of three states based on two flags: | 108 | /* A device can be in one of three states based on two flags: |