diff options
author | NeilBrown <neilb@suse.de> | 2009-12-14 12:49:54 +1100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2009-12-14 12:51:41 +1100 |
commit | f6af949c5672115313cc3c976d85b0533f607d7e (patch) | |
tree | 6d00471bd4ee7c3aee67f9ad4c0a3023109b88e0 /drivers/md/md.h | |
parent | 9cd30fdc33cde9ae4ac55a1ccbbb89f3f7b9b2f2 (diff) | |
download | lwn-f6af949c5672115313cc3c976d85b0533f607d7e.tar.gz lwn-f6af949c5672115313cc3c976d85b0533f607d7e.zip |
md: support bitmap offset appropriate for external-metadata arrays.
For md arrays were metadata is managed externally, the kernel does not
know about a superblock so the superblock offset is 0.
If we want to have a write-intent-bitmap near the end of the
devices of such an array, we should support sector_t sized offset.
We need offset be possibly negative for when the bitmap is before
the metadata, so use loff_t instead.
Also add sanity check that bitmap does not overlap with data.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/md.h')
-rw-r--r-- | drivers/md/md.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/md/md.h b/drivers/md/md.h index 4b07e0ab3841..df692953a12f 100644 --- a/drivers/md/md.h +++ b/drivers/md/md.h @@ -282,11 +282,13 @@ struct mddev_s struct bitmap *bitmap; /* the bitmap for the device */ struct { struct file *file; /* the bitmap file */ - long offset; /* offset from superblock of + loff_t offset; /* offset from superblock of * start of bitmap. May be * negative, but not '0' + * For external metadata, offset + * from start of device. */ - long default_offset; /* this is the offset to use when + loff_t default_offset; /* this is the offset to use when * hot-adding a bitmap. It should * eventually be settable by sysfs. */ |