diff options
author | Neil Brown <neilb@suse.de> | 2005-08-25 04:31:44 +0000 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2005-08-25 04:31:44 +0000 |
commit | 34163fc7cfa4346ca7f2ca08039e0c5a3cf901ab (patch) | |
tree | d435caab2002739a704d35fe70ede2ab7afd1321 /super0.c | |
parent | eb3b43aa2a44e590e3cb3129d1e29df45d18a22a (diff) | |
download | mdadm-34163fc7cfa4346ca7f2ca08039e0c5a3cf901ab.tar.gz mdadm-34163fc7cfa4346ca7f2ca08039e0c5a3cf901ab.tar.xz mdadm-34163fc7cfa4346ca7f2ca08039e0c5a3cf901ab.zip |
Support internal bitmaps with format-1 superblocks.
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
Diffstat (limited to 'super0.c')
-rw-r--r-- | super0.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -472,7 +472,7 @@ static int store_super0(struct supertype *st, int fd, void *sbv) return 0; } -static int write_init_super0(struct supertype *st, void *sbv, mdu_disk_info_t *dinfo, char *devname) +static int write_init_super0(struct supertype *st, void *sbv, mdu_disk_info_t *dinfo, char *devname, int reserve) { mdp_super_t *sb = sbv; int fd = open(devname, O_RDWR|O_EXCL); @@ -664,14 +664,15 @@ static struct supertype *match_metadata_desc0(char *arg) return NULL; } -static __u64 avail_size0(__u64 devsize) +static __u64 avail_size0(struct supertype *st, __u64 devsize, int reserve) { if (devsize < MD_RESERVED_SECTORS*2) return 0ULL; + if (reserve > 64*2) return 0ULL; return MD_NEW_SIZE_SECTORS(devsize); } -static int add_internal_bitmap0(void *sbv, int chunk, int delay, int write_behind, unsigned long long size) +static int add_internal_bitmap0(struct supertype *st, void *sbv, int chunk, int delay, int write_behind, unsigned long long size) { /* * The bitmap comes immediately after the superblock and must be 60K in size |