summaryrefslogtreecommitdiffstats
path: root/drivers/md/md.h
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2011-07-28 11:31:47 +1000
committerNeilBrown <neilb@suse.de>2011-07-28 11:31:47 +1000
commit2699b67223aca6b1450fc2f72e40fada952afc85 (patch)
treec84d0cbb763ad03cd770a218a37f0f1ec31118af /drivers/md/md.h
parent34b343cff4354ab9864be83be88405fd53d928a0 (diff)
downloadlinux-2699b67223aca6b1450fc2f72e40fada952afc85.tar.gz
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.h5
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;
};