return 1;
}
-static void detail_super0(struct supertype *st, char *homehost)
+static void detail_super0(struct supertype *st, char *homehost, char *subarray)
{
mdp_super_t *sb = st->sb;
printf(" UUID : ");
printf("\n Events : %d.%d\n\n", sb->events_hi, sb->events_lo);
}
-static void brief_detail_super0(struct supertype *st)
+static void brief_detail_super0(struct supertype *st, char *subarray)
{
mdp_super_t *sb = st->sb;
printf(" UUID=");
* up 4 bytes before continuing
*/
__u32 *sb32 = (__u32*)sb;
- memcpy(sb32+MD_SB_GENERIC_CONSTANT_WORDS+7,
- sb32+MD_SB_GENERIC_CONSTANT_WORDS+7+1,
- (MD_SB_WORDS - (MD_SB_GENERIC_CONSTANT_WORDS+7+1))*4);
+
+ memmove(sb32+MD_SB_GENERIC_CONSTANT_WORDS+7,
+ sb32+MD_SB_GENERIC_CONSTANT_WORDS+7+1,
+ (MD_SB_WORDS - (MD_SB_GENERIC_CONSTANT_WORDS+7+1))*4);
if (verbose >= 0)
pr_err("adjusting superblock of %s for 2.2/sparc compatibility.\n",
devname);
* being marked 'sync'
*/
add = (1<<MD_DISK_SYNC);
- if (((sb->disks[d].state & ~mask) | add)
- != (unsigned)info->disk.state) {
+ if (((sb->disks[d].state & ~mask) | add) !=
+ (unsigned)info->disk.state) {
sb->disks[d].state = info->disk.state | wonly |failfast;
rv = 1;
}
* valid. If it doesn't clear the bit. An --assemble --force
* should get that written out.
*/
- if (read(fd, super+1, ROUND_UP(sizeof(struct bitmap_super_s),4096))
- != ROUND_UP(sizeof(struct bitmap_super_s),4096))
+ if (read(fd, super+1, ROUND_UP(sizeof(struct bitmap_super_s),4096)) !=
+ ROUND_UP(sizeof(struct bitmap_super_s), 4096))
goto no_bitmap;
uuid_from_super0(st, uuid);
if (*chunk == UnSet)
*chunk = DEFAULT_CHUNK;
+ if (level == 0 && layout != UnSet) {
+ if (verbose)
+ pr_err("0.90 metadata does not support layouts for RAID0\n");
+ return 0;
+ }
+
if (!subdev)
return 1;