diff options
author | NeilBrown <neilb@suse.de> | 2011-07-28 03:31:47 +0200 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2011-07-28 03:31:47 +0200 |
commit | 2699b67223aca6b1450fc2f72e40fada952afc85 (patch) | |
tree | c84d0cbb763ad03cd770a218a37f0f1ec31118af /drivers/md/md.h | |
parent | md: don't allow arrays to contain devices with bad blocks. (diff) | |
download | linux-2699b67223aca6b1450fc2f72e40fada952afc85.tar.xz linux-2699b67223aca6b1450fc2f72e40fada952afc85.zip |
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 struct block_device *meta_bdev; struct block_device *bdev; /* block device handle */ - struct page *sb_page; + struct page *sb_page, *bb_page; int sb_loaded; __u64 sb_events; sector_t data_offset; /* start of data in array */ @@ -127,6 +127,9 @@ struct mdk_rdev_s u64 *page; /* badblock list */ int changed; seqlock_t lock; + + sector_t sector; + sector_t size; /* in sectors */ } badblocks; }; |