diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-17 16:39:11 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-17 16:39:11 -0500 |
commit | 9228ff90387e276ad67b10c0eb525c9d6a57d5e9 (patch) | |
tree | e7c87b68daba7cf7ca4c342c6b52165bd78fbe16 /block | |
parent | 9360b53661a2c7754517b2925580055bacc8ec38 (diff) | |
parent | d2ec180c23a5a1bfe34d8638b0342a47c00cf70f (diff) |
Merge branch 'for-3.8/drivers' of git://git.kernel.dk/linux-block
Pull block driver update from Jens Axboe:
"Now that the core bits are in, here are the driver bits for 3.8. The
branch contains:
- A huge pile of drbd bits that were dumped from the 3.7 merge
window. Following that, it was both made perfectly clear that
there is going to be no more over-the-wall pulls and how the
situation on individual pulls can be improved.
- A few cleanups from Akinobu Mita for drbd and cciss.
- Queue improvement for loop from Lukas. This grew into adding a
generic interface for waiting/checking an even with a specific
lock, allowing this to be pulled out of md and now loop and drbd is
also using it.
- A few fixes for xen back/front block driver from Roger Pau Monne.
- Partition improvements from Stephen Warren, allowing partiion UUID
to be used as an identifier."
* 'for-3.8/drivers' of git://git.kernel.dk/linux-block: (609 commits)
drbd: update Kconfig to match current dependencies
drbd: Fix drbdsetup wait-connect, wait-sync etc... commands
drbd: close race between drbd_set_role and drbd_connect
drbd: respect no-md-barriers setting also when changed online via disk-options
drbd: Remove obsolete check
drbd: fixup after wait_even_lock_irq() addition to generic code
loop: Limit the number of requests in the bio list
wait: add wait_event_lock_irq() interface
xen-blkfront: free allocated page
xen-blkback: move free persistent grants code
block: partition: msdos: provide UUIDs for partitions
init: reduce PARTUUID min length to 1 from 36
block: store partition_meta_info.uuid as a string
cciss: use check_signature()
cciss: cleanup bitops usage
drbd: use copy_highpage
drbd: if the replication link breaks during handshake, keep retrying
drbd: check return of kmalloc in receive_uuids
drbd: Broadcast sync progress no more often than once per second
drbd: don't try to clear bits once the disk has failed
...
Diffstat (limited to 'block')
-rw-r--r-- | block/genhd.c | 8 | ||||
-rw-r--r-- | block/partitions/efi.c | 7 | ||||
-rw-r--r-- | block/partitions/msdos.c | 21 |
3 files changed, 21 insertions, 15 deletions
diff --git a/block/genhd.c b/block/genhd.c index 2a6fdf539a69..9a289d7c84bb 100644 --- a/block/genhd.c +++ b/block/genhd.c | |||
@@ -743,7 +743,6 @@ void __init printk_all_partitions(void) | |||
743 | struct hd_struct *part; | 743 | struct hd_struct *part; |
744 | char name_buf[BDEVNAME_SIZE]; | 744 | char name_buf[BDEVNAME_SIZE]; |
745 | char devt_buf[BDEVT_SIZE]; | 745 | char devt_buf[BDEVT_SIZE]; |
746 | char uuid_buf[PARTITION_META_INFO_UUIDLTH * 2 + 5]; | ||
747 | 746 | ||
748 | /* | 747 | /* |
749 | * Don't show empty devices or things that have been | 748 | * Don't show empty devices or things that have been |
@@ -762,16 +761,11 @@ void __init printk_all_partitions(void) | |||
762 | while ((part = disk_part_iter_next(&piter))) { | 761 | while ((part = disk_part_iter_next(&piter))) { |
763 | bool is_part0 = part == &disk->part0; | 762 | bool is_part0 = part == &disk->part0; |
764 | 763 | ||
765 | uuid_buf[0] = '\0'; | ||
766 | if (part->info) | ||
767 | snprintf(uuid_buf, sizeof(uuid_buf), "%pU", | ||
768 | part->info->uuid); | ||
769 | |||
770 | printk("%s%s %10llu %s %s", is_part0 ? "" : " ", | 764 | printk("%s%s %10llu %s %s", is_part0 ? "" : " ", |
771 | bdevt_str(part_devt(part), devt_buf), | 765 | bdevt_str(part_devt(part), devt_buf), |
772 | (unsigned long long)part_nr_sects_read(part) >> 1 | 766 | (unsigned long long)part_nr_sects_read(part) >> 1 |
773 | , disk_name(disk, part->partno, name_buf), | 767 | , disk_name(disk, part->partno, name_buf), |
774 | uuid_buf); | 768 | part->info ? part->info->uuid : ""); |
775 | if (is_part0) { | 769 | if (is_part0) { |
776 | if (disk->driverfs_dev != NULL && | 770 | if (disk->driverfs_dev != NULL && |
777 | disk->driverfs_dev->driver != NULL) | 771 | disk->driverfs_dev->driver != NULL) |
diff --git a/block/partitions/efi.c b/block/partitions/efi.c index 6296b403c67a..b62fb88b8711 100644 --- a/block/partitions/efi.c +++ b/block/partitions/efi.c | |||
@@ -620,7 +620,6 @@ int efi_partition(struct parsed_partitions *state) | |||
620 | gpt_entry *ptes = NULL; | 620 | gpt_entry *ptes = NULL; |
621 | u32 i; | 621 | u32 i; |
622 | unsigned ssz = bdev_logical_block_size(state->bdev) / 512; | 622 | unsigned ssz = bdev_logical_block_size(state->bdev) / 512; |
623 | u8 unparsed_guid[37]; | ||
624 | 623 | ||
625 | if (!find_valid_gpt(state, &gpt, &ptes) || !gpt || !ptes) { | 624 | if (!find_valid_gpt(state, &gpt, &ptes) || !gpt || !ptes) { |
626 | kfree(gpt); | 625 | kfree(gpt); |
@@ -649,11 +648,7 @@ int efi_partition(struct parsed_partitions *state) | |||
649 | state->parts[i + 1].flags = ADDPART_FLAG_RAID; | 648 | state->parts[i + 1].flags = ADDPART_FLAG_RAID; |
650 | 649 | ||
651 | info = &state->parts[i + 1].info; | 650 | info = &state->parts[i + 1].info; |
652 | /* Instead of doing a manual swap to big endian, reuse the | 651 | efi_guid_unparse(&ptes[i].unique_partition_guid, info->uuid); |
653 | * common ASCII hex format as the interim. | ||
654 | */ | ||
655 | efi_guid_unparse(&ptes[i].unique_partition_guid, unparsed_guid); | ||
656 | part_pack_uuid(unparsed_guid, info->uuid); | ||
657 | 652 | ||
658 | /* Naively convert UTF16-LE to 7 bits. */ | 653 | /* Naively convert UTF16-LE to 7 bits. */ |
659 | label_max = min(sizeof(info->volname) - 1, | 654 | label_max = min(sizeof(info->volname) - 1, |
diff --git a/block/partitions/msdos.c b/block/partitions/msdos.c index 5f79a6677c69..8752a5d26565 100644 --- a/block/partitions/msdos.c +++ b/block/partitions/msdos.c | |||
@@ -94,6 +94,17 @@ static int aix_magic_present(struct parsed_partitions *state, unsigned char *p) | |||
94 | return ret; | 94 | return ret; |
95 | } | 95 | } |
96 | 96 | ||
97 | static void set_info(struct parsed_partitions *state, int slot, | ||
98 | u32 disksig) | ||
99 | { | ||
100 | struct partition_meta_info *info = &state->parts[slot].info; | ||
101 | |||
102 | snprintf(info->uuid, sizeof(info->uuid), "%08x-%02x", disksig, | ||
103 | slot); | ||
104 | info->volname[0] = 0; | ||
105 | state->parts[slot].has_info = true; | ||
106 | } | ||
107 | |||
97 | /* | 108 | /* |
98 | * Create devices for each logical partition in an extended partition. | 109 | * Create devices for each logical partition in an extended partition. |
99 | * The logical partitions form a linked list, with each entry being | 110 | * The logical partitions form a linked list, with each entry being |
@@ -106,7 +117,8 @@ static int aix_magic_present(struct parsed_partitions *state, unsigned char *p) | |||
106 | */ | 117 | */ |
107 | 118 | ||
108 | static void parse_extended(struct parsed_partitions *state, | 119 | static void parse_extended(struct parsed_partitions *state, |
109 | sector_t first_sector, sector_t first_size) | 120 | sector_t first_sector, sector_t first_size, |
121 | u32 disksig) | ||
110 | { | 122 | { |
111 | struct partition *p; | 123 | struct partition *p; |
112 | Sector sect; | 124 | Sector sect; |
@@ -166,6 +178,7 @@ static void parse_extended(struct parsed_partitions *state, | |||
166 | } | 178 | } |
167 | 179 | ||
168 | put_partition(state, state->next, next, size); | 180 | put_partition(state, state->next, next, size); |
181 | set_info(state, state->next, disksig); | ||
169 | if (SYS_IND(p) == LINUX_RAID_PARTITION) | 182 | if (SYS_IND(p) == LINUX_RAID_PARTITION) |
170 | state->parts[state->next].flags = ADDPART_FLAG_RAID; | 183 | state->parts[state->next].flags = ADDPART_FLAG_RAID; |
171 | loopct = 0; | 184 | loopct = 0; |
@@ -437,6 +450,7 @@ int msdos_partition(struct parsed_partitions *state) | |||
437 | struct partition *p; | 450 | struct partition *p; |
438 | struct fat_boot_sector *fb; | 451 | struct fat_boot_sector *fb; |
439 | int slot; | 452 | int slot; |
453 | u32 disksig; | ||
440 | 454 | ||
441 | data = read_part_sector(state, 0, §); | 455 | data = read_part_sector(state, 0, §); |
442 | if (!data) | 456 | if (!data) |
@@ -491,6 +505,8 @@ int msdos_partition(struct parsed_partitions *state) | |||
491 | #endif | 505 | #endif |
492 | p = (struct partition *) (data + 0x1be); | 506 | p = (struct partition *) (data + 0x1be); |
493 | 507 | ||
508 | disksig = le32_to_cpup((__le32 *)(data + 0x1b8)); | ||
509 | |||
494 | /* | 510 | /* |
495 | * Look for partitions in two passes: | 511 | * Look for partitions in two passes: |
496 | * First find the primary and DOS-type extended partitions. | 512 | * First find the primary and DOS-type extended partitions. |
@@ -515,11 +531,12 @@ int msdos_partition(struct parsed_partitions *state) | |||
515 | put_partition(state, slot, start, n); | 531 | put_partition(state, slot, start, n); |
516 | 532 | ||
517 | strlcat(state->pp_buf, " <", PAGE_SIZE); | 533 | strlcat(state->pp_buf, " <", PAGE_SIZE); |
518 | parse_extended(state, start, size); | 534 | parse_extended(state, start, size, disksig); |
519 | strlcat(state->pp_buf, " >", PAGE_SIZE); | 535 | strlcat(state->pp_buf, " >", PAGE_SIZE); |
520 | continue; | 536 | continue; |
521 | } | 537 | } |
522 | put_partition(state, slot, start, size); | 538 | put_partition(state, slot, start, size); |
539 | set_info(state, slot, disksig); | ||
523 | if (SYS_IND(p) == LINUX_RAID_PARTITION) | 540 | if (SYS_IND(p) == LINUX_RAID_PARTITION) |
524 | state->parts[slot].flags = ADDPART_FLAG_RAID; | 541 | state->parts[slot].flags = ADDPART_FLAG_RAID; |
525 | if (SYS_IND(p) == DM6_PARTITION) | 542 | if (SYS_IND(p) == DM6_PARTITION) |