diff options
author | NeilBrown <neilb@suse.de> | 2011-07-27 21:31:47 -0400 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2011-07-27 21:31:47 -0400 |
commit | 2699b67223aca6b1450fc2f72e40fada952afc85 (patch) | |
tree | c84d0cbb763ad03cd770a218a37f0f1ec31118af /drivers/md/md.h | |
parent | 34b343cff4354ab9864be83be88405fd53d928a0 (diff) |
md: load/store badblock list from v1.x metadata
Space must have been allocated when array was created.
A feature flag is set when the badblock list is non-empty, to
ensure old kernels don't load and trust the whole device.
We only update the on-disk badblocklist when it has changed.
If the badblocklist (or other metadata) is stored on a bad block, we
don't cope very well.
If metadata has no room for bad block, flag bad-blocks as disabled,
and do the same for 0.90 metadata.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/md.h')
-rw-r--r-- | drivers/md/md.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/md/md.h b/drivers/md/md.h index 85af8433f8b8..aea9e9ff8a33 100644 --- a/drivers/md/md.h +++ b/drivers/md/md.h | |||
@@ -55,7 +55,7 @@ struct mdk_rdev_s | |||
55 | struct block_device *meta_bdev; | 55 | struct block_device *meta_bdev; |
56 | struct block_device *bdev; /* block device handle */ | 56 | struct block_device *bdev; /* block device handle */ |
57 | 57 | ||
58 | struct page *sb_page; | 58 | struct page *sb_page, *bb_page; |
59 | int sb_loaded; | 59 | int sb_loaded; |
60 | __u64 sb_events; | 60 | __u64 sb_events; |
61 | sector_t data_offset; /* start of data in array */ | 61 | sector_t data_offset; /* start of data in array */ |
@@ -127,6 +127,9 @@ struct mdk_rdev_s | |||
127 | u64 *page; /* badblock list */ | 127 | u64 *page; /* badblock list */ |
128 | int changed; | 128 | int changed; |
129 | seqlock_t lock; | 129 | seqlock_t lock; |
130 | |||
131 | sector_t sector; | ||
132 | sector_t size; /* in sectors */ | ||
130 | } badblocks; | 133 | } badblocks; |
131 | }; | 134 | }; |
132 | 135 | ||