Lines Matching refs:md

392 void medley_add_raiddrive(kdev_t dev, struct medley_metadata *md)  in medley_add_raiddrive()  argument
398 MAJOR(dev), MINOR(dev), md->drive_number, in medley_add_raiddrive()
399 md->drives_per_striped_set, md->chunk_size, in medley_add_raiddrive()
400 md->total_sectors_low, in medley_add_raiddrive()
401 md->total_sectors_low / 1024 / 1024 / 2); in medley_add_raiddrive()
404 if ((raid[c].timestamp[0] == md->creation_timestamp[0]) && in medley_add_raiddrive()
405 (raid[c].timestamp[1] == md->creation_timestamp[1]) && in medley_add_raiddrive()
406 (raid[c].timestamp[2] == md->creation_timestamp[2]) && in medley_add_raiddrive()
407 (raid[c].drives == md->drives_per_striped_set) && in medley_add_raiddrive()
408 (raid[c].chunk_size == md->chunk_size) && in medley_add_raiddrive()
409 ((raid[c].present & (1 << md->drive_number)) == 0)) { in medley_add_raiddrive()
411 raid[c].present |= (1 << md->drive_number); in medley_add_raiddrive()
412 raid[c].members[md->drive_number] = dev; in medley_add_raiddrive()
423 raid[c].timestamp[0] = md->creation_timestamp[0]; in medley_add_raiddrive()
424 raid[c].timestamp[1] = md->creation_timestamp[1]; in medley_add_raiddrive()
425 raid[c].timestamp[2] = md->creation_timestamp[2]; in medley_add_raiddrive()
426 raid[c].drives = md->drives_per_striped_set; in medley_add_raiddrive()
427 raid[c].chunk_size = md->chunk_size; in medley_add_raiddrive()
428 raid[c].sectors_per_row = md->chunk_size * in medley_add_raiddrive()
429 md->drives_per_striped_set; in medley_add_raiddrive()
439 raid[c].present = (1 << md->drive_number); in medley_add_raiddrive()
440 raid[c].members[md->drive_number] = dev; in medley_add_raiddrive()
441 if (md->major_ver == 1) { in medley_add_raiddrive()
442 raid[c].sectors = ((u32 *) (md))[27]; in medley_add_raiddrive()
444 raid[c].sectors = md->total_sectors_low; in medley_add_raiddrive()
461 struct medley_metadata *md; in medley_get_metadata() local
499 md = (void *) (bh->b_data); in medley_get_metadata()
501 if (pcidev->vendor == md->vendor_id && in medley_get_metadata()
502 pcidev->device == md->product_id) { in medley_get_metadata()
512 md->major_ver); in medley_get_metadata()
513 if (((checksum == 0xffff) && (md->major_ver == 1)) in medley_get_metadata()
536 struct medley_metadata *md; in medley_probe_drive() local
542 md = (void *) (bh->b_data); in medley_probe_drive()
544 if (md->raid_type != 0x0) { in medley_probe_drive()
548 } else if (md->major_ver == 2 && md->total_sectors_high != 0) { in medley_probe_drive()
552 } else if (md->major_ver > 0 && md->major_ver > 2) { in medley_probe_drive()
556 major, minor, md->major_ver, md->minor_ver); in medley_probe_drive()
557 } else if (md->drives_per_striped_set > MAX_DRIVES_PER_SET) { in medley_probe_drive()
561 major, minor, md->drives_per_striped_set); in medley_probe_drive()
562 } else if ((md->drive_number > md->drives_per_striped_set) || in medley_probe_drive()
563 (md->drives_per_striped_set < 1) || in medley_probe_drive()
564 (md->chunk_size < 1)) { in medley_probe_drive()
569 medley_add_raiddrive(dev, md); in medley_probe_drive()