printf(" Raid Level : %s\n", c?c:"-unknown-");
if ((int)sb->level >= 0) {
int ddsks=0;
- printf(" Device Size : %d%s\n", sb->size, human_size((long long)sb->size<<10));
+ printf(" Used Dev Size : %d%s\n", sb->size,
+ human_size((long long)sb->size<<10));
switch(sb->level) {
case 1: ddsks=1;break;
case 4:
info->array.ctime = sb->ctime;
info->array.utime = sb->utime;
info->array.chunk_size = sb->chunk_size;
+ info->array.state = sb->state;
info->component_size = sb->size*2;
info->disk.state = sb->this_disk.state;
return MD_NEW_SIZE_SECTORS(devsize);
}
-static int add_internal_bitmap0(struct supertype *st, void *sbv, int chunk, int delay, int write_behind, unsigned long long size, int may_change, int major)
+static int add_internal_bitmap0(struct supertype *st, void *sbv, int *chunkp,
+ int delay, int write_behind,
+ unsigned long long size, int may_change,
+ int major)
{
/*
* The bitmap comes immediately after the superblock and must be 60K in size
unsigned long long bits;
unsigned long long max_bits = 60*1024*8;
unsigned long long min_chunk;
+ int chunk = *chunkp;
mdp_super_t *sb = sbv;
bitmap_super_t *bms = (bitmap_super_t*)(((char*)sb) + MD_SB_BYTES);
bms->daemon_sleep = __cpu_to_le32(delay);
bms->sync_size = __cpu_to_le64(size);
bms->write_behind = __cpu_to_le32(write_behind);
-
+ *chunkp = chunk;
return 1;
}