1a1eabcadf
Add 0036-UP-fix-state-handling.patch * handle transport-offline and quiesce sysfs state Add 0037-UP-fix-params-size.patch Add 0038-RH-fix-multipath.rules.patch * make sure multipath's link priority gets increased Add 0039-RH-handle-other-sector-sizes.patch * allow gpt partitions on 4k sector size block devices. Add 0040-RH-fix-output-buffer.patch * fix multipath -ll for large configuration.
32 lines
1.0 KiB
Diff
32 lines
1.0 KiB
Diff
---
|
|
kpartx/gpt.c | 9 ++++++---
|
|
1 file changed, 6 insertions(+), 3 deletions(-)
|
|
|
|
Index: multipath-tools-120821/kpartx/gpt.c
|
|
===================================================================
|
|
--- multipath-tools-120821.orig/kpartx/gpt.c
|
|
+++ multipath-tools-120821/kpartx/gpt.c
|
|
@@ -637,6 +637,7 @@ read_gpt_pt (int fd, struct slice all, s
|
|
uint32_t i;
|
|
int n = 0;
|
|
int last_used_index=-1;
|
|
+ int sector_size_mul = get_sector_size(fd)/512;
|
|
|
|
if (!find_valid_gpt (fd, &gpt, &ptes) || !gpt || !ptes) {
|
|
if (gpt)
|
|
@@ -652,9 +653,11 @@ read_gpt_pt (int fd, struct slice all, s
|
|
sp[n].size = 0;
|
|
n++;
|
|
} else {
|
|
- sp[n].start = __le64_to_cpu(ptes[i].starting_lba);
|
|
- sp[n].size = __le64_to_cpu(ptes[i].ending_lba) -
|
|
- __le64_to_cpu(ptes[i].starting_lba) + 1;
|
|
+ sp[n].start = sector_size_mul *
|
|
+ __le64_to_cpu(ptes[i].starting_lba);
|
|
+ sp[n].size = sector_size_mul *
|
|
+ (__le64_to_cpu(ptes[i].ending_lba) -
|
|
+ __le64_to_cpu(ptes[i].starting_lba) + 1);
|
|
last_used_index=n;
|
|
n++;
|
|
}
|