basebuilder_pel7ppc64bebuilder0
7 years ago
51 changed files with 7176 additions and 0 deletions
@ -0,0 +1,35 @@
@@ -0,0 +1,35 @@
|
||||
From 7ed256294ba287c807eca7bcc915a42f0030e5f9 Mon Sep 17 00:00:00 2001 |
||||
From: "Brian C. Lane" <bcl@redhat.com> |
||||
Date: Wed, 22 Jan 2014 11:57:56 -0800 |
||||
Subject: [PATCH] tests: Remove rmmod loop from t8001 (#1040504) |
||||
|
||||
There is no reason to remove and reload the loop module, which may be in |
||||
use by other things on the system the test is running on. |
||||
|
||||
* tests/t8001-loop-blkpg.sh: Drop loop remove/load code. |
||||
--- |
||||
tests/t8001-loop-blkpg.sh | 8 -------- |
||||
1 file changed, 8 deletions(-) |
||||
|
||||
diff --git a/tests/t8001-loop-blkpg.sh b/tests/t8001-loop-blkpg.sh |
||||
index deef18b..abffd4e 100755 |
||||
--- a/tests/t8001-loop-blkpg.sh |
||||
+++ b/tests/t8001-loop-blkpg.sh |
||||
@@ -27,14 +27,6 @@ cleanup_fn_() |
||||
&& { udevadm settle --timeout=3; losetup -d "$loopdev"; } |
||||
} |
||||
|
||||
-# If the loop module is loaded, unload it first |
||||
-if lsmod | grep '^loop[[:space:]]'; then |
||||
- rmmod loop || fail=1 |
||||
-fi |
||||
- |
||||
-# Insert loop module with max_part > 1 |
||||
-modprobe loop max_part=7 || fail=1 |
||||
- |
||||
# Create backing file |
||||
dd if=/dev/zero of=backing_file bs=1M count=4 >/dev/null 2>&1 || fail=1 |
||||
|
||||
-- |
||||
1.8.4.2 |
||||
|
@ -0,0 +1,45 @@
@@ -0,0 +1,45 @@
|
||||
From 9f0da5d1112d148fc9bdbedfe3f0ee04b7a66708 Mon Sep 17 00:00:00 2001 |
||||
From: "Brian C. Lane" <bcl@redhat.com> |
||||
Date: Wed, 22 Jan 2014 14:51:51 -0800 |
||||
Subject: [PATCH] tests: Increase size of container filesystem in t4100 tests |
||||
(#1036149) |
||||
|
||||
The xfs container filesystem was running out of space with larger sector |
||||
size tests. Increase it from 20M to 100M. |
||||
|
||||
* tests/t4100-dvh-partition-limits.sh: Increase fs_file to 100M |
||||
* tests/t4100-msdos-partition-limits.sh: Increase fs_file to 100M |
||||
--- |
||||
tests/t4100-dvh-partition-limits.sh | 2 +- |
||||
tests/t4100-msdos-partition-limits.sh | 2 +- |
||||
2 files changed, 2 insertions(+), 2 deletions(-) |
||||
|
||||
diff --git a/tests/t4100-dvh-partition-limits.sh b/tests/t4100-dvh-partition-limits.sh |
||||
index d885502..ec6981d 100755 |
||||
--- a/tests/t4100-dvh-partition-limits.sh |
||||
+++ b/tests/t4100-dvh-partition-limits.sh |
||||
@@ -37,7 +37,7 @@ mp=`pwd`/mount-point |
||||
n=4096 |
||||
|
||||
# create an XFS file system |
||||
-dd if=/dev/zero of=$fs bs=1MB count=2 seek=20 || fail=1 |
||||
+dd if=/dev/zero of=$fs bs=1MB count=2 seek=100 || fail=1 |
||||
mkfs.xfs -f -q $fs || fail=1 |
||||
mkdir "$mp" || fail=1 |
||||
|
||||
diff --git a/tests/t4100-msdos-partition-limits.sh b/tests/t4100-msdos-partition-limits.sh |
||||
index ec1854f..f03a85e 100755 |
||||
--- a/tests/t4100-msdos-partition-limits.sh |
||||
+++ b/tests/t4100-msdos-partition-limits.sh |
||||
@@ -37,7 +37,7 @@ mp=`pwd`/mount-point |
||||
n=4096 |
||||
|
||||
# create an XFS file system |
||||
-dd if=/dev/zero of=$fs bs=1MB count=2 seek=20 || fail=1 |
||||
+dd if=/dev/zero of=$fs bs=1MB count=2 seek=100 || fail=1 |
||||
mkfs.xfs -f -q $fs || fail=1 |
||||
mkdir "$mp" || fail=1 |
||||
|
||||
-- |
||||
1.8.4.2 |
||||
|
@ -0,0 +1,36 @@
@@ -0,0 +1,36 @@
|
||||
From 2b55a78efa8e11202c8c5b266bc6e80386487f4d Mon Sep 17 00:00:00 2001 |
||||
From: "Brian C. Lane" <bcl@redhat.com> |
||||
Date: Wed, 22 Jan 2014 17:17:25 -0800 |
||||
Subject: [PATCH] tests: Disable t4100-dvh test for now (#1036093) |
||||
|
||||
This test is failing on ppc64, possibly because of a bug in the dvh |
||||
code. |
||||
|
||||
* tests/Makefile.am: Move t4100-dvh- test to XFAIL |
||||
--- |
||||
tests/Makefile.am | 4 ++-- |
||||
1 file changed, 2 insertions(+), 2 deletions(-) |
||||
|
||||
diff --git a/tests/Makefile.am b/tests/Makefile.am |
||||
index 98310f2..faa0f37 100644 |
||||
--- a/tests/Makefile.am |
||||
+++ b/tests/Makefile.am |
||||
@@ -1,5 +1,6 @@ |
||||
XFAIL_TESTS = \ |
||||
- t3200-type-change.sh |
||||
+ t3200-type-change.sh \ |
||||
+ t4100-dvh-partition-limits.sh |
||||
|
||||
TEST_EXTENSIONS = .sh |
||||
SH_LOG_COMPILER = $(SHELL) |
||||
@@ -48,7 +49,6 @@ TESTS = \ |
||||
t4000-sun-raid-type.sh \ |
||||
t4001-sun-vtoc.sh \ |
||||
t4100-msdos-partition-limits.sh \ |
||||
- t4100-dvh-partition-limits.sh \ |
||||
t4100-msdos-starting-sector.sh \ |
||||
t4200-partprobe.sh \ |
||||
t4300-nilfs2-tiny.sh \ |
||||
-- |
||||
1.8.4.2 |
||||
|
@ -0,0 +1,56 @@
@@ -0,0 +1,56 @@
|
||||
From 911bc52b2609ccb2cc3b123ce383b07c66d54048 Mon Sep 17 00:00:00 2001 |
||||
From: Phillip Susi <psusi@ubuntu.com> |
||||
Date: Mon, 4 Nov 2013 13:10:09 -0500 |
||||
Subject: [PATCH] libparted: make sure not to treat percentages as exact |
||||
(#1045957) |
||||
|
||||
If 1% of the drive size worked out ot be an even power of |
||||
two, it would trigger the exact placement. Add an exception |
||||
for the percent units. |
||||
--- |
||||
NEWS | 9 +++++++++ |
||||
libparted/unit.c | 2 +- |
||||
2 files changed, 10 insertions(+), 1 deletion(-) |
||||
|
||||
diff --git a/NEWS b/NEWS |
||||
index e2d01ed..80a62d6 100644 |
||||
--- a/NEWS |
||||
+++ b/NEWS |
||||
@@ -1,5 +1,13 @@ |
||||
GNU parted NEWS -*- outline -*- |
||||
|
||||
+* Noteworthy changes in release 3.1-16 (2014-01-22) [RHEL7] |
||||
+ |
||||
+** Bug Fixes |
||||
+ |
||||
+ If a drive was 100 times an even multiple of two, sizes specified as |
||||
+ a percentage would trigger the exact placement rule and refuse to round |
||||
+ to the nearest half percent. |
||||
+ |
||||
* Noteworthy changes in release 3.1-4 (2012-06-08) [Fedora] |
||||
|
||||
** Bug Fixes |
||||
@@ -8,6 +16,7 @@ GNU parted NEWS -*- outline -*- |
||||
libparted: Treat disks without a PMBR as msdos labeled disks |
||||
even if they have GPT partition tables. |
||||
|
||||
+ |
||||
* Noteworthy changes in release 3.1 (2012-03-02) [stable] |
||||
|
||||
** New features |
||||
diff --git a/libparted/unit.c b/libparted/unit.c |
||||
index 66f2b6c..265cc68 100644 |
||||
--- a/libparted/unit.c |
||||
+++ b/libparted/unit.c |
||||
@@ -548,7 +548,7 @@ ped_unit_parse_custom (const char* str, const PedDevice* dev, PedUnit unit, |
||||
do not use 4MiB as the range. Rather, presume that they |
||||
are specifying precisely the starting or ending number, |
||||
and treat "4MiB" just as we would treat "4194304B". */ |
||||
- if (is_power_of_2 (unit_size)) |
||||
+ if (is_power_of_2 (unit_size) && unit != PED_UNIT_PERCENT) |
||||
radius = 0; |
||||
|
||||
*sector = num * unit_size / dev->sector_size; |
||||
-- |
||||
1.8.4.2 |
||||
|
@ -0,0 +1,69 @@
@@ -0,0 +1,69 @@
|
||||
From e6e0f1db4535179f25ebf8f6f0a59eb430d377ff Mon Sep 17 00:00:00 2001 |
||||
From: "Brian C. Lane" <bcl@redhat.com> |
||||
Date: Thu, 23 Jan 2014 10:09:36 -0800 |
||||
Subject: [PATCH] tests: Use mkfs.xfs to create files (#1036152) |
||||
|
||||
On s390 there is a bug with mkfs.xfs and pre-existing files. Work around |
||||
it by creating the file directly with mkfs.xfs. This also works on other |
||||
arches. |
||||
|
||||
* tests/t1700-probe-fs.sh: Check for xfs and use direct file creation |
||||
* tests/t4100-dvh-partition-limits.sh: Use mkfs.xfs -dfile |
||||
* tests/t4100-msdos-partition-limits.sh: Use mkfs.xfs -dfile |
||||
--- |
||||
tests/t1700-probe-fs.sh | 9 +++++++-- |
||||
tests/t4100-dvh-partition-limits.sh | 3 +-- |
||||
tests/t4100-msdos-partition-limits.sh | 3 +-- |
||||
3 files changed, 9 insertions(+), 6 deletions(-) |
||||
|
||||
diff --git a/tests/t1700-probe-fs.sh b/tests/t1700-probe-fs.sh |
||||
index 36e7cdf..575ca24 100755 |
||||
--- a/tests/t1700-probe-fs.sh |
||||
+++ b/tests/t1700-probe-fs.sh |
||||
@@ -31,8 +31,13 @@ for type in ext2 ext3 ext4 btrfs xfs nilfs2; do |
||||
*) n_sectors=$((257*1024)) force=;; esac |
||||
|
||||
# create an $type file system |
||||
- dd if=/dev/zero of=$dev bs=$ss count=$n_sectors >/dev/null || fail=1 |
||||
- mkfs.$type $force $dev || { warn_ $ME: mkfs.$type failed; fail=1; continue; } |
||||
+ if [ "$type" == "xfs" ]; then |
||||
+ # Work around a problem with s390 |
||||
+ mkfs.xfs -ssize=$ss -dfile,name=$dev,size=${n_sectors}s || fail=1 |
||||
+ else |
||||
+ dd if=/dev/zero of=$dev bs=$ss count=$n_sectors >/dev/null || fail=1 |
||||
+ mkfs.$type $force $dev || { warn_ $ME: mkfs.$type failed; fail=1; continue; } |
||||
+ fi |
||||
|
||||
# probe the $type file system |
||||
parted -m -s $dev u s print >out 2>&1 || fail=1 |
||||
diff --git a/tests/t4100-dvh-partition-limits.sh b/tests/t4100-dvh-partition-limits.sh |
||||
index ec6981d..88e452d 100755 |
||||
--- a/tests/t4100-dvh-partition-limits.sh |
||||
+++ b/tests/t4100-dvh-partition-limits.sh |
||||
@@ -37,8 +37,7 @@ mp=`pwd`/mount-point |
||||
n=4096 |
||||
|
||||
# create an XFS file system |
||||
-dd if=/dev/zero of=$fs bs=1MB count=2 seek=100 || fail=1 |
||||
-mkfs.xfs -f -q $fs || fail=1 |
||||
+mkfs.xfs -dfile,name=$fs,size=100m || fail=1 |
||||
mkdir "$mp" || fail=1 |
||||
|
||||
# Unmount upon interrupt, failure, etc., as well as upon normal completion. |
||||
diff --git a/tests/t4100-msdos-partition-limits.sh b/tests/t4100-msdos-partition-limits.sh |
||||
index f03a85e..9350441 100755 |
||||
--- a/tests/t4100-msdos-partition-limits.sh |
||||
+++ b/tests/t4100-msdos-partition-limits.sh |
||||
@@ -37,8 +37,7 @@ mp=`pwd`/mount-point |
||||
n=4096 |
||||
|
||||
# create an XFS file system |
||||
-dd if=/dev/zero of=$fs bs=1MB count=2 seek=100 || fail=1 |
||||
-mkfs.xfs -f -q $fs || fail=1 |
||||
+mkfs.xfs -dfile,name=$fs,size=100m || fail=1 |
||||
mkdir "$mp" || fail=1 |
||||
|
||||
# Unmount upon interrupt, failure, etc., as well as upon normal completion. |
||||
-- |
||||
1.8.4.2 |
||||
|
@ -0,0 +1,25 @@
@@ -0,0 +1,25 @@
|
||||
From 9dfa4ab406c45abc2f7a7e5e64ce01b4ca9977ed Mon Sep 17 00:00:00 2001 |
||||
From: "Brian C. Lane" <bcl@redhat.com> |
||||
Date: Fri, 1 Aug 2014 14:48:13 -0700 |
||||
Subject: [PATCH] Update manpage NAME so whatis will work (#948424) |
||||
|
||||
Resolves: rhbz#948424 |
||||
--- |
||||
doc/C/parted.8 | 2 +- |
||||
1 file changed, 1 insertion(+), 1 deletion(-) |
||||
|
||||
diff --git a/doc/C/parted.8 b/doc/C/parted.8 |
||||
index 689011c..5304375 100644 |
||||
--- a/doc/C/parted.8 |
||||
+++ b/doc/C/parted.8 |
||||
@@ -1,6 +1,6 @@ |
||||
.TH PARTED 8 "2007 March 29" parted "GNU Parted Manual" |
||||
.SH NAME |
||||
-GNU Parted \- a partition manipulation program |
||||
+parted \- a partition manipulation program |
||||
.SH SYNOPSIS |
||||
.B parted |
||||
[options] [device [command [options...]...]] |
||||
-- |
||||
1.9.3 |
||||
|
@ -0,0 +1,209 @@
@@ -0,0 +1,209 @@
|
||||
From cfb23fa541ada431b8225760371bb4d5029893b1 Mon Sep 17 00:00:00 2001 |
||||
From: Daniel Battaiola Kreling <dbkreling@br.ibm.com> |
||||
Date: Mon, 7 Oct 2013 11:51:50 +0530 |
||||
Subject: [PATCH] GPT: add support for PReP GUID (#1108196) |
||||
|
||||
PReP (PowerPC Reference Platform) boot partition is the first partition used in |
||||
PowerPC platform for containing the bootable kernel or bootloader. The firmware |
||||
searches for this partition and jumps to it for booting. So far no GUID was |
||||
specified for this partition type and hence booting from GPT disk was not |
||||
supported on this platform. A new GUID 9e1a2d38-c612-4316-aa26-8b49521e5a8b for |
||||
PReP partition is proposed to be included in GPT. |
||||
|
||||
Resolves: rhbz#1108196 |
||||
|
||||
Signed-off-by: Brian C. Lane <bcl@redhat.com> |
||||
--- |
||||
NEWS | 7 +++++++ |
||||
doc/parted.texi | 2 +- |
||||
libparted/labels/gpt.c | 37 +++++++++++++++++++++++++++++++++++++ |
||||
3 files changed, 45 insertions(+), 1 deletion(-) |
||||
|
||||
diff --git a/NEWS b/NEWS |
||||
index 80a62d6..4d30b1b 100644 |
||||
--- a/NEWS |
||||
+++ b/NEWS |
||||
@@ -1,5 +1,12 @@ |
||||
GNU parted NEWS -*- outline -*- |
||||
|
||||
+* Noteworthy changes in release 3.1-18 (2014-08-12) [RHEL7.1] |
||||
+ |
||||
+** New features |
||||
+ |
||||
+ Add support for prep flag to GPT to select PowerPC Reference Platform |
||||
+ boot partition type. |
||||
+ |
||||
* Noteworthy changes in release 3.1-16 (2014-01-22) [RHEL7] |
||||
|
||||
** Bug Fixes |
||||
diff --git a/doc/parted.texi b/doc/parted.texi |
||||
index 2b1ce64..f10d5e1 100644 |
||||
--- a/doc/parted.texi |
||||
+++ b/doc/parted.texi |
||||
@@ -823,7 +823,7 @@ physical volume. |
||||
by the Linux/PA-RISC boot loader, palo. |
||||
|
||||
@item PREP |
||||
-(MS-DOS) - this flag can be enabled so that the partition can be used |
||||
+(MS-DOS, GPT) - this flag can be enabled so that the partition can be used |
||||
as a PReP boot partition on PowerPC PReP or IBM RS6K/CHRP hardware. |
||||
|
||||
@item DIAG |
||||
diff --git a/libparted/labels/gpt.c b/libparted/labels/gpt.c |
||||
index 6ca33c8..f9332bd 100644 |
||||
--- a/libparted/labels/gpt.c |
||||
+++ b/libparted/labels/gpt.c |
||||
@@ -142,6 +142,10 @@ typedef struct |
||||
((efi_guid_t) { PED_CPU_TO_LE32 (0x5265636F), PED_CPU_TO_LE16 (0x7665), \ |
||||
PED_CPU_TO_LE16 (0x11AA), 0xaa, 0x11, \ |
||||
{ 0x00, 0x30, 0x65, 0x43, 0xEC, 0xAC }}) |
||||
+#define PARTITION_PREP_GUID \ |
||||
+ ((efi_guid_t) { PED_CPU_TO_LE32 (0x9e1a2d38), PED_CPU_TO_LE16 (0xc612), \ |
||||
+ PED_CPU_TO_LE16 (0x4316), 0xaa, 0x26, \ |
||||
+ { 0x8b, 0x49, 0x52, 0x1e, 0x5a, 0x8b }}) |
||||
|
||||
struct __attribute__ ((packed)) _GuidPartitionTableHeader_t |
||||
{ |
||||
@@ -283,6 +287,7 @@ typedef struct _GPTPartitionData |
||||
int atvrecv; |
||||
int msftrecv; |
||||
int legacy_boot; |
||||
+ int prep; |
||||
} GPTPartitionData; |
||||
|
||||
static PedDiskType gpt_disk_type; |
||||
@@ -782,6 +787,7 @@ _parse_part_entry (PedDisk *disk, GuidPartitionEntry_t *pte) |
||||
= gpt_part_data->hidden = gpt_part_data->msftres |
||||
= gpt_part_data->msftrecv |
||||
= gpt_part_data->legacy_boot |
||||
+ = gpt_part_data->prep |
||||
= gpt_part_data->bios_grub = gpt_part_data->atvrecv = 0; |
||||
|
||||
if (pte->Attributes.RequiredToFunction & 0x1) |
||||
@@ -805,6 +811,8 @@ _parse_part_entry (PedDisk *disk, GuidPartitionEntry_t *pte) |
||||
gpt_part_data->msftrecv = 1; |
||||
else if (!guid_cmp (gpt_part_data->type, PARTITION_APPLE_TV_RECOVERY_GUID)) |
||||
gpt_part_data->atvrecv = 1; |
||||
+ else if (!guid_cmp (gpt_part_data->type, PARTITION_PREP_GUID)) |
||||
+ gpt_part_data->prep = 1; |
||||
|
||||
return part; |
||||
} |
||||
@@ -1321,6 +1329,7 @@ gpt_partition_new (const PedDisk *disk, |
||||
gpt_part_data->msftrecv = 0; |
||||
gpt_part_data->atvrecv = 0; |
||||
gpt_part_data->legacy_boot = 0; |
||||
+ gpt_part_data->prep = 0; |
||||
uuid_generate ((unsigned char *) &gpt_part_data->uuid); |
||||
swap_uuid_and_efi_guid ((unsigned char *) (&gpt_part_data->uuid)); |
||||
memset (gpt_part_data->name, 0, sizeof gpt_part_data->name); |
||||
@@ -1394,6 +1403,11 @@ gpt_partition_set_system (PedPartition *part, |
||||
gpt_part_data->type = PARTITION_RAID_GUID; |
||||
return 1; |
||||
} |
||||
+ if (gpt_part_data->prep) |
||||
+ { |
||||
+ gpt_part_data->type = PARTITION_PREP_GUID; |
||||
+ return 1; |
||||
+ } |
||||
if (gpt_part_data->boot) |
||||
{ |
||||
gpt_part_data->type = PARTITION_SYSTEM_GUID; |
||||
@@ -1564,6 +1578,7 @@ gpt_partition_set_flag (PedPartition *part, PedPartitionFlag flag, int state) |
||||
= gpt_part_data->hp_service |
||||
= gpt_part_data->msftres |
||||
= gpt_part_data->msftrecv |
||||
+ = gpt_part_data->prep |
||||
= gpt_part_data->atvrecv = 0; |
||||
return gpt_partition_set_system (part, part->fs_type); |
||||
case PED_PARTITION_BIOS_GRUB: |
||||
@@ -1575,6 +1590,7 @@ gpt_partition_set_flag (PedPartition *part, PedPartitionFlag flag, int state) |
||||
= gpt_part_data->hp_service |
||||
= gpt_part_data->msftres |
||||
= gpt_part_data->msftrecv |
||||
+ = gpt_part_data->prep |
||||
= gpt_part_data->atvrecv = 0; |
||||
return gpt_partition_set_system (part, part->fs_type); |
||||
case PED_PARTITION_RAID: |
||||
@@ -1586,6 +1602,7 @@ gpt_partition_set_flag (PedPartition *part, PedPartitionFlag flag, int state) |
||||
= gpt_part_data->hp_service |
||||
= gpt_part_data->msftres |
||||
= gpt_part_data->msftrecv |
||||
+ = gpt_part_data->prep |
||||
= gpt_part_data->atvrecv = 0; |
||||
return gpt_partition_set_system (part, part->fs_type); |
||||
case PED_PARTITION_LVM: |
||||
@@ -1597,6 +1614,7 @@ gpt_partition_set_flag (PedPartition *part, PedPartitionFlag flag, int state) |
||||
= gpt_part_data->hp_service |
||||
= gpt_part_data->msftres |
||||
= gpt_part_data->msftrecv |
||||
+ = gpt_part_data->prep |
||||
= gpt_part_data->atvrecv = 0; |
||||
return gpt_partition_set_system (part, part->fs_type); |
||||
case PED_PARTITION_HPSERVICE: |
||||
@@ -1608,6 +1626,7 @@ gpt_partition_set_flag (PedPartition *part, PedPartitionFlag flag, int state) |
||||
= gpt_part_data->bios_grub |
||||
= gpt_part_data->msftres |
||||
= gpt_part_data->msftrecv |
||||
+ = gpt_part_data->prep |
||||
= gpt_part_data->atvrecv = 0; |
||||
return gpt_partition_set_system (part, part->fs_type); |
||||
case PED_PARTITION_MSFT_RESERVED: |
||||
@@ -1619,6 +1638,7 @@ gpt_partition_set_flag (PedPartition *part, PedPartitionFlag flag, int state) |
||||
= gpt_part_data->bios_grub |
||||
= gpt_part_data->hp_service |
||||
= gpt_part_data->msftrecv |
||||
+ = gpt_part_data->prep |
||||
= gpt_part_data->atvrecv = 0; |
||||
return gpt_partition_set_system (part, part->fs_type); |
||||
case PED_PARTITION_DIAG: |
||||
@@ -1630,6 +1650,7 @@ gpt_partition_set_flag (PedPartition *part, PedPartitionFlag flag, int state) |
||||
= gpt_part_data->bios_grub |
||||
= gpt_part_data->hp_service |
||||
= gpt_part_data->msftres |
||||
+ = gpt_part_data->prep |
||||
= gpt_part_data->atvrecv = 0; |
||||
return gpt_partition_set_system (part, part->fs_type); |
||||
case PED_PARTITION_APPLE_TV_RECOVERY: |
||||
@@ -1641,8 +1662,21 @@ gpt_partition_set_flag (PedPartition *part, PedPartitionFlag flag, int state) |
||||
= gpt_part_data->bios_grub |
||||
= gpt_part_data->hp_service |
||||
= gpt_part_data->msftres |
||||
+ = gpt_part_data->prep |
||||
= gpt_part_data->msftrecv = 0; |
||||
return gpt_partition_set_system (part, part->fs_type); |
||||
+ case PED_PARTITION_PREP: |
||||
+ gpt_part_data->prep = state; |
||||
+ if (state) |
||||
+ gpt_part_data->boot |
||||
+ = gpt_part_data->raid |
||||
+ = gpt_part_data->lvm |
||||
+ = gpt_part_data->bios_grub |
||||
+ = gpt_part_data->hp_service |
||||
+ = gpt_part_data->msftres |
||||
+ = gpt_part_data->msftrecv |
||||
+ = gpt_part_data->atvrecv = 0; |
||||
+ return gpt_partition_set_system (part, part->fs_type); |
||||
case PED_PARTITION_HIDDEN: |
||||
gpt_part_data->hidden = state; |
||||
return 1; |
||||
@@ -1687,6 +1721,8 @@ gpt_partition_get_flag (const PedPartition *part, PedPartitionFlag flag) |
||||
return gpt_part_data->hidden; |
||||
case PED_PARTITION_LEGACY_BOOT: |
||||
return gpt_part_data->legacy_boot; |
||||
+ case PED_PARTITION_PREP: |
||||
+ return gpt_part_data->prep; |
||||
case PED_PARTITION_SWAP: |
||||
case PED_PARTITION_LBA: |
||||
case PED_PARTITION_ROOT: |
||||
@@ -1712,6 +1748,7 @@ gpt_partition_is_flag_available (const PedPartition *part, |
||||
case PED_PARTITION_APPLE_TV_RECOVERY: |
||||
case PED_PARTITION_HIDDEN: |
||||
case PED_PARTITION_LEGACY_BOOT: |
||||
+ case PED_PARTITION_PREP: |
||||
return 1; |
||||
case PED_PARTITION_SWAP: |
||||
case PED_PARTITION_ROOT: |
||||
-- |
||||
1.9.3 |
||||
|
@ -0,0 +1,31 @@
@@ -0,0 +1,31 @@
|
||||
From 22f857bb8f57438ec6f34876e1933df01b448044 Mon Sep 17 00:00:00 2001 |
||||
From: Fedora Ninjas <parted-owner@fedoraproject.org> |
||||
Date: Wed, 24 Sep 2014 15:59:47 -0700 |
||||
Subject: [PATCH] libparted: reread part table with 0 partitions (#1138465) |
||||
|
||||
After removing the last partition it still needs to be able to rescan |
||||
the partition table, otherwise device-mapper (and in this case mpath) is |
||||
never told that the last partition was removed. |
||||
|
||||
Resolves: rhbz#1138465 |
||||
--- |
||||
libparted/arch/linux.c | 3 --- |
||||
1 file changed, 3 deletions(-) |
||||
|
||||
diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c |
||||
index 4af0d5c..4daa881 100644 |
||||
--- a/libparted/arch/linux.c |
||||
+++ b/libparted/arch/linux.c |
||||
@@ -2878,9 +2878,6 @@ static int |
||||
_dm_reread_part_table (PedDisk* disk) |
||||
{ |
||||
int largest_partnum = ped_disk_get_last_partition_num (disk); |
||||
- if (largest_partnum <= 0) |
||||
- return 1; |
||||
- |
||||
int rc = 1; |
||||
int i; |
||||
|
||||
-- |
||||
1.9.3 |
||||
|
@ -0,0 +1,27 @@
@@ -0,0 +1,27 @@
|
||||
From c4bf408e794c3e2df85539e7d561da51a8ae2cad Mon Sep 17 00:00:00 2001 |
||||
From: "Brian C. Lane" <bcl@redhat.com> |
||||
Date: Fri, 7 Nov 2014 11:15:55 -0800 |
||||
Subject: [PATCH] tests: Change minimum size to 256MiB |
||||
|
||||
btrfs on ppc64 wants 136MiB so expand the minimum temp filesystem size |
||||
for the t1700-probe-fs test. |
||||
--- |
||||
tests/t1700-probe-fs.sh | 2 +- |
||||
1 file changed, 1 insertion(+), 1 deletion(-) |
||||
|
||||
diff --git a/tests/t1700-probe-fs.sh b/tests/t1700-probe-fs.sh |
||||
index 575ca24..83e6be4 100755 |
||||
--- a/tests/t1700-probe-fs.sh |
||||
+++ b/tests/t1700-probe-fs.sh |
||||
@@ -28,7 +28,7 @@ for type in ext2 ext3 ext4 btrfs xfs nilfs2; do |
||||
|| { warn_ "$ME: no $type support"; continue; } |
||||
|
||||
case $type in ext*) n_sectors=8000 force=-F;; |
||||
- *) n_sectors=$((257*1024)) force=;; esac |
||||
+ *) n_sectors=$((512*1024)) force=;; esac |
||||
|
||||
# create an $type file system |
||||
if [ "$type" == "xfs" ]; then |
||||
-- |
||||
1.9.3 |
||||
|
@ -0,0 +1,117 @@
@@ -0,0 +1,117 @@
|
||||
From 535f60c9ef91cc662d5ccaecb2f7048a3c2241d9 Mon Sep 17 00:00:00 2001 |
||||
From: Phillip Susi <psusi@ubuntu.com> |
||||
Date: Thu, 12 Jan 2012 14:53:56 -0500 |
||||
Subject: [PATCH] libparted: handle logical partitions starting immediately |
||||
after the EBR |
||||
|
||||
_blkpg_add_partition() set the length of the extended partition |
||||
to 2 sectors to allow LILO to be installed there, beacuse the |
||||
linux kernel does this. If a logical partition used that second |
||||
sector, adding it would fail beacuse of the overlap. Now |
||||
_blkpg_add_partition() will limit the length to only the first |
||||
sector if the second is used by a logical partition. |
||||
|
||||
Previously parted did create the partition table, and after a |
||||
reboot, the kernel would recognize the table, and happily create |
||||
the extended partition as 2 sectors long, thus overlapping the |
||||
logical partition, but when parted tried to recreate the same |
||||
table with BLKPG, the kernel rightly rejected it. |
||||
|
||||
(cherry picked from commit f503870153eda7659b09e52e4adeda3bebf06471) |
||||
--- |
||||
NEWS | 8 ++++++++ |
||||
libparted/arch/linux.c | 17 +++++++++++++++-- |
||||
tests/t2310-dos-extended-2-sector-min-offset.sh | 16 ++++------------ |
||||
3 files changed, 27 insertions(+), 14 deletions(-) |
||||
|
||||
diff --git a/NEWS b/NEWS |
||||
index 4d30b1b..d1ab2a6 100644 |
||||
--- a/NEWS |
||||
+++ b/NEWS |
||||
@@ -11,6 +11,14 @@ GNU parted NEWS -*- outline -*- |
||||
|
||||
** Bug Fixes |
||||
|
||||
+ libparted: handle logical partitions starting immediately after |
||||
+ the EBR. Creating a logical partition one sector after the EBR |
||||
+ used to cause parted to complain that it could not inform the |
||||
+ kernel of the changes, but after a reboot, everything was fine. |
||||
+ Parted will now correctly inform the kernel of the changes, but |
||||
+ only set the length of the extended partition to 1 sector instead |
||||
+ of two, which would cause it to overlap the logical partition. |
||||
+ |
||||
If a drive was 100 times an even multiple of two, sizes specified as |
||||
a percentage would trigger the exact placement rule and refuse to round |
||||
to the nearest half percent. |
||||
diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c |
||||
index 4daa881..788cdc3 100644 |
||||
--- a/libparted/arch/linux.c |
||||
+++ b/libparted/arch/linux.c |
||||
@@ -2371,8 +2371,21 @@ _blkpg_add_partition (PedDisk* disk, const PedPartition *part) |
||||
memset (&linux_part, 0, sizeof (linux_part)); |
||||
linux_part.start = part->geom.start * disk->dev->sector_size; |
||||
/* see fs/partitions/msdos.c:msdos_partition(): "leave room for LILO" */ |
||||
- if (part->type & PED_PARTITION_EXTENDED) |
||||
- linux_part.length = part->geom.length == 1 ? 512 : 1024; |
||||
+ if (part->type & PED_PARTITION_EXTENDED) { |
||||
+ linux_part.length = 1; |
||||
+ if (disk->dev->sector_size == 512) { |
||||
+ if (linux_part.length == 1) |
||||
+ linux_part.length = 2; |
||||
+ PedPartition *walk; |
||||
+ /* if the second sector is claimed by a logical partition, |
||||
+ then there's just no room for lilo, so don't try to use it */ |
||||
+ for (walk = part->part_list; walk; walk = walk->next) { |
||||
+ if (walk->geom.start == part->geom.start+1) |
||||
+ linux_part.length = 1; |
||||
+ } |
||||
+ } |
||||
+ linux_part.length *= disk->dev->sector_size; |
||||
+ } |
||||
else |
||||
linux_part.length = part->geom.length * disk->dev->sector_size; |
||||
linux_part.pno = part->num; |
||||
diff --git a/tests/t2310-dos-extended-2-sector-min-offset.sh b/tests/t2310-dos-extended-2-sector-min-offset.sh |
||||
index 89453ae..bd7defb 100644 |
||||
--- a/tests/t2310-dos-extended-2-sector-min-offset.sh |
||||
+++ b/tests/t2310-dos-extended-2-sector-min-offset.sh |
||||
@@ -1,8 +1,6 @@ |
||||
#!/bin/sh |
||||
-# Ensure that parted leaves at least 2 sectors between the beginning |
||||
+# Ensure that parted allows a single sector between the beginning |
||||
# of an extended partition and the first logical partition. |
||||
-# Before parted-2.3, it could be made to leave just one, and that |
||||
-# would cause trouble with the Linux kernel. |
||||
|
||||
# Copyright (C) 2010-2012 Free Software Foundation, Inc. |
||||
|
||||
@@ -35,7 +33,7 @@ cat <<EOF > exp || framework_failure |
||||
BYT; |
||||
$scsi_dev:2048s:scsi:512:512:msdos:Linux scsi_debug:; |
||||
1:64s:128s:65s:::lba; |
||||
-5:66s:128s:63s:::; |
||||
+5:65s:128s:64s:::; |
||||
EOF |
||||
|
||||
cat <<EOF > err.exp || framework_failure |
||||
@@ -49,15 +47,9 @@ parted --align=min -s $scsi_dev mkpart extended 64s 128s> out 2>&1 || fail=1 |
||||
parted -m -s $scsi_dev u s print |
||||
compare /dev/null out || fail=1 |
||||
|
||||
-# Provoke a failure by trying to create a partition that starts just |
||||
+# Trying to create a partition that starts just |
||||
# one sector after the start of the extended partition. |
||||
-parted --align=min -s $scsi_dev mkpart logical 65s 128s > err 2>&1 && fail=1 |
||||
-compare err.exp err || fail=1 |
||||
- |
||||
-# The above failed, but created the partition nonetheless. Remove it. |
||||
-parted -s $scsi_dev rm 5 || fail=1 |
||||
- |
||||
-parted --align=min -s $scsi_dev mkpart logical 66s 128s > out 2>&1 || fail=1 |
||||
+parted --align=min -s $scsi_dev mkpart logical 65s 128s > out 2>&1 || fail=1 |
||||
compare /dev/null out || fail=1 |
||||
|
||||
parted -m -s $scsi_dev u s print > out 2>&1 |
||||
-- |
||||
2.1.0 |
||||
|
@ -0,0 +1,106 @@
@@ -0,0 +1,106 @@
|
||||
From 1c5b0b263f08faa0649bf673a685d93ed9319bef Mon Sep 17 00:00:00 2001 |
||||
From: "Brian C. Lane" <bcl@redhat.com> |
||||
Date: Wed, 4 Feb 2015 16:31:00 -0800 |
||||
Subject: [PATCH 31/32] tests: Add a test for device-mapper partition sizes |
||||
(#1188431) |
||||
|
||||
device-mapper uses 512b sector units, not device specific sector sizes. |
||||
This test ensures that the correct partition size is created, no matter |
||||
what the device's sector size is. |
||||
|
||||
Related: rhbz#1188431 |
||||
--- |
||||
tests/Makefile.am | 1 + |
||||
tests/t6004-dm-512b-sectors.sh | 68 ++++++++++++++++++++++++++++++++++++++++++ |
||||
2 files changed, 69 insertions(+) |
||||
create mode 100644 tests/t6004-dm-512b-sectors.sh |
||||
|
||||
diff --git a/tests/Makefile.am b/tests/Makefile.am |
||||
index faa0f37..1cf859c 100644 |
||||
--- a/tests/Makefile.am |
||||
+++ b/tests/Makefile.am |
||||
@@ -57,6 +57,7 @@ TESTS = \ |
||||
t6001-psep.sh \ |
||||
t6002-dm-many-partitions.sh \ |
||||
t6003-dm-uuid.sh \ |
||||
+ t6004-dm-512b-sectors.sh \ |
||||
t6100-mdraid-partitions.sh \ |
||||
t7000-scripting.sh \ |
||||
t8000-loop.sh \ |
||||
diff --git a/tests/t6004-dm-512b-sectors.sh b/tests/t6004-dm-512b-sectors.sh |
||||
new file mode 100644 |
||||
index 0000000..31abba9 |
||||
--- /dev/null |
||||
+++ b/tests/t6004-dm-512b-sectors.sh |
||||
@@ -0,0 +1,68 @@ |
||||
+#!/bin/sh |
||||
+# device-mapper sector sizes are 512b, make sure partitions are the correct |
||||
+# size when using larger sector sizes and a linear dm table. |
||||
+ |
||||
+# Copyright (C) 2015 Free Software Foundation, Inc. |
||||
+ |
||||
+# This program is free software; you can redistribute it and/or modify |
||||
+# it under the terms of the GNU General Public License as published by |
||||
+# the Free Software Foundation; either version 3 of the License, or |
||||
+# (at your option) any later version. |
||||
+ |
||||
+# This program is distributed in the hope that it will be useful, |
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
+# GNU General Public License for more details. |
||||
+ |
||||
+# You should have received a copy of the GNU General Public License |
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>. |
||||
+ |
||||
+. "${srcdir=.}/init.sh"; path_prepend_ ../parted |
||||
+ |
||||
+require_root_ |
||||
+require_scsi_debug_module_ |
||||
+ |
||||
+grep '^#define USE_BLKID 1' "$CONFIG_HEADER" > /dev/null || |
||||
+ skip_ 'this system lacks a new-enough libblkid' |
||||
+ |
||||
+(dmsetup --help) > /dev/null 2>&1 || skip_test_ "No dmsetup installed" |
||||
+ |
||||
+# Device maps names - should be random to not conflict with existing ones on |
||||
+# the system |
||||
+linear_=plinear-$$test |
||||
+ |
||||
+cleanup_fn_() { |
||||
+ i=0 |
||||
+ udevadm settle |
||||
+ while [ $i -lt 10 ] ; do |
||||
+ [ -e "/dev/mapper/${linear_}1" ] && dmsetup remove ${linear_}1 |
||||
+ sleep .2 |
||||
+ [ -e "/dev/mapper/$linear_" ] && dmsetup remove $linear_ |
||||
+ sleep .2 |
||||
+ [ -e "/dev/mapper/${linear_}1" -o -e "/dev/mapper/$linear_" ] || i=10 |
||||
+ i=$((i + 1)) |
||||
+ done |
||||
+ udevadm settle |
||||
+} |
||||
+ |
||||
+# Create a 500M device |
||||
+ss=$sector_size_ |
||||
+scsi_debug_setup_ sector_size=$ss dev_size_mb=500 > dev-name || |
||||
+ skip_ 'failed to create scsi_debug device' |
||||
+scsi_dev=$(cat dev-name) |
||||
+ |
||||
+# Size of device, in 512b units |
||||
+scsi_dev_size=$(blockdev --getsz $scsi_dev) || framework_failure |
||||
+ |
||||
+dmsetup create $linear_ --table "0 $scsi_dev_size linear $scsi_dev 0" || framework_failure |
||||
+dev="/dev/mapper/$linear_" |
||||
+ |
||||
+# Create msdos partition table with a partition from 1MiB to 100MiB |
||||
+parted -s $dev mklabel msdos mkpart primary ext2 1MiB 101MiB > out 2>&1 || fail=1 |
||||
+compare /dev/null out || fail=1 |
||||
+ |
||||
+# The size of the partition should be 100MiB, or 204800 512b sectors |
||||
+p1_size=$(blockdev --getsz ${dev}1) || framework_failure |
||||
+[ $p1_size == 204800 ] || fail=1 |
||||
+ |
||||
+Exit $fail |
||||
-- |
||||
2.1.0 |
||||
|
@ -0,0 +1,43 @@
@@ -0,0 +1,43 @@
|
||||
From 07f2604aeeb20d187e7243007fc5ab1a0560a4b7 Mon Sep 17 00:00:00 2001 |
||||
From: "Brian C. Lane" <bcl@redhat.com> |
||||
Date: Wed, 4 Feb 2015 16:46:07 -0800 |
||||
Subject: [PATCH 32/32] libparted: device mapper uses 512b sectors (#1188431) |
||||
|
||||
device mapper doesn't use the device's sector size when creating a |
||||
table. It always uses 512b units. This causes partitions to be created |
||||
8x smaller than expected on devices with 4906b sectors. |
||||
|
||||
Resolves: rhbz#1188431 |
||||
--- |
||||
libparted/arch/linux.c | 7 +++++-- |
||||
1 file changed, 5 insertions(+), 2 deletions(-) |
||||
|
||||
diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c |
||||
index 788cdc3..1d11f58 100644 |
||||
--- a/libparted/arch/linux.c |
||||
+++ b/libparted/arch/linux.c |
||||
@@ -2849,8 +2849,10 @@ _dm_add_partition (PedDisk* disk, PedPartition* part) |
||||
dm_task_destroy (task); |
||||
task = NULL; |
||||
|
||||
+ /* device-mapper uses 512b units, not the device's sector size */ |
||||
if ( ! (params = zasprintf ("%d:%d %lld", arch_specific->major, |
||||
- arch_specific->minor, part->geom.start))) |
||||
+ arch_specific->minor, |
||||
+ part->geom.start * (disk->dev->sector_size / PED_SECTOR_SIZE_DEFAULT)))) |
||||
goto err; |
||||
|
||||
task = dm_task_create (DM_DEVICE_CREATE); |
||||
@@ -2860,7 +2862,8 @@ _dm_add_partition (PedDisk* disk, PedPartition* part) |
||||
dm_task_set_name (task, vol_name); |
||||
if (vol_uuid) |
||||
dm_task_set_uuid (task, vol_uuid); |
||||
- dm_task_add_target (task, 0, part->geom.length, |
||||
+ /* device-mapper uses 512b units, not the device's sector size */ |
||||
+ dm_task_add_target (task, 0, part->geom.length * (disk->dev->sector_size / PED_SECTOR_SIZE_DEFAULT), |
||||
"linear", params); |
||||
if (!dm_task_set_cookie(task, &cookie, 0)) |
||||
goto err; |
||||
-- |
||||
2.1.0 |
||||
|
@ -0,0 +1,218 @@
@@ -0,0 +1,218 @@
|
||||
From 468d537b07c3c1ad72e1ee1e9651a17c72038837 Mon Sep 17 00:00:00 2001 |
||||
From: Fedora Ninjas <parted-owner@fedoraproject.org> |
||||
Date: Thu, 6 Aug 2015 07:17:14 -0700 |
||||
Subject: [PATCH 33/35] libparted: Use read only when probing devices on linux |
||||
(#1245144) |
||||
|
||||
When a device is opened for RW closing it can trigger other actions, |
||||
like udev scanning it for partition changes. Use read only for the |
||||
init_* methods and RW for actual changes to the device. |
||||
|
||||
This adds _device_open which takes mode flags as an argument and turns |
||||
linux_open into a wrapper for it with RW_MODE. |
||||
|
||||
_device_open_ro is added to open the device with RD_MODE and increment |
||||
the open_counter. This is used in the init_* functions. |
||||
|
||||
_device_close is a wrapper around linux_close that decrements the |
||||
open_counter and is used in the init_* functions. |
||||
|
||||
All of these changes are self-contained with no external API changes. |
||||
The only visible change in behavior is that when a new PedDevice is |
||||
created the device is opened in RO_MODE instead of RW_MODE. |
||||
|
||||
Resolves: rhbz#1245144 |
||||
--- |
||||
libparted/arch/linux.c | 61 ++++++++++++++++++++++++++++++++++++-------------- |
||||
1 file changed, 44 insertions(+), 17 deletions(-) |
||||
|
||||
diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c |
||||
index 1d11f58..341bbbb 100644 |
||||
--- a/libparted/arch/linux.c |
||||
+++ b/libparted/arch/linux.c |
||||
@@ -287,6 +287,9 @@ struct blkdev_ioctl_param { |
||||
|
||||
static char* _device_get_part_path (PedDevice* dev, int num); |
||||
static int _partition_is_mounted_by_path (const char* path); |
||||
+static int _device_open (PedDevice* dev, int flags); |
||||
+static int _device_open_ro (PedDevice* dev); |
||||
+static int _device_close (PedDevice* dev); |
||||
|
||||
static int |
||||
_read_fd (int fd, char **buf) |
||||
@@ -830,7 +833,7 @@ init_ide (PedDevice* dev) |
||||
if (!_device_stat (dev, &dev_stat)) |
||||
goto error; |
||||
|
||||
- if (!ped_device_open (dev)) |
||||
+ if (!_device_open_ro (dev)) |
||||
goto error; |
||||
|
||||
if (ioctl (arch_specific->fd, HDIO_GET_IDENTITY, &hdi)) { |
||||
@@ -899,11 +902,11 @@ init_ide (PedDevice* dev) |
||||
if (!_device_probe_geometry (dev)) |
||||
goto error_close_dev; |
||||
|
||||
- ped_device_close (dev); |
||||
+ _device_close (dev); |
||||
return 1; |
||||
|
||||
error_close_dev: |
||||
- ped_device_close (dev); |
||||
+ _device_close (dev); |
||||
error: |
||||
return 0; |
||||
} |
||||
@@ -1036,7 +1039,7 @@ init_scsi (PedDevice* dev) |
||||
char* vendor; |
||||
char* product; |
||||
|
||||
- if (!ped_device_open (dev)) |
||||
+ if (!_device_open_ro (dev)) |
||||
goto error; |
||||
|
||||
if (ioctl (arch_specific->fd, SCSI_IOCTL_GET_IDLUN, &idlun) < 0) { |
||||
@@ -1050,7 +1053,7 @@ init_scsi (PedDevice* dev) |
||||
goto error_close_dev; |
||||
if (!_device_probe_geometry (dev)) |
||||
goto error_close_dev; |
||||
- ped_device_close (dev); |
||||
+ _device_close (dev); |
||||
return 1; |
||||
} |
||||
|
||||
@@ -1072,11 +1075,11 @@ init_scsi (PedDevice* dev) |
||||
if (!_device_probe_geometry (dev)) |
||||
goto error_close_dev; |
||||
|
||||
- ped_device_close (dev); |
||||
+ _device_close (dev); |
||||
return 1; |
||||
|
||||
error_close_dev: |
||||
- ped_device_close (dev); |
||||
+ _device_close (dev); |
||||
error: |
||||
return 0; |
||||
} |
||||
@@ -1088,7 +1091,7 @@ init_file (PedDevice* dev) |
||||
|
||||
if (!_device_stat (dev, &dev_stat)) |
||||
goto error; |
||||
- if (!ped_device_open (dev)) |
||||
+ if (!_device_open_ro (dev)) |
||||
goto error; |
||||
|
||||
dev->sector_size = PED_SECTOR_SIZE_DEFAULT; |
||||
@@ -1115,7 +1118,7 @@ init_file (PedDevice* dev) |
||||
goto error_close_dev; |
||||
} |
||||
|
||||
- ped_device_close (dev); |
||||
+ _device_close (dev); |
||||
|
||||
dev->bios_geom.cylinders = dev->length / 4 / 32; |
||||
dev->bios_geom.heads = 4; |
||||
@@ -1126,7 +1129,7 @@ init_file (PedDevice* dev) |
||||
return 1; |
||||
|
||||
error_close_dev: |
||||
- ped_device_close (dev); |
||||
+ _device_close (dev); |
||||
error: |
||||
return 0; |
||||
} |
||||
@@ -1142,7 +1145,7 @@ init_dasd (PedDevice* dev, const char* model_name) |
||||
if (!_device_stat (dev, &dev_stat)) |
||||
goto error; |
||||
|
||||
- if (!ped_device_open (dev)) |
||||
+ if (!_device_open_ro (dev)) |
||||
goto error; |
||||
|
||||
LinuxSpecific* arch_specific = LINUX_SPECIFIC (dev); |
||||
@@ -1182,11 +1185,11 @@ init_dasd (PedDevice* dev, const char* model_name) |
||||
|
||||
dev->model = strdup (model_name); |
||||
|
||||
- ped_device_close (dev); |
||||
+ _device_close (dev); |
||||
return 1; |
||||
|
||||
error_close_dev: |
||||
- ped_device_close (dev); |
||||
+ _device_close (dev); |
||||
error: |
||||
return 0; |
||||
} |
||||
@@ -1201,7 +1204,7 @@ init_generic (PedDevice* dev, const char* model_name) |
||||
if (!_device_stat (dev, &dev_stat)) |
||||
goto error; |
||||
|
||||
- if (!ped_device_open (dev)) |
||||
+ if (!_device_open_ro (dev)) |
||||
goto error; |
||||
|
||||
ped_exception_fetch_all (); |
||||
@@ -1249,11 +1252,11 @@ init_generic (PedDevice* dev, const char* model_name) |
||||
|
||||
dev->model = strdup (model_name); |
||||
|
||||
- ped_device_close (dev); |
||||
+ _device_close (dev); |
||||
return 1; |
||||
|
||||
error_close_dev: |
||||
- ped_device_close (dev); |
||||
+ _device_close (dev); |
||||
error: |
||||
return 0; |
||||
} |
||||
@@ -1543,12 +1546,27 @@ retry: |
||||
} |
||||
|
||||
static int |
||||
+_device_open_ro (PedDevice* dev) |
||||
+{ |
||||
+ int rc = _device_open (dev, RD_MODE); |
||||
+ if (rc) |
||||
+ dev->open_count++; |
||||
+ return rc; |
||||
+} |
||||
+ |
||||
+static int |
||||
linux_open (PedDevice* dev) |
||||
{ |
||||
+ return _device_open (dev, RW_MODE); |
||||
+} |
||||
+ |
||||
+static int |
||||
+_device_open (PedDevice* dev, int flags) |
||||
+{ |
||||
LinuxSpecific* arch_specific = LINUX_SPECIFIC (dev); |
||||
|
||||
retry: |
||||
- arch_specific->fd = open (dev->path, RW_MODE); |
||||
+ arch_specific->fd = open (dev->path, flags); |
||||
|
||||
if (arch_specific->fd == -1) { |
||||
char* rw_error_msg = strerror (errno); |
||||
@@ -1617,6 +1635,15 @@ linux_refresh_close (PedDevice* dev) |
||||
return 1; |
||||
} |
||||
|
||||
+static int |
||||
+_device_close (PedDevice* dev) |
||||
+{ |
||||
+ int rc = linux_close (dev); |
||||
+ if (dev->open_count > 0) |
||||
+ dev->open_count--; |
||||
+ return rc; |
||||
+} |
||||
+ |
||||
#if SIZEOF_OFF_T < 8 |
||||
|
||||
static _syscall5(int,_llseek, |
||||
-- |
||||
2.4.3 |
||||
|
@ -0,0 +1,145 @@
@@ -0,0 +1,145 @@
|
||||
From 4182428d60496b7fe61f0599156f871e3cd63f89 Mon Sep 17 00:00:00 2001 |
||||
From: "Brian C. Lane" <bcl@redhat.com> |
||||
Date: Fri, 7 Aug 2015 11:43:17 -0700 |
||||
Subject: [PATCH 34/35] tests: Use wait_for_dev_to_ functions |
||||
|
||||
Recent changes to udev have made some long-standing problems appear more |
||||
frequently. udev executes various actions when changes are made to |
||||
devices. Sometimes this can result in device nodes not appearing |
||||
immediately. Other times it can result in EBUSY being returned. This |
||||
patch only addresses devices that are slow to appear/disappear. |
||||
|
||||
It is best to use the wait_for_dev_to_appear_ and |
||||
wait_for_dev_to_disappear_ functions than to test for existance. These |
||||
will loop and wait for up to 2 seconds for it to appear. |
||||
|
||||
This also changes t9041 to fail if mkfs doesn't work since using skip |
||||
here may hide cases when the device node doesn't appear. |
||||
|
||||
Related: rhbz#1245144 |
||||
--- |
||||
tests/t1100-busy-label.sh | 10 ++-------- |
||||
tests/t6001-psep.sh | 4 ++-- |
||||
tests/t6002-dm-many-partitions.sh | 6 ++---- |
||||
tests/t6004-dm-512b-sectors.sh | 1 + |
||||
tests/t6100-mdraid-partitions.sh | 5 +++-- |
||||
tests/t9041-undetected-in-use-16th-partition.sh | 2 +- |
||||
6 files changed, 11 insertions(+), 17 deletions(-) |
||||
|
||||
diff --git a/tests/t1100-busy-label.sh b/tests/t1100-busy-label.sh |
||||
index 9e371da..93229a7 100755 |
||||
--- a/tests/t1100-busy-label.sh |
||||
+++ b/tests/t1100-busy-label.sh |
||||
@@ -27,22 +27,16 @@ dev=$(cat dev-name) |
||||
|
||||
parted -s "$dev" mklabel msdos mkpart primary fat32 1 40 > out 2>&1 || fail=1 |
||||
compare /dev/null out || fail=1 |
||||
-mkfs.vfat ${dev}1 || skip_ "mkfs.vfat failed" |
||||
+wait_for_dev_to_appear_ ${dev}1 || fail=1 |
||||
+mkfs.vfat ${dev}1 || fail=1 |
||||
|
||||
mount_point="`pwd`/mnt" |
||||
|
||||
# Be sure to unmount upon interrupt, failure, etc. |
||||
cleanup_fn_() { umount "${dev}1" > /dev/null 2>&1; } |
||||
|
||||
-# There's a race condition here: on udev-based systems, the partition#1 |
||||
-# device, ${dev}1 (i.e., /dev/sdd1) is not created immediately, and |
||||
-# without some delay, this mount command would fail. Using a flash card |
||||
-# as $dev, the loop below typically iterates 7-20 times. |
||||
- |
||||
# create mount point dir. and mount the just-created partition on it |
||||
mkdir $mount_point || fail=1 |
||||
-i=0; while :; do test -e "${dev}1" && break; test $i = 90 && break; |
||||
- i=$(expr $i + 1); done; |
||||
mount "${dev}1" $mount_point || fail=1 |
||||
|
||||
# now that a partition is mounted, mklabel attempt must fail |
||||
diff --git a/tests/t6001-psep.sh b/tests/t6001-psep.sh |
||||
index 0c1ab99..b747732 100644 |
||||
--- a/tests/t6001-psep.sh |
||||
+++ b/tests/t6001-psep.sh |
||||
@@ -55,7 +55,7 @@ parted -s $dev mklabel msdos mkpart primary fat32 1m 5m > out 2>&1 || fail=1 |
||||
compare /dev/null out || fail=1 |
||||
|
||||
#make sure device name is correct |
||||
-test -e ${dev}p1 || fail=1 |
||||
+wait_for_dev_to_appear_ ${dev}p1 || fail=1 |
||||
|
||||
#repeat on name not ending in a digit |
||||
# setup: create a mapping |
||||
@@ -67,7 +67,7 @@ parted -s $dev mklabel msdos mkpart primary fat32 1m 5m > out 2>&1 || fail=1 |
||||
compare /dev/null out || fail=1 |
||||
|
||||
#make sure device name is correct |
||||
-test -e ${dev}1 || fail=1 |
||||
+wait_for_dev_to_appear_ ${dev}1 || fail=1 |
||||
|
||||
if [ -n "$fail" ]; then |
||||
ls /dev/mapper |
||||
diff --git a/tests/t6002-dm-many-partitions.sh b/tests/t6002-dm-many-partitions.sh |
||||
index 4d08e72..247c9ee 100755 |
||||
--- a/tests/t6002-dm-many-partitions.sh |
||||
+++ b/tests/t6002-dm-many-partitions.sh |
||||
@@ -49,10 +49,8 @@ parted -m -a min -s /dev/mapper/$dm_name mklabel gpt $cmd > /dev/null 2>&1 || fa |
||||
|
||||
# Make sure all the partitions appeared under /dev/mapper/ |
||||
for ((i=1; i<=$n_partitions; i+=1)); do |
||||
- if [ ! -e "/dev/mapper/${dm_name}p$i" ]; then |
||||
- fail=1 |
||||
- break |
||||
- fi |
||||
+ wait_for_dev_to_appear_ "/dev/mapper/${dm_name}p$i" || { fail=1; break; } |
||||
+ |
||||
# remove the partitions as we go, otherwise cleanup won't work. |
||||
dmsetup remove /dev/mapper/${dm_name}p$i |
||||
done |
||||
diff --git a/tests/t6004-dm-512b-sectors.sh b/tests/t6004-dm-512b-sectors.sh |
||||
index 31abba9..c3045af 100644 |
||||
--- a/tests/t6004-dm-512b-sectors.sh |
||||
+++ b/tests/t6004-dm-512b-sectors.sh |
||||
@@ -60,6 +60,7 @@ dev="/dev/mapper/$linear_" |
||||
# Create msdos partition table with a partition from 1MiB to 100MiB |
||||
parted -s $dev mklabel msdos mkpart primary ext2 1MiB 101MiB > out 2>&1 || fail=1 |
||||
compare /dev/null out || fail=1 |
||||
+wait_for_dev_to_appear_ ${dev}1 || fail=1 |
||||
|
||||
# The size of the partition should be 100MiB, or 204800 512b sectors |
||||
p1_size=$(blockdev --getsz ${dev}1) || framework_failure |
||||
diff --git a/tests/t6100-mdraid-partitions.sh b/tests/t6100-mdraid-partitions.sh |
||||
index aedf69b..d7e7d6a 100755 |
||||
--- a/tests/t6100-mdraid-partitions.sh |
||||
+++ b/tests/t6100-mdraid-partitions.sh |
||||
@@ -54,13 +54,14 @@ parted -s $md_dev mklabel gpt \ |
||||
compare /dev/null out || fail=1 |
||||
|
||||
# Verify that kernel has been informed about the second device. |
||||
-grep "${md_name}p2" /proc/partitions || { fail=1; cat /proc/partitions; } |
||||
+wait_for_dev_to_appear_ ${md_dev}p2 || { fail=1; cat /proc/partitions; } |
||||
|
||||
# Remove partitions from the raid device. |
||||
parted -s $md_dev rm 2 rm 1 > out 2>&1 || fail=1 |
||||
compare /dev/null out || fail=1 |
||||
|
||||
# Verify that kernel has been informed about those removals. |
||||
-grep "${md_name}p[12]" /proc/partitions && { fail=1; cat /proc/partitions; } |
||||
+wait_for_dev_to_disappear_ ${md_dev}p1 2 || { fail=1; cat /proc/partitions; } |
||||
+wait_for_dev_to_disappear_ ${md_dev}p2 2 || { fail=1; cat /proc/partitions; } |
||||
|
||||
Exit $fail |
||||
diff --git a/tests/t9041-undetected-in-use-16th-partition.sh b/tests/t9041-undetected-in-use-16th-partition.sh |
||||
index 6ddc7d8..0b22b0e 100644 |
||||
--- a/tests/t9041-undetected-in-use-16th-partition.sh |
||||
+++ b/tests/t9041-undetected-in-use-16th-partition.sh |
||||
@@ -72,7 +72,7 @@ wait_for_dev_to_appear_ ${scsi_dev}16 || fail_ ${scsi_dev}16 did not appear |
||||
|
||||
partitions="${scsi_dev}14 ${scsi_dev}15 ${scsi_dev}16" |
||||
for i in $partitions; do |
||||
- mkfs.ext3 $i || skip_ mkfs.ext3 $i failed |
||||
+ mkfs.ext3 $i || fail=1 |
||||
done |
||||
|
||||
# be sure to unmount upon interrupt, failure, etc. |
||||
-- |
||||
2.4.3 |
||||
|
@ -0,0 +1,119 @@
@@ -0,0 +1,119 @@
|
||||
From 0d00bd73ba85c18082cbe47dd76e2adeba7e8620 Mon Sep 17 00:00:00 2001 |
||||
From: "Brian C. Lane" <bcl@redhat.com> |
||||
Date: Tue, 1 Mar 2016 10:38:26 -0800 |
||||
Subject: [PATCH] tests: Add udevadm settle to wait_for_ loop (#1260664) |
||||
|
||||
Sometimes the device will vanish after the wait_for_dev_to_appear exits. |
||||
Add udevadm settle in an attempt to make sure the udev system is done |
||||
flapping around and the device will stay in place. |
||||
|
||||
Related: rhbz#1260664 |
||||
--- |
||||
tests/t-lib-helpers.sh | 2 ++ |
||||
tests/t-local.sh | 2 ++ |
||||
tests/t6001-psep.sh | 2 ++ |
||||
tests/t6002-dm-many-partitions.sh | 1 + |
||||
tests/t6003-dm-uuid.sh | 2 ++ |
||||
tests/t6100-mdraid-partitions.sh | 1 + |
||||
6 files changed, 10 insertions(+) |
||||
|
||||
diff --git a/tests/t-lib-helpers.sh b/tests/t-lib-helpers.sh |
||||
index 4b3c122..b65d675 100644 |
||||
--- a/tests/t-lib-helpers.sh |
||||
+++ b/tests/t-lib-helpers.sh |
||||
@@ -371,6 +371,7 @@ wait_for_dev_to_appear_() |
||||
local i=0 |
||||
local incr=1 |
||||
while :; do |
||||
+ udevadm settle |
||||
ls "$file" > /dev/null 2>&1 && return 0 |
||||
sleep .1 2>/dev/null || { sleep 1; incr=10; } |
||||
i=$(expr $i + $incr); test $i = 20 && break |
||||
@@ -386,6 +387,7 @@ wait_for_dev_to_disappear_() |
||||
local i=0 |
||||
local incr=1 |
||||
while :; do |
||||
+ udevadm settle |
||||
ls "$file" > /dev/null 2>&1 || return 0 |
||||
sleep .1 2>/dev/null || { sleep 1; incr=10; } |
||||
i=$(expr $i + $incr); test $i -ge $(expr $n_sec \* 10) && break |
||||
diff --git a/tests/t-local.sh b/tests/t-local.sh |
||||
index dde1b8d..5305865 100644 |
||||
--- a/tests/t-local.sh |
||||
+++ b/tests/t-local.sh |
||||
@@ -47,6 +47,7 @@ wait_for_dev_to_appear_() |
||||
local i=0 |
||||
local incr=1 |
||||
while :; do |
||||
+ udevadm settle |
||||
ls "$file" > /dev/null 2>&1 && return 0 |
||||
sleep .1 2>/dev/null || { sleep 1; incr=10; } |
||||
i=$(expr $i + $incr); test $i = 20 && break |
||||
@@ -110,6 +111,7 @@ scsi_debug_setup_() |
||||
local i=0 |
||||
local new_dev |
||||
while :; do |
||||
+ udevadm settle |
||||
new_dev=$(new_sdX_) && break |
||||
sleep .1 2>/dev/null || { sleep 1; incr=10; } |
||||
i=$(expr $i + $incr); test $i = 20 && break |
||||
diff --git a/tests/t6001-psep.sh b/tests/t6001-psep.sh |
||||
index b747732..f22c877 100644 |
||||
--- a/tests/t6001-psep.sh |
||||
+++ b/tests/t6001-psep.sh |
||||
@@ -20,6 +20,8 @@ |
||||
. "${srcdir=.}/init.sh"; path_prepend_ ../parted |
||||
|
||||
require_root_ |
||||
+require_udevadm_settle_ |
||||
+ |
||||
(dmsetup --help) > /dev/null 2>&1 || skip_test_ "No dmsetup installed" |
||||
|
||||
# Device maps names - should be random to not conflict with existing ones on |
||||
diff --git a/tests/t6002-dm-many-partitions.sh b/tests/t6002-dm-many-partitions.sh |
||||
index 247c9ee..13894f5 100755 |
||||
--- a/tests/t6002-dm-many-partitions.sh |
||||
+++ b/tests/t6002-dm-many-partitions.sh |
||||
@@ -20,6 +20,7 @@ |
||||
. "${srcdir=.}/init.sh"; path_prepend_ ../parted |
||||
|
||||
require_root_ |
||||
+require_udevadm_settle_ |
||||
(dmsetup --help) > /dev/null 2>&1 || skip_test_ "No dmsetup installed" |
||||
|
||||
ss=$sector_size_ |
||||
diff --git a/tests/t6003-dm-uuid.sh b/tests/t6003-dm-uuid.sh |
||||
index f58cb06..f51e45f 100755 |
||||
--- a/tests/t6003-dm-uuid.sh |
||||
+++ b/tests/t6003-dm-uuid.sh |
||||
@@ -20,6 +20,7 @@ |
||||
. "${srcdir=.}/init.sh"; path_prepend_ ../parted |
||||
|
||||
require_root_ |
||||
+require_udevadm_settle_ |
||||
(dmsetup --help) > /dev/null 2>&1 || skip_test_ "No dmsetup installed" |
||||
|
||||
ss=$sector_size_ |
||||
@@ -46,6 +47,7 @@ for ((i=1; i<=$n_partitions; i+=1)); do |
||||
cmd="$cmd mkpart p$i ${s}s ${s}s" |
||||
done |
||||
parted -m -a min -s /dev/mapper/$dm_name mklabel gpt $cmd > /dev/null 2>&1 || fail=1 |
||||
+wait_for_dev_to_appear_ /dev/mapper/${dm_name}p${n_partitions} || fail=1 |
||||
|
||||
# Make sure all the partitions have UUIDs |
||||
for ((i=1; i<=$n_partitions; i+=1)); do |
||||
diff --git a/tests/t6100-mdraid-partitions.sh b/tests/t6100-mdraid-partitions.sh |
||||
index d7e7d6a..a74afe0 100755 |
||||
--- a/tests/t6100-mdraid-partitions.sh |
||||
+++ b/tests/t6100-mdraid-partitions.sh |
||||
@@ -38,6 +38,7 @@ parted -s "$scsi_dev" mklabel gpt \ |
||||
mkpart p1 ext2 1M 4M \ |
||||
mkpart p2 ext2 5M 8M > out 2>&1 || fail=1 |
||||
compare /dev/null out || fail=1 |
||||
+wait_for_dev_to_appear_ ${scsi_dev}2 || { fail=1; cat /proc/partitions; } |
||||
|
||||
cleanup_fn_() { |
||||
# stop mdraid array |
||||
-- |
||||
2.5.0 |
||||
|
@ -0,0 +1,31 @@
@@ -0,0 +1,31 @@
|
||||
From ce7a3fd5e2beeee6b0765decb77ba8ee15867342 Mon Sep 17 00:00:00 2001 |
||||
From: "Brian C. Lane" <bcl@redhat.com> |
||||
Date: Tue, 1 Mar 2016 13:51:54 -0800 |
||||
Subject: [PATCH] tests: Add wait to t9042 (#1257415) |
||||
|
||||
Also make the new disklabel and first partition all in one step to |
||||
prevent udev problems. |
||||
|
||||
Resolves: rhbz#1257415 |
||||
--- |
||||
tests/t9042-dos-partition-limit.sh | 4 ++-- |
||||
1 file changed, 2 insertions(+), 2 deletions(-) |
||||
|
||||
diff --git a/tests/t9042-dos-partition-limit.sh b/tests/t9042-dos-partition-limit.sh |
||||
index 67ea86d..fb2dd72 100644 |
||||
--- a/tests/t9042-dos-partition-limit.sh |
||||
+++ b/tests/t9042-dos-partition-limit.sh |
||||
@@ -44,8 +44,8 @@ printf '%s\n' "BYT;" \ |
||||
"1:$((start-2))s:$((n-1))s:$((n-start+2))s:::lba;" \ |
||||
> exp || fail=1 |
||||
|
||||
-parted -s $scsi_dev mklabel msdos || fail=1 |
||||
-parted -s -a min $scsi_dev mkpart extended $((start-2))s 100% || fail=1 |
||||
+parted -s -a min $scsi_dev mklabel msdos mkpart extended $((start-2))s 100% || fail=1 |
||||
+wait_for_dev_to_appear_ ${scsi_dev}1 || fail=1 |
||||
|
||||
i=1 |
||||
while :; do |
||||
-- |
||||
2.5.0 |
||||
|
@ -0,0 +1,57 @@
@@ -0,0 +1,57 @@
|
||||
From 72ed2ef652be536c6752febf4f03cfc5d343e520 Mon Sep 17 00:00:00 2001 |
||||
From: "Brian C. Lane" <bcl@redhat.com> |
||||
Date: Mon, 29 Feb 2016 14:31:35 -0800 |
||||
Subject: [PATCH] tests: Fix t1700 failing on a host with a 4k xfs filesystem |
||||
(#1260664) |
||||
|
||||
The problem is that mkfs.xfs won't work if the file it is trying to |
||||
create is on a filesystem with a sector size larger than the passed |
||||
-ssize value. So a host with 4k disks (eg. s390) and the xfs filesystem |
||||
will fail with the error message: |
||||
illegal sector size 512; hw sector is 4096 |
||||
|
||||
Failures setting up the environment for the test aren't parted bugs. |
||||
This stops treating mkfs and dd errors as test failures, skipping the fs |
||||
and logging a warning. |
||||
|
||||
Related: rhbz#1260664 |
||||
--- |
||||
tests/t1700-probe-fs.sh | 14 +++++++------- |
||||
1 file changed, 7 insertions(+), 7 deletions(-) |
||||
|
||||
diff --git a/tests/t1700-probe-fs.sh b/tests/t1700-probe-fs.sh |
||||
index 83e6be4..2b59307 100755 |
||||
--- a/tests/t1700-probe-fs.sh |
||||
+++ b/tests/t1700-probe-fs.sh |
||||
@@ -30,13 +30,13 @@ for type in ext2 ext3 ext4 btrfs xfs nilfs2; do |
||||
case $type in ext*) n_sectors=8000 force=-F;; |
||||
*) n_sectors=$((512*1024)) force=;; esac |
||||
|
||||
- # create an $type file system |
||||
- if [ "$type" == "xfs" ]; then |
||||
- # Work around a problem with s390 |
||||
- mkfs.xfs -ssize=$ss -dfile,name=$dev,size=${n_sectors}s || fail=1 |
||||
+ # create an $type file system, creation failures are not parted bugs, |
||||
+ # skip the filesystem instead of failing the test. |
||||
+ if [ "$type" = "xfs" ]; then |
||||
+ mkfs.xfs -ssize=$ss -dfile,name=$dev,size=${n_sectors}s || { warn_ "$ME: mkfs.$type failed, skipping"; continue; } |
||||
else |
||||
- dd if=/dev/zero of=$dev bs=$ss count=$n_sectors >/dev/null || fail=1 |
||||
- mkfs.$type $force $dev || { warn_ $ME: mkfs.$type failed; fail=1; continue; } |
||||
+ dd if=/dev/null of=$dev bs=$ss seek=$n_sectors >/dev/null || { warn_ "$ME: dd failed, skipping $type"; continue; } |
||||
+ mkfs.$type $force $dev || { warn_ "$ME: mkfs.$type failed skipping"; continue; } |
||||
fi |
||||
|
||||
# probe the $type file system |
||||
@@ -48,7 +48,7 @@ done |
||||
# Some features should indicate ext4 by themselves. |
||||
for feature in uninit_bg flex_bg; do |
||||
# create an ext3 file system |
||||
- dd if=/dev/zero of=$dev bs=1024 count=4096 >/dev/null || fail=1 |
||||
+ dd if=/dev/null of=$dev bs=1024 seek=4096 >/dev/null || skip_ "dd failed" |
||||
mkfs.ext3 -F $dev >/dev/null || skip_ "mkfs.ext3 failed" |
||||
|
||||
# set the feature |
||||
-- |
||||
2.5.0 |
||||
|
@ -0,0 +1,48 @@
@@ -0,0 +1,48 @@
|
||||
From 9da2f460bebf9a8281fdd52536d3676b0914b8fd Mon Sep 17 00:00:00 2001 |
||||
From: "Brian C. Lane" <bcl@redhat.com> |
||||
Date: Mon, 11 Apr 2016 15:10:51 -0700 |
||||
Subject: [PATCH 38/39] libparted: Remove fdasd geometry code from |
||||
alloc_metadata (#1244833) |
||||
|
||||
commit db20944f changed how the trailing_metadata_end is calculated in |
||||
dasd_alloc_metadata, removing the need for setting up the anchor struct. |
||||
But dasd_alloc_metadata can be called in various contexts, and the |
||||
arch_specific->fd may or may not be valid during these calls. This can |
||||
result in unpredictable crashes when it uses a stale fd and tries to run |
||||
the file image code in fdasd_get_geometry instead of the device code. |
||||
|
||||
The solution is to just drop the unneeded code, and to remember that |
||||
arch_specific->fd should only be used when ped_device_open has first |
||||
been called. |
||||
|
||||
Resolves: rhbz#1244833 |
||||
--- |
||||
libparted/labels/dasd.c | 4 ---- |
||||
1 file changed, 4 deletions(-) |
||||
|
||||
diff --git a/libparted/labels/dasd.c b/libparted/labels/dasd.c |
||||
index 4d533cf..5bffda7 100644 |
||||
--- a/libparted/labels/dasd.c |
||||
+++ b/libparted/labels/dasd.c |
||||
@@ -950,7 +950,6 @@ dasd_alloc_metadata (PedDisk* disk) |
||||
PedPartition* part = NULL; /* initialize solely to placate gcc */ |
||||
PedPartition* new_part2; |
||||
PedSector trailing_meta_start, trailing_meta_end; |
||||
- struct fdasd_anchor anchor; |
||||
|
||||
PED_ASSERT (disk != NULL); |
||||
PED_ASSERT (disk->dev != NULL); |
||||
@@ -1000,10 +999,7 @@ dasd_alloc_metadata (PedDisk* disk) |
||||
backed up, then restored to a larger size disk, etc. |
||||
*/ |
||||
trailing_meta_start = part->geom.end + 1; |
||||
- fdasd_initialize_anchor(&anchor); |
||||
- fdasd_get_geometry(disk->dev, &anchor, arch_specific->fd); |
||||
trailing_meta_end = (long long) disk->dev->length - 1; |
||||
- fdasd_cleanup(&anchor); |
||||
if (trailing_meta_end >= trailing_meta_start) { |
||||
new_part2 = ped_partition_new (disk,PED_PARTITION_METADATA, |
||||
NULL, trailing_meta_start, trailing_meta_end); |
||||
-- |
||||
2.5.5 |
||||
|
@ -0,0 +1,29 @@
@@ -0,0 +1,29 @@
|
||||
From 8e64cda0151fa70195030d5abc0361bd3cd187bb Mon Sep 17 00:00:00 2001 |
||||
From: "Brian C. Lane" <bcl@redhat.com> |
||||
Date: Mon, 29 Feb 2016 16:47:18 -0800 |
||||
Subject: [PATCH 39/39] docs: Add list of filesystems for fs-type (#1311596) |
||||
|
||||
Add the most common filesystem types to the parted manpage. |
||||
|
||||
Resolves: rhbz#1311596 |
||||
(cherry picked from commit c9f50a36aee0a4c373b5e1bd3069aeb18fac055d) |
||||
--- |
||||
doc/C/parted.8 | 2 ++ |
||||
1 file changed, 2 insertions(+) |
||||
|
||||
diff --git a/doc/C/parted.8 b/doc/C/parted.8 |
||||
index 1ea741e..03bb3a5 100644 |
||||
--- a/doc/C/parted.8 |
||||
+++ b/doc/C/parted.8 |
||||
@@ -76,6 +76,8 @@ should be one of "aix", "amiga", "bsd", "dvh", "gpt", "loop", "mac", "msdos", |
||||
.B mkpart \fIpart-type\fP \fI[fs-type]\fP \fIstart\fP \fIend\fP |
||||
Make a \fIpart-type\fP partition for filesystem \fIfs-type\fP (if specified), |
||||
beginning at \fIstart\fP and ending at \fIend\fP (by default in megabytes). |
||||
+\fIfs-type\fP can be one of "btrfs", "ext2", "ext3", "ext4", "fat16", "fat32", |
||||
+"hfs", "hfs+", "linux-swap", "ntfs", "reiserfs", or "xfs". |
||||
\fIpart-type\fP should be one of "primary", "logical", or "extended". |
||||
.TP |
||||
.B name \fIpartition\fP \fIname\fP |
||||
-- |
||||
2.5.5 |
||||
|
@ -0,0 +1,45 @@
@@ -0,0 +1,45 @@
|
||||
From c34f2e31d804d70332b8be9760ea3f285d480070 Mon Sep 17 00:00:00 2001 |
||||
From: "Brian C. Lane" <bcl@redhat.com> |
||||
Date: Wed, 25 May 2016 09:00:04 -0700 |
||||
Subject: [PATCH] partprobe: Open the device once for probing (#1339705) |
||||
|
||||
Previously there were 3 open/close pairs for the device, which may |
||||
result in triggering extra udev actions. Instead, open it once at the |
||||
start of process_dev and close it at the end. |
||||
|
||||
Resolves: rhbz#1339705 |
||||
--- |
||||
partprobe/partprobe.c | 5 +++++ |
||||
1 file changed, 5 insertions(+) |
||||
|
||||
diff --git a/partprobe/partprobe.c b/partprobe/partprobe.c |
||||
index 8bccc4f..c5260c6 100644 |
||||
--- a/partprobe/partprobe.c |
||||
+++ b/partprobe/partprobe.c |
||||
@@ -108,6 +108,9 @@ process_dev (PedDevice* dev) |
||||
PedDiskType* disk_type; |
||||
PedDisk* disk; |
||||
|
||||
+ if (!ped_device_open (dev)) |
||||
+ return 0; |
||||
+ |
||||
disk_type = ped_disk_probe (dev); |
||||
if (!disk_type || !strcmp (disk_type->name, "loop")) |
||||
return 1; |
||||
@@ -122,11 +125,13 @@ process_dev (PedDevice* dev) |
||||
if (opt_summary) |
||||
summary (disk); |
||||
ped_disk_destroy (disk); |
||||
+ ped_device_close (dev); |
||||
return 1; |
||||
|
||||
error_destroy_disk: |
||||
ped_disk_destroy (disk); |
||||
error: |
||||
+ ped_device_close (dev); |
||||
return 0; |
||||
} |
||||
|
||||
-- |
||||
2.5.5 |
||||
|
@ -0,0 +1,45 @@
@@ -0,0 +1,45 @@
|
||||
From 4e729dc2d3ab4339181f59dc0a51583ecc14c7ab Mon Sep 17 00:00:00 2001 |
||||
From: "Brian C. Lane" <bcl@redhat.com> |
||||
Date: Mon, 29 Feb 2016 16:54:05 -0800 |
||||
Subject: [PATCH] tests: Stop timing t9040 (#1172675) |
||||
|
||||
parted doesn't have any control over how long this takes, there is no |
||||
reason to consider this a parted bug if it takes longer than expected. |
||||
|
||||
Resolves: rhbz#1172675 |
||||
--- |
||||
tests/t9040-many-partitions.sh | 10 ---------- |
||||
1 file changed, 10 deletions(-) |
||||
|
||||
diff --git a/tests/t9040-many-partitions.sh b/tests/t9040-many-partitions.sh |
||||
index 8949310..1f8e201 100644 |
||||
--- a/tests/t9040-many-partitions.sh |
||||
+++ b/tests/t9040-many-partitions.sh |
||||
@@ -53,9 +53,7 @@ while :; do |
||||
done |
||||
|
||||
# Time the actual command: |
||||
-t0=$(date +%s.%N) |
||||
parted -m -a min -s $scsi_dev mklabel gpt $cmd u s p > out 2>&1 || fail=1 |
||||
-t_final=$(date +%s.%N) |
||||
|
||||
i=1 |
||||
while :; do |
||||
@@ -64,14 +62,6 @@ while :; do |
||||
printf "$i:${s}s:${e}s:${partition_sectors}s::p$i:;\n" >> exp |
||||
test $i = $n_partitions && break; i=$((i+1)) |
||||
done |
||||
- |
||||
-# Fail the test if it takes too long. |
||||
-# On Fedora 16, this takes about 10 seconds for me. |
||||
-# With Fedora-12-era kernels, it typically took more than 150 seconds. |
||||
-$AWK "BEGIN {d = $t_final - $t0; n = $n_partitions; st = 60 < d;"\ |
||||
-' printf "created %d partitions in %.2f seconds\n", n, d; exit st }' /dev/null \ |
||||
- || fail=1 |
||||
- |
||||
compare exp out || fail=1 |
||||
|
||||
Exit $fail |
||||
-- |
||||
2.5.5 |
||||
|
@ -0,0 +1,32 @@
@@ -0,0 +1,32 @@
|
||||
From f648310fbc24186395e1864a48571982e1588435 Mon Sep 17 00:00:00 2001 |
||||
From: "Brian C. Lane" <bcl@redhat.com> |
||||
Date: Tue, 23 Aug 2016 08:55:18 -0700 |
||||
Subject: [PATCH] tests: Set optimal blocks to 64 for scsi_debug devices |
||||
(#1359682) |
||||
|
||||
The Linux kernel 4.5 changed the optimal blocks count from 64 to 1024 |
||||
This causes tests using scsi_debug devices to fail because of alignment |
||||
issues. Set the opt_blks to 64 so that we have consistent behavior |
||||
across kernels. |
||||
|
||||
Resolves: rhbz#1359682 |
||||
--- |
||||
tests/t-local.sh | 2 +- |
||||
1 file changed, 1 insertion(+), 1 deletion(-) |
||||
|
||||
diff --git a/tests/t-local.sh b/tests/t-local.sh |
||||
index 5305865..93ee0f7 100644 |
||||
--- a/tests/t-local.sh |
||||
+++ b/tests/t-local.sh |
||||
@@ -98,7 +98,7 @@ scsi_debug_setup_() |
||||
# It is not trivial to determine the name of the device we're creating. |
||||
# Record the names of all /sys/block/sd* devices *before* probing: |
||||
touch stamp |
||||
- modprobe scsi_debug "$@" || { rm -f stamp; return 1; } |
||||
+ modprobe scsi_debug opt_blks=64 "$@" || { rm -f stamp; return 1; } |
||||
scsi_debug_modprobe_succeeded_=1 |
||||
test "$VERBOSE" = yes \ |
||||
&& warn_ $ME_ modprobe scsi_debug succeeded |
||||
-- |
||||
2.7.4 |
||||
|
@ -0,0 +1,122 @@
@@ -0,0 +1,122 @@
|
||||
From 62cb6416f112dda0b0b969c1247cbc0f98314182 Mon Sep 17 00:00:00 2001 |
||||
From: Petr Uzel <petr.uzel@suse.cz> |
||||
Date: Tue, 14 Jun 2016 13:17:00 +0200 |
||||
Subject: [PATCH] Add support for NVMe devices |
||||
|
||||
Recognize NVMe Devices, so "parted -s /dev/nvme0n1" now prints |
||||
"NVMe Device (nvme)" instead of "Model: Unknown (unknown)". |
||||
|
||||
In order for a device to be recognized as NVMe, it has to |
||||
have a 'blkext' major number. But since this major can be |
||||
used also by other device types, we also check the device |
||||
path contains 'nvme' as a substring. |
||||
|
||||
* NEWS: Mention the change |
||||
* include/parted/device.h.in(PedDeviceType): Add PED_DEVICE_NVME |
||||
* libparted/arch/linux.c(BLKEXT_MAJOR): New define. |
||||
* libparted/arch/linux.c(_is_blkext_major): New function. |
||||
* libparted/arch/linux.c(_device_probe_type): Recognize NVMe devices. |
||||
* libparted/arch/linux.c(linux_new): Handle NVMe devices. |
||||
* parted/parted.c(do_print): Add "nvme" to list of transports. |
||||
|
||||
Signed-off-by: Brian C. Lane <bcl@redhat.com> |
||||
(cherry picked from commit e4ae4330f3e33201aeeed3b7ca88e15d98d03e13) |
||||
|
||||
Resolves: rhbz#1316239 |
||||
--- |
||||
NEWS | 4 ++++ |
||||
include/parted/device.in.h | 3 ++- |
||||
libparted/arch/linux.c | 14 ++++++++++++++ |
||||
parted/parted.c | 2 +- |
||||
4 files changed, 21 insertions(+), 2 deletions(-) |
||||
|
||||
diff --git a/NEWS b/NEWS |
||||
index d1ab2a6..d1a6f58 100644 |
||||
--- a/NEWS |
||||
+++ b/NEWS |
||||
@@ -1,5 +1,9 @@ |
||||
GNU parted NEWS -*- outline -*- |
||||
|
||||
+* Noteworthy changes in release 3.1-29 (2017-04-11) [RHEL7.4] |
||||
+ |
||||
+ Parted now recognizes NVMe devices |
||||
+ |
||||
* Noteworthy changes in release 3.1-18 (2014-08-12) [RHEL7.1] |
||||
|
||||
** New features |
||||
diff --git a/include/parted/device.in.h b/include/parted/device.in.h |
||||
index a3d1737..b0aa1f2 100644 |
||||
--- a/include/parted/device.in.h |
||||
+++ b/include/parted/device.in.h |
||||
@@ -49,7 +49,8 @@ typedef enum { |
||||
PED_DEVICE_VIRTBLK = 15, |
||||
PED_DEVICE_AOE = 16, |
||||
PED_DEVICE_MD = 17, |
||||
- PED_DEVICE_LOOP = 18 |
||||
+ PED_DEVICE_LOOP = 18, |
||||
+ PED_DEVICE_NVME = 19 |
||||
} PedDeviceType; |
||||
|
||||
typedef struct _PedDevice PedDevice; |
||||
diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c |
||||
index 341bbbb..fa329f4 100644 |
||||
--- a/libparted/arch/linux.c |
||||
+++ b/libparted/arch/linux.c |
||||
@@ -275,6 +275,7 @@ struct blkdev_ioctl_param { |
||||
#define SDMMC_MAJOR 179 |
||||
#define LOOP_MAJOR 7 |
||||
#define MD_MAJOR 9 |
||||
+#define BLKEXT_MAJOR 259 |
||||
|
||||
#define SCSI_BLK_MAJOR(M) ( \ |
||||
(M) == SCSI_DISK0_MAJOR \ |
||||
@@ -437,6 +438,12 @@ _is_virtblk_major (int major) |
||||
return _major_type_in_devices (major, "virtblk"); |
||||
} |
||||
|
||||
+static int |
||||
+_is_blkext_major (int major) |
||||
+{ |
||||
+ return _major_type_in_devices (major, "blkext"); |
||||
+} |
||||
+ |
||||
#ifdef ENABLE_DEVICE_MAPPER |
||||
static int |
||||
_is_dm_major (int major) |
||||
@@ -600,6 +607,8 @@ _device_probe_type (PedDevice* dev) |
||||
dev->type = PED_DEVICE_LOOP; |
||||
} else if (dev_major == MD_MAJOR) { |
||||
dev->type = PED_DEVICE_MD; |
||||
+ } else if (_is_blkext_major(dev_major) && dev->path && strstr(dev->path, "nvme")) { |
||||
+ dev->type = PED_DEVICE_NVME; |
||||
} else { |
||||
dev->type = PED_DEVICE_UNKNOWN; |
||||
} |
||||
@@ -1372,6 +1381,11 @@ linux_new (const char* path) |
||||
goto error_free_arch_specific; |
||||
break; |
||||
|
||||
+ case PED_DEVICE_NVME: |
||||
+ if (!init_generic (dev, _("NVMe Device"))) |
||||
+ goto error_free_arch_specific; |
||||
+ break; |
||||
+ |
||||
case PED_DEVICE_ATARAID: |
||||
if (!init_generic (dev, _("ATARAID Controller"))) |
||||
goto error_free_arch_specific; |
||||
diff --git a/parted/parted.c b/parted/parted.c |
||||
index 789030a..957789a 100644 |
||||
--- a/parted/parted.c |
||||
+++ b/parted/parted.c |
||||
@@ -947,7 +947,7 @@ _print_disk_info (const PedDevice *dev, const PedDisk *disk) |
||||
"cpqarray", "file", "ataraid", "i2o", |
||||
"ubd", "dasd", "viodasd", "sx8", "dm", |
||||
"xvd", "sd/mmc", "virtblk", "aoe", |
||||
- "md", "loopback"}; |
||||
+ "md", "loopback", "nvme"}; |
||||
|
||||
char* start = ped_unit_format (dev, 0); |
||||
PedUnit default_unit = ped_unit_get_default (); |
||||
-- |
||||
2.9.4 |
||||
|
@ -0,0 +1,65 @@
@@ -0,0 +1,65 @@
|
||||
From c051e9f7eaae007940a73be1509257bd52c569de Mon Sep 17 00:00:00 2001 |
||||
From: Phillip Susi <psusi@ubuntu.com> |
||||
Date: Sun, 25 May 2014 14:43:39 -0400 |
||||
Subject: [PATCH 44/48] Document resizepart command |
||||
|
||||
(cherry picked from commit 5c793853fe5cb0718d895c3394fb909c73c6fa1e) |
||||
|
||||
Related: rhbz#1423357 |
||||
--- |
||||
doc/C/parted.8 | 4 ++++ |
||||
doc/parted.texi | 16 ++++++++++++++++ |
||||
2 files changed, 20 insertions(+) |
||||
|
||||
diff --git a/doc/C/parted.8 b/doc/C/parted.8 |
||||
index 03bb3a5..5a24c94 100644 |
||||
--- a/doc/C/parted.8 |
||||
+++ b/doc/C/parted.8 |
||||
@@ -95,6 +95,10 @@ Rescue a lost partition that was located somewhere between \fIstart\fP and |
||||
\fIend\fP. If a partition is found, \fBparted\fP will ask if you want to |
||||
create an entry for it in the partition table. |
||||
.TP |
||||
+.B resizepart \fIpartition\fP \fIend\fP |
||||
+Change the \fIend\fP position of \fIpartition\fP. Note that this does not |
||||
+modify any filesystem present in the partition. |
||||
+.TP |
||||
.B rm \fIpartition\fP |
||||
Delete \fIpartition\fP. |
||||
.TP |
||||
diff --git a/doc/parted.texi b/doc/parted.texi |
||||
index f10d5e1..d498367 100644 |
||||
--- a/doc/parted.texi |
||||
+++ b/doc/parted.texi |
||||
@@ -423,6 +423,7 @@ GNU Parted provides the following commands: |
||||
* print:: |
||||
* quit:: |
||||
* rescue:: |
||||
+* resizepart:: |
||||
* rm:: |
||||
* select:: |
||||
* set:: |
||||
@@ -715,6 +716,21 @@ It's back! :) |
||||
|
||||
@end deffn |
||||
|
||||
+@node resizepart |
||||
+@subsection resizepart |
||||
+@cindex resizepart, command description |
||||
+@cindex command description, resizepart |
||||
+ |
||||
+@deffn Command resizepart @var{number} @var{end} |
||||
+ |
||||
+Moves the @var{end} position of partition @var{number}. Note that this |
||||
+does not modify any filesystem present in the partition. If you wish to |
||||
+do this, you will need to use external tools, such as @command{resize2fs}. |
||||
+ |
||||
+When growing a partition you will want to grow the filesystem afterwards, |
||||
+but when shrinking, you need to shrink the filesystem before the partition. |
||||
+@end deffn |
||||
+ |
||||
@node rm |
||||
@subsection rm |
||||
@cindex rm, command description |
||||
-- |
||||
2.9.4 |
||||
|
@ -0,0 +1,62 @@
@@ -0,0 +1,62 @@
|
||||
From 575b286502bd7338bfeeafbfc5e6ae6718b269f9 Mon Sep 17 00:00:00 2001 |
||||
From: Phillip Susi <psusi@ubuntu.com> |
||||
Date: Tue, 8 Jan 2013 19:40:35 -0500 |
||||
Subject: [PATCH 45/48] parted: Add stub resize command for backward |
||||
compatibility |
||||
|
||||
To make sure that older scripts trying to use the resize command do not |
||||
accidentally run the new resizepart command by mistake, this undocumented |
||||
stub command will throw an error if called. |
||||
|
||||
(cherry picked from commit 56bfbe21ecca0cb6466c78baed192dc2e5401676) |
||||
|
||||
Related: rhbz#1423357 |
||||
--- |
||||
parted/parted.c | 24 ++++++++++++++++++++++++ |
||||
1 file changed, 24 insertions(+) |
||||
|
||||
diff --git a/parted/parted.c b/parted/parted.c |
||||
index 957789a..d4a397b 100644 |
||||
--- a/parted/parted.c |
||||
+++ b/parted/parted.c |
||||
@@ -1478,6 +1478,16 @@ error: |
||||
} |
||||
|
||||
static int |
||||
+do_resize (PedDevice **dev, PedDisk** diskp) |
||||
+{ |
||||
+ ped_exception_throw ( |
||||
+ PED_EXCEPTION_ERROR, |
||||
+ PED_EXCEPTION_CANCEL, |
||||
+ _("The resize command has been removed in parted 3.0")); |
||||
+ return 0; |
||||
+} |
||||
+ |
||||
+static int |
||||
do_rm (PedDevice** dev) |
||||
{ |
||||
PedDisk* disk; |
||||
@@ -1891,6 +1901,20 @@ NULL), |
||||
str_list_create (_(start_end_msg), NULL), 1)); |
||||
|
||||
command_register (commands, command_create ( |
||||
+ str_list_create_unique ("resize", _("resize"), NULL), |
||||
+ do_resize, |
||||
+ NULL, |
||||
+ str_list_create (_(N_("The resize command was removed in parted 3.0\n")), NULL), 1)); |
||||
+ |
||||
+command_register (commands, command_create ( |
||||
+ str_list_create_unique ("resizepart", _("resizepart"), NULL), |
||||
+ do_resizepart, |
||||
+ str_list_create ( |
||||
+_("resizepart NUMBER END resize partition NUMBER"), |
||||
+NULL), |
||||
+ str_list_create (_(number_msg), _(end_msg), NULL), 1)); |
||||
+ |
||||
+command_register (commands, command_create ( |
||||
str_list_create_unique ("rm", _("rm"), NULL), |
||||
do_rm, |
||||
str_list_create ( |
||||
-- |
||||
2.9.4 |
||||
|
@ -0,0 +1,842 @@
@@ -0,0 +1,842 @@
|
||||
From 31ab97cfe0233191a73a1dd9cb7cd193451491da Mon Sep 17 00:00:00 2001 |
||||
From: "Brian C. Lane" <bcl@redhat.com> |
||||
Date: Fri, 11 Aug 2017 08:37:11 -0700 |
||||
Subject: [PATCH 46/48] libparted: Backport partition resize code |
||||
|
||||
This adds _blkpg_resize_partition, _dm_resize_partition, and adjust the |
||||
current code to support it. Changes are somewhat extensive, since they |
||||
also touch _disk_sync_part_table. |
||||
|
||||
This is based on code from commit f09ca967a0bc443b869a6fad5b5ffe8e95c3fe9a |
||||
|
||||
Related: rhbz#1423357 |
||||
--- |
||||
libparted/arch/linux.c | 673 +++++++++++++++++++++++++++++-------------------- |
||||
1 file changed, 403 insertions(+), 270 deletions(-) |
||||
|
||||
diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c |
||||
index fa329f4..6e78faf 100644 |
||||
--- a/libparted/arch/linux.c |
||||
+++ b/libparted/arch/linux.c |
||||
@@ -288,6 +288,7 @@ struct blkdev_ioctl_param { |
||||
|
||||
static char* _device_get_part_path (PedDevice* dev, int num); |
||||
static int _partition_is_mounted_by_path (const char* path); |
||||
+static unsigned int _device_get_partition_range(PedDevice const* dev); |
||||
static int _device_open (PedDevice* dev, int flags); |
||||
static int _device_open_ro (PedDevice* dev); |
||||
static int _device_close (PedDevice* dev); |
||||
@@ -446,6 +447,17 @@ _is_blkext_major (int major) |
||||
|
||||
#ifdef ENABLE_DEVICE_MAPPER |
||||
static int |
||||
+_dm_task_run_wait (struct dm_task *task, uint32_t cookie) |
||||
+{ |
||||
+ int rc = 0; |
||||
+ |
||||
+ rc = dm_task_run (task); |
||||
+ dm_udev_wait (cookie); |
||||
+ |
||||
+ return rc; |
||||
+} |
||||
+ |
||||
+static int |
||||
_is_dm_major (int major) |
||||
{ |
||||
return _major_type_in_devices (major, "device-mapper"); |
||||
@@ -1521,6 +1533,7 @@ _flush_cache (PedDevice* dev) |
||||
{ |
||||
LinuxSpecific* arch_specific = LINUX_SPECIFIC (dev); |
||||
int i; |
||||
+ int lpn = _device_get_partition_range(dev); |
||||
|
||||
if (dev->read_only) |
||||
return; |
||||
@@ -1532,7 +1545,7 @@ _flush_cache (PedDevice* dev) |
||||
if (_have_kern26()) |
||||
return; |
||||
|
||||
- for (i = 1; i < 16; i++) { |
||||
+ for (i = 1; i < lpn; i++) { |
||||
char* name; |
||||
int fd; |
||||
|
||||
@@ -2268,28 +2281,63 @@ zasprintf (const char *format, ...) |
||||
return r < 0 ? NULL : resultp; |
||||
} |
||||
|
||||
+#ifdef ENABLE_DEVICE_MAPPER |
||||
+static char * |
||||
+dm_canonical_path (PedDevice const *dev) |
||||
+{ |
||||
+ LinuxSpecific const *arch_specific = LINUX_SPECIFIC (dev); |
||||
+ |
||||
+ /* Get map name from devicemapper */ |
||||
+ struct dm_task *task = dm_task_create (DM_DEVICE_INFO); |
||||
+ if (!task) |
||||
+ goto err; |
||||
+ if (!dm_task_set_major_minor (task, arch_specific->major, |
||||
+ arch_specific->minor, 0)) |
||||
+ goto err; |
||||
+ if (!dm_task_run(task)) |
||||
+ goto err; |
||||
+ char *dev_name = zasprintf ("/dev/mapper/%s", dm_task_get_name (task)); |
||||
+ if (dev_name == NULL) |
||||
+ goto err; |
||||
+ dm_task_destroy (task); |
||||
+ return dev_name; |
||||
+err: |
||||
+ return NULL; |
||||
+} |
||||
+#endif |
||||
+ |
||||
static char* |
||||
_device_get_part_path (PedDevice *dev, int num) |
||||
{ |
||||
- size_t path_len = strlen (dev->path); |
||||
- |
||||
+ char *devpath; |
||||
+ size_t path_len; |
||||
char *result; |
||||
+#ifdef ENABLE_DEVICE_MAPPER |
||||
+ devpath = (dev->type == PED_DEVICE_DM |
||||
+ ? dm_canonical_path (dev) : dev->path); |
||||
+#else |
||||
+ devpath = dev->path; |
||||
+#endif |
||||
+ path_len = strlen (devpath); |
||||
/* Check for devfs-style /disc => /partN transformation |
||||
unconditionally; the system might be using udev with devfs rules, |
||||
and if not the test is harmless. */ |
||||
- if (5 < path_len && !strcmp (dev->path + path_len - 5, "/disc")) { |
||||
+ if (5 < path_len && !strcmp (devpath + path_len - 5, "/disc")) { |
||||
/* replace /disc with /part%d */ |
||||
result = zasprintf ("%.*s/part%d", |
||||
- (int) (path_len - 5), dev->path, num); |
||||
+ (int) (path_len - 5), devpath, num); |
||||
} else { |
||||
char const *p = (dev->type == PED_DEVICE_DAC960 |
||||
|| dev->type == PED_DEVICE_CPQARRAY |
||||
|| dev->type == PED_DEVICE_ATARAID |
||||
|| isdigit (dev->path[path_len - 1]) |
||||
? "p" : ""); |
||||
- result = zasprintf ("%s%s%d", dev->path, p, num); |
||||
+ result = zasprintf ("%s%s%d", devpath, p, num); |
||||
} |
||||
- |
||||
+#ifdef ENABLE_DEVICE_MAPPER |
||||
+ if (dev->type == PED_DEVICE_DM) |
||||
+ free (devpath); |
||||
+#endif |
||||
return result; |
||||
} |
||||
|
||||
@@ -2438,6 +2486,62 @@ _blkpg_add_partition (PedDisk* disk, const PedPartition *part) |
||||
|
||||
if (!_blkpg_part_command (disk->dev, &linux_part, |
||||
BLKPG_ADD_PARTITION)) { |
||||
+ return 0; |
||||
+ } |
||||
+ |
||||
+ return 1; |
||||
+} |
||||
+ |
||||
+static int |
||||
+_blkpg_remove_partition (PedDisk* disk, int n) |
||||
+{ |
||||
+ struct blkpg_partition linux_part; |
||||
+ |
||||
+ memset (&linux_part, 0, sizeof (linux_part)); |
||||
+ linux_part.pno = n; |
||||
+ return _blkpg_part_command (disk->dev, &linux_part, |
||||
+ BLKPG_DEL_PARTITION); |
||||
+} |
||||
+ |
||||
+#ifdef BLKPG_RESIZE_PARTITION |
||||
+static int _blkpg_resize_partition (PedDisk* disk, const PedPartition *part) |
||||
+{ |
||||
+ struct blkpg_partition linux_part; |
||||
+ char* dev_name; |
||||
+ |
||||
+ PED_ASSERT(disk != NULL); |
||||
+ PED_ASSERT(disk->dev->sector_size % PED_SECTOR_SIZE_DEFAULT == 0); |
||||
+ |
||||
+ dev_name = _device_get_part_path (disk->dev, part->num); |
||||
+ if (!dev_name) |
||||
+ return 0; |
||||
+ memset (&linux_part, 0, sizeof (linux_part)); |
||||
+ linux_part.start = part->geom.start * disk->dev->sector_size; |
||||
+ /* see fs/partitions/msdos.c:msdos_partition(): "leave room for LILO" */ |
||||
+ if (part->type & PED_PARTITION_EXTENDED) { |
||||
+ if (disk->dev->sector_size == 512) { |
||||
+ linux_part.length = 2; |
||||
+ PedPartition *walk; |
||||
+ /* if the second sector is claimed by a logical partition, |
||||
+ then there's just no room for lilo, so don't try to use it */ |
||||
+ for (walk = part->part_list; walk; walk = walk->next) { |
||||
+ if (walk->geom.start == part->geom.start+1) |
||||
+ linux_part.length = 1; |
||||
+ } |
||||
+ } else { |
||||
+ linux_part.length = 1; |
||||
+ } |
||||
+ linux_part.length *= disk->dev->sector_size; |
||||
+ } |
||||
+ else |
||||
+ linux_part.length = part->geom.length * disk->dev->sector_size; |
||||
+ linux_part.pno = part->num; |
||||
+ strncpy (linux_part.devname, dev_name, BLKPG_DEVNAMELTH); |
||||
+ |
||||
+ free (dev_name); |
||||
+ |
||||
+ if (!_blkpg_part_command (disk->dev, &linux_part, |
||||
+ BLKPG_RESIZE_PARTITION)) { |
||||
return ped_exception_throw ( |
||||
PED_EXCEPTION_ERROR, |
||||
PED_EXCEPTION_IGNORE_CANCEL, |
||||
@@ -2454,17 +2558,7 @@ _blkpg_add_partition (PedDisk* disk, const PedPartition *part) |
||||
|
||||
return 1; |
||||
} |
||||
- |
||||
-static int |
||||
-_blkpg_remove_partition (PedDisk* disk, int n) |
||||
-{ |
||||
- struct blkpg_partition linux_part; |
||||
- |
||||
- memset (&linux_part, 0, sizeof (linux_part)); |
||||
- linux_part.pno = n; |
||||
- return _blkpg_part_command (disk->dev, &linux_part, |
||||
- BLKPG_DEL_PARTITION); |
||||
-} |
||||
+#endif |
||||
|
||||
/* Read the integer from /sys/block/DEV_BASE/ENTRY and set *VAL |
||||
to that value, where DEV_BASE is the last component of DEV->path. |
||||
@@ -2586,6 +2680,8 @@ static unsigned int |
||||
_device_get_partition_range(PedDevice const* dev) |
||||
{ |
||||
int range; |
||||
+ if (dev->type == PED_DEVICE_DM) |
||||
+ return MAX_NUM_PARTS; |
||||
bool ok = _sysfs_int_entry_from_dev(dev, "ext_range", &range); |
||||
|
||||
if (!ok) |
||||
@@ -2594,264 +2690,78 @@ _device_get_partition_range(PedDevice const* dev) |
||||
return range > 1 ? range : 0; |
||||
} |
||||
|
||||
-/* |
||||
- * Sync the partition table in two step process: |
||||
- * 1. Remove all of the partitions from the kernel's tables, but do not attempt |
||||
- * removal of any partition for which the corresponding ioctl call fails. |
||||
- * 2. Add all the partitions that we hold in disk, throwing a warning |
||||
- * if we cannot because step 1 failed to remove it and it is not being |
||||
- * added back with the same start and length. |
||||
- * |
||||
- * To achieve this two step process we must calculate the minimum number of |
||||
- * maximum possible partitions between what linux supports and what the label |
||||
- * type supports. EX: |
||||
- * |
||||
- * number=MIN(max_parts_supported_in_linux,max_parts_supported_in_msdos_tables) |
||||
- */ |
||||
-static int |
||||
-_disk_sync_part_table (PedDisk* disk) |
||||
-{ |
||||
- PED_ASSERT(disk != NULL); |
||||
- PED_ASSERT(disk->dev != NULL); |
||||
- int lpn; |
||||
- |
||||
- unsigned int part_range = _device_get_partition_range(disk->dev); |
||||
- |
||||
- /* lpn = largest partition number. */ |
||||
- if (ped_disk_get_max_supported_partition_count(disk, &lpn)) |
||||
- lpn = PED_MIN(lpn, part_range); |
||||
- else |
||||
- lpn = part_range; |
||||
- |
||||
- /* Its not possible to support largest_partnum < 0. |
||||
- * largest_partnum == 0 would mean does not support partitions. |
||||
- * */ |
||||
- if (lpn < 1) |
||||
- return 0; |
||||
- int ret = 0; |
||||
- int *ok = calloc (lpn, sizeof *ok); |
||||
- if (!ok) |
||||
- return 0; |
||||
- int *errnums = ped_malloc(sizeof(int) * lpn); |
||||
- if (!errnums) |
||||
- goto cleanup; |
||||
- |
||||
- /* Attempt to remove each and every partition, retrying for |
||||
- up to max_sleep_seconds upon any failure due to EBUSY. */ |
||||
- unsigned int sleep_microseconds = 10000; |
||||
- unsigned int max_sleep_seconds = 1; |
||||
- unsigned int n_sleep = (max_sleep_seconds |
||||
- * 1000000 / sleep_microseconds); |
||||
- int i; |
||||
- for (i = 0; i < n_sleep; i++) { |
||||
- if (i) |
||||
- usleep (sleep_microseconds); |
||||
- bool busy = false; |
||||
- int j; |
||||
- for (j = 0; j < lpn; j++) { |
||||
- if (!ok[j]) { |
||||
- ok[j] = _blkpg_remove_partition (disk, j + 1); |
||||
- errnums[j] = errno; |
||||
- if (!ok[j] && errnums[j] == EBUSY) |
||||
- busy = true; |
||||
- } |
||||
- } |
||||
- if (!busy) |
||||
- break; |
||||
- } |
||||
- |
||||
- for (i = 1; i <= lpn; i++) { |
||||
- PedPartition *part = ped_disk_get_partition (disk, i); |
||||
- if (part) { |
||||
- if (!ok[i - 1] && errnums[i - 1] == EBUSY) { |
||||
- unsigned long long length; |
||||
- unsigned long long start; |
||||
- /* get start and length of existing partition */ |
||||
- if (!_kernel_get_partition_start_and_length(part, |
||||
- &start, &length)) |
||||
- goto cleanup; |
||||
- if (start == part->geom.start |
||||
- && length == part->geom.length) |
||||
- ok[i - 1] = 1; |
||||
- /* If the new partition is unchanged and the |
||||
- existing one was not removed because it was |
||||
- in use, then reset the error flag and do not |
||||
- try to add it since it is already there. */ |
||||
- continue; |
||||
- } |
||||
- |
||||
- /* add the (possibly modified or new) partition */ |
||||
- if (!_blkpg_add_partition (disk, part)) { |
||||
- ped_exception_throw ( |
||||
- PED_EXCEPTION_ERROR, |
||||
- PED_EXCEPTION_RETRY_CANCEL, |
||||
- _("Failed to add partition %d (%s)"), |
||||
- i, strerror (errno)); |
||||
- goto cleanup; |
||||
- } |
||||
- } |
||||
- } |
||||
- |
||||
- char *bad_part_list = NULL; |
||||
- /* now warn about any errors */ |
||||
- for (i = 1; i <= lpn; i++) { |
||||
- if (ok[i - 1] || errnums[i - 1] == ENXIO) |
||||
- continue; |
||||
- if (bad_part_list == NULL) { |
||||
- bad_part_list = malloc (lpn * 5); |
||||
- if (!bad_part_list) |
||||
- goto cleanup; |
||||
- bad_part_list[0] = 0; |
||||
- } |
||||
- sprintf (bad_part_list + strlen (bad_part_list), "%d, ", i); |
||||
- } |
||||
- if (bad_part_list == NULL) |
||||
- ret = 1; |
||||
- else { |
||||
- bad_part_list[strlen (bad_part_list) - 2] = 0; |
||||
- if (ped_exception_throw ( |
||||
- PED_EXCEPTION_ERROR, |
||||
- PED_EXCEPTION_IGNORE_CANCEL, |
||||
- _("Partition(s) %s on %s have been written, but we have " |
||||
- "been unable to inform the kernel of the change, " |
||||
- "probably because it/they are in use. As a result, " |
||||
- "the old partition(s) will remain in use. You " |
||||
- "should reboot now before making further changes."), |
||||
- bad_part_list, disk->dev->path) == PED_EXCEPTION_IGNORE) |
||||
- ret = 1; |
||||
- free (bad_part_list); |
||||
- } |
||||
- cleanup: |
||||
- free (errnums); |
||||
- free (ok); |
||||
- return ret; |
||||
-} |
||||
- |
||||
#ifdef ENABLE_DEVICE_MAPPER |
||||
static int |
||||
-_dm_remove_map_name(char *name) |
||||
+_dm_remove_partition(PedDisk* disk, int partno) |
||||
{ |
||||
- struct dm_task *task = NULL; |
||||
int rc = 0; |
||||
uint32_t cookie = 0; |
||||
+ char *part_name = _device_get_part_path (disk->dev, partno); |
||||
|
||||
- task = dm_task_create(DM_DEVICE_REMOVE); |
||||
+ int fd = open (part_name, O_RDONLY | O_EXCL); |
||||
+ if (fd == -1) { |
||||
+ if (errno == ENOENT) |
||||
+ errno = ENXIO; /* nothing to remove, device already doesn't exist */ |
||||
+ goto err; |
||||
+ } |
||||
+ close (fd); |
||||
+ struct dm_task *task = dm_task_create(DM_DEVICE_REMOVE); |
||||
if (!task) |
||||
- return 1; |
||||
- |
||||
- dm_task_set_name (task, name); |
||||
- if (!dm_task_set_cookie(task, &cookie, 0)) |
||||
- goto err; |
||||
- |
||||
- rc = dm_task_run(task); |
||||
- dm_udev_wait(cookie); |
||||
+ goto err; |
||||
+ dm_task_set_name (task, part_name); |
||||
+ if (!dm_task_set_cookie (task, &cookie, 0)) |
||||
+ goto err; |
||||
+ rc = _dm_task_run_wait (task, cookie); |
||||
dm_task_update_nodes(); |
||||
-err: |
||||
dm_task_destroy(task); |
||||
- if (!rc) |
||||
- return 1; |
||||
- |
||||
- return 0; |
||||
+err: |
||||
+ free (part_name); |
||||
+ return rc; |
||||
} |
||||
|
||||
-static int |
||||
-_dm_is_part (struct dm_info *this, char *name) |
||||
+static bool |
||||
+_dm_get_partition_start_and_length(PedPartition const *part, |
||||
+ unsigned long long *start, |
||||
+ unsigned long long *length) |
||||
{ |
||||
struct dm_task* task = NULL; |
||||
- struct dm_info* info = alloca(sizeof *info); |
||||
- struct dm_deps* deps = NULL; |
||||
int rc = 0; |
||||
- unsigned int i; |
||||
|
||||
- task = dm_task_create(DM_DEVICE_DEPS); |
||||
- if (!task) |
||||
+ if (!(task = dm_task_create(DM_DEVICE_TABLE))) |
||||
return 0; |
||||
- |
||||
- dm_task_set_name(task, name); |
||||
- if (!dm_task_run(task)) |
||||
+ char *path = _device_get_part_path (part->disk->dev, part->num); |
||||
+ PED_ASSERT(path); |
||||
+ /* libdevmapper likes to complain on stderr instead of quietly |
||||
+ returning ENOENT or ENXIO, so try to stat first */ |
||||
+ struct stat st; |
||||
+ if (stat(path, &st)) |
||||
goto err; |
||||
- |
||||
- memset(info, '\0', sizeof *info); |
||||
- dm_task_get_info(task, info); |
||||
- if (!info->exists) |
||||
+ dm_task_set_name(task, path); |
||||
+ if (!dm_task_run(task)) |
||||
goto err; |
||||
|
||||
- deps = dm_task_get_deps(task); |
||||
- if (!deps) |
||||
+ int major, minor; |
||||
+ char *params; |
||||
+ char *target_type; |
||||
+ dm_get_next_target(task, NULL, (uint64_t *)start, (uint64_t *)length, &target_type, ¶ms); |
||||
+ if (sscanf (params, "%d:%d %Ld", &major, &minor, start) != 3) |
||||
goto err; |
||||
+ rc = 1; |
||||
|
||||
- for (i = 0; i < deps->count; i++) { |
||||
- unsigned int ma = major(deps->device[i]), |
||||
- mi = minor(deps->device[i]); |
||||
- |
||||
- if (ma == this->major && mi == this->minor) |
||||
- rc = 1; |
||||
- } |
||||
- |
||||
+ /* device-mapper uses 512b units, make sure we return length and start in terms of the device's |
||||
+ * sector size. |
||||
+ */ |
||||
+ *start /= (part->disk->dev->sector_size / PED_SECTOR_SIZE_DEFAULT); |
||||
+ *length /= (part->disk->dev->sector_size / PED_SECTOR_SIZE_DEFAULT); |
||||
err: |
||||
+ free (path); |
||||
dm_task_destroy(task); |
||||
return rc; |
||||
} |
||||
|
||||
-static int |
||||
-_dm_remove_parts (PedDevice* dev) |
||||
-{ |
||||
- struct dm_task* task = NULL; |
||||
- struct dm_info* info = alloca(sizeof *info); |
||||
- struct dm_names* names = NULL; |
||||
- unsigned int next = 0; |
||||
- int rc; |
||||
- LinuxSpecific* arch_specific = LINUX_SPECIFIC (dev); |
||||
- |
||||
- task = dm_task_create(DM_DEVICE_LIST); |
||||
- if (!task) |
||||
- goto err; |
||||
- |
||||
- if (!dm_task_set_major_minor (task, arch_specific->major, |
||||
- arch_specific->minor, 0)) |
||||
- goto err; |
||||
- |
||||
- if (!dm_task_run(task)) |
||||
- goto err; |
||||
- |
||||
- memset(info, '\0', sizeof *info); |
||||
- dm_task_get_info(task, info); |
||||
- if (!info->exists) |
||||
- goto err; |
||||
- |
||||
- names = dm_task_get_names(task); |
||||
- if (!names) |
||||
- goto err; |
||||
- |
||||
- rc = 0; |
||||
- do { |
||||
- names = (void *) ((char *) names + next); |
||||
- |
||||
- if (_dm_is_part(info, names->name)) |
||||
- rc += _dm_remove_map_name(names->name); |
||||
- |
||||
- next = names->next; |
||||
- } while (next); |
||||
- |
||||
- dm_task_update_nodes(); |
||||
- dm_task_destroy(task); |
||||
- task = NULL; |
||||
- |
||||
- if (!rc) |
||||
- return 1; |
||||
-err: |
||||
- if (task) |
||||
- dm_task_destroy(task); |
||||
- ped_exception_throw (PED_EXCEPTION_WARNING, PED_EXCEPTION_IGNORE, |
||||
- _("parted was unable to re-read the partition " |
||||
- "table on %s (%s). This means Linux won't know " |
||||
- "anything about the modifications you made. "), |
||||
- dev->path, strerror (errno)); |
||||
- return 0; |
||||
-} |
||||
|
||||
static int |
||||
-_dm_add_partition (PedDisk* disk, PedPartition* part) |
||||
+_dm_add_partition (PedDisk* disk, const PedPartition* part) |
||||
{ |
||||
char* vol_name = NULL; |
||||
const char* dev_name = NULL; |
||||
@@ -2908,9 +2818,8 @@ _dm_add_partition (PedDisk* disk, PedPartition* part) |
||||
"linear", params); |
||||
if (!dm_task_set_cookie(task, &cookie, 0)) |
||||
goto err; |
||||
- if (dm_task_run (task)) { |
||||
+ if (_dm_task_run_wait (task, cookie)) { |
||||
//printf("0 %ld linear %s\n", part->geom.length, params); |
||||
- dm_udev_wait(cookie); |
||||
dm_task_update_nodes(); |
||||
dm_task_destroy(task); |
||||
free(params); |
||||
@@ -2918,8 +2827,7 @@ _dm_add_partition (PedDisk* disk, PedPartition* part) |
||||
free(vol_name); |
||||
return 1; |
||||
} else { |
||||
- dm_udev_wait(cookie); |
||||
- _dm_remove_map_name(vol_name); |
||||
+ _dm_remove_partition (disk, part->num); |
||||
} |
||||
err: |
||||
dm_task_update_nodes(); |
||||
@@ -2932,30 +2840,259 @@ err: |
||||
} |
||||
|
||||
static int |
||||
-_dm_reread_part_table (PedDisk* disk) |
||||
+_dm_resize_partition (PedDisk* disk, const PedPartition* part) |
||||
{ |
||||
- int largest_partnum = ped_disk_get_last_partition_num (disk); |
||||
- int rc = 1; |
||||
- int i; |
||||
+ LinuxSpecific* arch_specific = LINUX_SPECIFIC (disk->dev); |
||||
+ char* params = NULL; |
||||
+ char* vol_name = NULL; |
||||
+ const char* dev_name = NULL; |
||||
+ uint32_t cookie = 0; |
||||
+ int rc = 0; |
||||
|
||||
- sync(); |
||||
- if (!_dm_remove_parts(disk->dev)) |
||||
- rc = 0; |
||||
+ /* Get map name from devicemapper */ |
||||
+ struct dm_task *task = dm_task_create (DM_DEVICE_INFO); |
||||
+ if (!task) |
||||
+ goto err; |
||||
|
||||
- for (i = 1; i <= largest_partnum; i++) { |
||||
- PedPartition* part; |
||||
+ if (!dm_task_set_major_minor (task, arch_specific->major, |
||||
+ arch_specific->minor, 0)) |
||||
+ goto err; |
||||
|
||||
- part = ped_disk_get_partition (disk, i); |
||||
- if (!part) |
||||
- continue; |
||||
+ if (!dm_task_run(task)) |
||||
+ goto err; |
||||
+ |
||||
+ dev_name = dm_task_get_name (task); |
||||
+ size_t name_len = strlen (dev_name); |
||||
+ vol_name = zasprintf ("%s%s%d", |
||||
+ dev_name, |
||||
+ isdigit (dev_name[name_len - 1]) ? "p" : "", |
||||
+ part->num); |
||||
+ if (vol_name == NULL) |
||||
+ goto err; |
||||
+ |
||||
+ /* Caution: dm_task_destroy frees dev_name. */ |
||||
+ dm_task_destroy (task); |
||||
+ task = NULL; |
||||
+ |
||||
+ /* device-mapper uses 512b units, not the device's sector size */ |
||||
+ if ( ! (params = zasprintf ("%d:%d %lld", arch_specific->major, |
||||
+ arch_specific->minor, |
||||
+ part->geom.start * (disk->dev->sector_size / PED_SECTOR_SIZE_DEFAULT)))) |
||||
+ goto err; |
||||
+ |
||||
+ task = dm_task_create (DM_DEVICE_RELOAD); |
||||
+ if (!task) |
||||
+ goto err; |
||||
|
||||
- if (!_dm_add_partition (disk, part)) |
||||
- rc = 0; |
||||
+ dm_task_set_name (task, vol_name); |
||||
+ /* device-mapper uses 512b units, not the device's sector size */ |
||||
+ dm_task_add_target (task, 0, part->geom.length * (disk->dev->sector_size / PED_SECTOR_SIZE_DEFAULT), |
||||
+ "linear", params); |
||||
+ /* NOTE: DM_DEVICE_RELOAD doesn't generate udev events, so no cookie is needed (it will freeze). |
||||
+ * DM_DEVICE_RESUME does, so get a cookie and synchronize with udev. |
||||
+ */ |
||||
+ if (dm_task_run (task)) { |
||||
+ dm_task_destroy (task); |
||||
+ task = dm_task_create (DM_DEVICE_RESUME); |
||||
+ if (!task) |
||||
+ goto err; |
||||
+ dm_task_set_name (task, vol_name); |
||||
+ if (!dm_task_set_cookie (task, &cookie, 0)) |
||||
+ goto err; |
||||
+ if (_dm_task_run_wait (task, cookie)) { |
||||
+ rc = 1; |
||||
+ } |
||||
} |
||||
+err: |
||||
+ dm_task_update_nodes(); |
||||
+ if (task) |
||||
+ dm_task_destroy (task); |
||||
+ free (params); |
||||
+ free (vol_name); |
||||
return rc; |
||||
} |
||||
+ |
||||
#endif |
||||
|
||||
+/* |
||||
+ * Sync the partition table in two step process: |
||||
+ * 1. Remove all of the partitions from the kernel's tables, but do not attempt |
||||
+ * removal of any partition for which the corresponding ioctl call fails. |
||||
+ * 2. Add all the partitions that we hold in disk, throwing a warning |
||||
+ * if we cannot because step 1 failed to remove it and it is not being |
||||
+ * added back with the same start and length. |
||||
+ * |
||||
+ * To achieve this two step process we must calculate the minimum number of |
||||
+ * maximum possible partitions between what linux supports and what the label |
||||
+ * type supports. EX: |
||||
+ * |
||||
+ * number=MIN(max_parts_supported_in_linux,max_parts_supported_in_msdos_tables) |
||||
+ */ |
||||
+static int |
||||
+_disk_sync_part_table (PedDisk* disk) |
||||
+{ |
||||
+ PED_ASSERT(disk != NULL); |
||||
+ PED_ASSERT(disk->dev != NULL); |
||||
+ int lpn, lpn2; |
||||
+ unsigned int part_range = _device_get_partition_range(disk->dev); |
||||
+ int (*add_partition)(PedDisk* disk, const PedPartition *part); |
||||
+ int (*resize_partition)(PedDisk* disk, const PedPartition *part); |
||||
+ int (*remove_partition)(PedDisk* disk, int partno); |
||||
+ bool (*get_partition_start_and_length)(PedPartition const *part, |
||||
+ unsigned long long *start, |
||||
+ unsigned long long *length); |
||||
+ |
||||
+ |
||||
+#ifdef ENABLE_DEVICE_MAPPER |
||||
+ if (disk->dev->type == PED_DEVICE_DM) { |
||||
+ add_partition = _dm_add_partition; |
||||
+ remove_partition = _dm_remove_partition; |
||||
+ resize_partition = _dm_resize_partition; |
||||
+ get_partition_start_and_length = _dm_get_partition_start_and_length; |
||||
+ } else |
||||
+#endif |
||||
+ { |
||||
+ add_partition = _blkpg_add_partition; |
||||
+ remove_partition = _blkpg_remove_partition; |
||||
+#ifdef BLKPG_RESIZE_PARTITION |
||||
+ resize_partition = _blkpg_resize_partition; |
||||
+#else |
||||
+ resize_partition = NULL; |
||||
+#endif |
||||
+ get_partition_start_and_length = _kernel_get_partition_start_and_length; |
||||
+ } |
||||
+ |
||||
+ /* lpn = largest partition number. |
||||
+ * for remove pass, use greater of device or label limit */ |
||||
+ if (ped_disk_get_max_supported_partition_count(disk, &lpn)) |
||||
+ lpn = PED_MAX(lpn, part_range); |
||||
+ else |
||||
+ lpn = part_range; |
||||
+ /* for add pass, use lesser of device or label limit */ |
||||
+ if (ped_disk_get_max_supported_partition_count(disk, &lpn2)) |
||||
+ lpn2 = PED_MIN(lpn2, part_range); |
||||
+ else |
||||
+ lpn2 = part_range; |
||||
+ /* Its not possible to support largest_partnum < 0. |
||||
+ * largest_partnum == 0 would mean does not support partitions. |
||||
+ * */ |
||||
+ if (lpn < 1) |
||||
+ return 0; |
||||
+ int ret = 0; |
||||
+ int *ok = calloc (lpn, sizeof *ok); |
||||
+ if (!ok) |
||||
+ return 0; |
||||
+ int *errnums = ped_malloc(sizeof(int) * lpn); |
||||
+ if (!errnums) |
||||
+ goto cleanup; |
||||
+ |
||||
+ int i; |
||||
+ /* remove old partitions first */ |
||||
+ for (i = 1; i <= lpn; i++) { |
||||
+ PedPartition *part = ped_disk_get_partition (disk, i); |
||||
+ if (part) { |
||||
+ unsigned long long length; |
||||
+ unsigned long long start; |
||||
+ /* get start and length of existing partition */ |
||||
+ if (get_partition_start_and_length(part, |
||||
+ &start, &length) |
||||
+ && start == part->geom.start |
||||
+ && (length == part->geom.length |
||||
+ || (resize_partition && part->num < lpn2))) |
||||
+ { |
||||
+ /* partition is unchanged, or will be resized so nothing to do */ |
||||
+ ok[i - 1] = 1; |
||||
+ continue; |
||||
+ } |
||||
+ } |
||||
+ /* Attempt to remove the partition, retrying for |
||||
+ up to max_sleep_seconds upon any failure due to EBUSY. */ |
||||
+ unsigned int sleep_microseconds = 10000; |
||||
+ unsigned int max_sleep_seconds = 1; |
||||
+ unsigned int n_sleep = (max_sleep_seconds |
||||
+ * 1000000 / sleep_microseconds); |
||||
+ do { |
||||
+ ok[i - 1] = remove_partition (disk, i); |
||||
+ errnums[i - 1] = errno; |
||||
+ if (ok[i - 1] || errnums[i - 1] != EBUSY) |
||||
+ break; |
||||
+ usleep (sleep_microseconds); |
||||
+ } while (n_sleep--); |
||||
+ if (!ok[i - 1] && errnums[i - 1] == ENXIO) |
||||
+ ok[i - 1] = 1; /* it already doesn't exist */ |
||||
+ } |
||||
+ lpn = lpn2; |
||||
+ /* don't actually add partitions for loop */ |
||||
+ if (strcmp (disk->type->name, "loop") == 0) |
||||
+ lpn = 0; |
||||
+ for (i = 1; i <= lpn; i++) { |
||||
+ PedPartition *part = ped_disk_get_partition (disk, i); |
||||
+ if (!part) |
||||
+ continue; |
||||
+ unsigned long long length; |
||||
+ unsigned long long start; |
||||
+ /* get start and length of existing partition */ |
||||
+ if (get_partition_start_and_length(part, |
||||
+ &start, &length) |
||||
+ && start == part->geom.start) |
||||
+ { |
||||
+ if (length == part->geom.length) { |
||||
+ ok[i - 1] = 1; |
||||
+ /* partition is unchanged, so nothing to do */ |
||||
+ continue; |
||||
+ } |
||||
+ if (resize_partition |
||||
+ && start == part->geom.start) |
||||
+ { |
||||
+ /* try to resize */ |
||||
+ if (resize_partition (disk, part)) { |
||||
+ ok[i - 1] = 1; |
||||
+ continue; |
||||
+ } |
||||
+ } |
||||
+ } |
||||
+ /* add the (possibly modified or new) partition */ |
||||
+ if (!add_partition (disk, part)) { |
||||
+ ok[i - 1] = 0; |
||||
+ errnums[i - 1] = errno; |
||||
+ } |
||||
+ } |
||||
+ |
||||
+ char *bad_part_list = NULL; |
||||
+ /* now warn about any errors */ |
||||
+ for (i = 1; i <= lpn; i++) { |
||||
+ if (ok[i - 1] || errnums[i - 1] == ENXIO) |
||||
+ continue; |
||||
+ if (bad_part_list == NULL) { |
||||
+ bad_part_list = malloc (lpn * 5); |
||||
+ if (!bad_part_list) |
||||
+ goto cleanup; |
||||
+ bad_part_list[0] = 0; |
||||
+ } |
||||
+ sprintf (bad_part_list + strlen (bad_part_list), "%d, ", i); |
||||
+ } |
||||
+ if (bad_part_list == NULL) |
||||
+ ret = 1; |
||||
+ else { |
||||
+ bad_part_list[strlen (bad_part_list) - 2] = 0; |
||||
+ if (ped_exception_throw ( |
||||
+ PED_EXCEPTION_ERROR, |
||||
+ PED_EXCEPTION_IGNORE_CANCEL, |
||||
+ _("Partition(s) %s on %s have been written, but we have " |
||||
+ "been unable to inform the kernel of the change, " |
||||
+ "probably because it/they are in use. As a result, " |
||||
+ "the old partition(s) will remain in use. You " |
||||
+ "should reboot now before making further changes."), |
||||
+ bad_part_list, disk->dev->path) == PED_EXCEPTION_IGNORE) |
||||
+ ret = 1; |
||||
+ free (bad_part_list); |
||||
+ } |
||||
+ cleanup: |
||||
+ free (errnums); |
||||
+ free (ok); |
||||
+ return ret; |
||||
+} |
||||
+ |
||||
static int |
||||
_have_blkpg () |
||||
{ |
||||
@@ -2973,10 +3110,6 @@ _have_blkpg () |
||||
static int |
||||
linux_disk_commit (PedDisk* disk) |
||||
{ |
||||
-#ifdef ENABLE_DEVICE_MAPPER |
||||
- if (disk->dev->type == PED_DEVICE_DM) |
||||
- return _dm_reread_part_table (disk); |
||||
-#endif |
||||
if (disk->dev->type != PED_DEVICE_FILE) { |
||||
|
||||
/* We now require BLKPG support. If this assertion fails, |
||||
-- |
||||
2.9.4 |
||||
|
@ -0,0 +1,124 @@
@@ -0,0 +1,124 @@
|
||||
From f1711f8bd420315a01b2df6d4339646c96169558 Mon Sep 17 00:00:00 2001 |
||||
From: Petr Uzel <petr.uzel@suse.cz> |
||||
Date: Tue, 27 Sep 2011 09:11:29 +0200 |
||||
Subject: [PATCH 47/48] tests: excersise resize command |
||||
|
||||
a lot of TODOs |
||||
|
||||
(cherry picked from commit 33fd692cb14045fdc13306cd57cfe2040328daa8) |
||||
--- |
||||
tests/Makefile.am | 1 + |
||||
tests/t3200-resize-partition.sh | 89 +++++++++++++++++++++++++++++++++++++++++ |
||||
2 files changed, 90 insertions(+) |
||||
create mode 100755 tests/t3200-resize-partition.sh |
||||
|
||||
diff --git a/tests/Makefile.am b/tests/Makefile.am |
||||
index 1cf859c..29fa280 100644 |
||||
--- a/tests/Makefile.am |
||||
+++ b/tests/Makefile.am |
||||
@@ -42,6 +42,7 @@ TESTS = \ |
||||
t2400-dos-hfs-partition-type.sh \ |
||||
t2500-probe-corrupt-hfs.sh \ |
||||
t3000-resize-fs.sh \ |
||||
+ t3200-resize-partition.sh \ |
||||
t3200-type-change.sh \ |
||||
t3300-palo-prep.sh \ |
||||
t3310-flags.sh \ |
||||
diff --git a/tests/t3200-resize-partition.sh b/tests/t3200-resize-partition.sh |
||||
new file mode 100755 |
||||
index 0000000..251b545 |
||||
--- /dev/null |
||||
+++ b/tests/t3200-resize-partition.sh |
||||
@@ -0,0 +1,89 @@ |
||||
+#!/bin/sh |
||||
+# exercise the resize sub-command |
||||
+# based on t3000-resize-fs.sh test |
||||
+ |
||||
+# Copyright (C) 2009-2011 Free Software Foundation, Inc. |
||||
+ |
||||
+# This program is free software; you can redistribute it and/or modify |
||||
+# it under the terms of the GNU General Public License as published by |
||||
+# the Free Software Foundation; either version 3 of the License, or |
||||
+# (at your option) any later version. |
||||
+ |
||||
+# This program is distributed in the hope that it will be useful, |
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
+# GNU General Public License for more details. |
||||
+ |
||||
+# You should have received a copy of the GNU General Public License |
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>. |
||||
+ |
||||
+. "${srcdir=.}/init.sh"; path_prepend_ ../parted |
||||
+ |
||||
+require_root_ |
||||
+require_scsi_debug_module_ |
||||
+ |
||||
+ss=$sector_size_ |
||||
+ |
||||
+default_start=1024s |
||||
+default_end=2048s |
||||
+ |
||||
+# create memory-backed device |
||||
+scsi_debug_setup_ dev_size_mb=5 > dev-name || |
||||
+ skip_ 'failed to create scsi_debug device' |
||||
+dev=$(cat dev-name) |
||||
+ |
||||
+# TODO test simple shrink |
||||
+# TODO test expand past end of the disk |
||||
+# TODO test expand past begin of next partition |
||||
+# TODO test shrink before start |
||||
+# TODO test everything with GPT |
||||
+# TODO more tests with extended/logical partitions |
||||
+ |
||||
+parted -s $dev mklabel msdos > out 2> err || fail=1 |
||||
+# expect no output |
||||
+compare /dev/null out || fail=1 |
||||
+compare /dev/null err || fail=1 |
||||
+ |
||||
+# ensure that the disk is large enough |
||||
+dev_n_sectors=$(parted -s $dev u s p|sed -n '2s/.* \([0-9]*\)s$/\1/p') |
||||
+device_sectors_required=$(echo $default_end | sed 's/s$//') |
||||
+# Ensure that $dev is large enough for this test |
||||
+test $device_sectors_required -le $dev_n_sectors || fail=1 |
||||
+ |
||||
+# create an empty partition |
||||
+parted -a minimal -s $dev mkpart primary $default_start $default_end > out 2>&1 || fail=1 |
||||
+compare /dev/null out || fail=1 |
||||
+ |
||||
+# print partition table |
||||
+parted -m -s $dev u s p > out 2>&1 || fail=1 |
||||
+ |
||||
+# FIXME: check expected output |
||||
+ |
||||
+# wait for new partition device to appear |
||||
+wait_for_dev_to_appear_ ${dev}1 || { warn_ "${dev}1 did not appear" fail=1; } |
||||
+sleep 1 |
||||
+ |
||||
+ |
||||
+# extend the filesystem to end on sector 4096 |
||||
+new_end=4096s |
||||
+parted -s $dev resizepart 1 $new_end > out 2> err || fail=1 |
||||
+# expect no output |
||||
+compare /dev/null out || fail=1 |
||||
+compare /dev/null err || fail=1 |
||||
+ |
||||
+# print partition table |
||||
+parted -m -s $dev u s p > out 2>&1 || fail=1 |
||||
+ |
||||
+sed -n 3p out > k && mv k out || fail=1 |
||||
+printf "1:$default_start:$new_end:3073s:::$ms;\n" > exp || fail=1 |
||||
+compare exp out || fail=1 |
||||
+ |
||||
+# Remove the partition explicitly, so that mklabel doesn't evoke a warning. |
||||
+parted -s $dev rm 1 || fail=1 |
||||
+ |
||||
+# Create a clean partition table for the next iteration. |
||||
+parted -s $dev mklabel msdos > out 2>&1 || fail=1 |
||||
+# expect no output |
||||
+compare /dev/null out || fail=1 |
||||
+ |
||||
+Exit $fail |
||||
-- |
||||
2.9.4 |
||||
|
@ -0,0 +1,140 @@
@@ -0,0 +1,140 @@
|
||||
From 109a5a35d8482f43c7d779df3b7d10bf16d5f31b Mon Sep 17 00:00:00 2001 |
||||
From: Petr Uzel <petr.uzel@suse.cz> |
||||
Date: Mon, 26 Sep 2011 17:21:01 +0200 |
||||
Subject: [PATCH 48/48] parted: add resizepart command |
||||
|
||||
Add resizepart command to resize ( change the end position ) an existing |
||||
partition. Note that it does nothing to a filesystem in the partition. |
||||
|
||||
(cherry picked from commit 21c58e17c473ea8ef31a18d03348eb2381c0f36c) |
||||
|
||||
Resolves: rhbz#1423357 |
||||
--- |
||||
NEWS | 1 + |
||||
parted/parted.c | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++- |
||||
2 files changed, 77 insertions(+), 1 deletion(-) |
||||
|
||||
diff --git a/NEWS b/NEWS |
||||
index d1a6f58..62d6381 100644 |
||||
--- a/NEWS |
||||
+++ b/NEWS |
||||
@@ -3,6 +3,7 @@ GNU parted NEWS -*- outline -*- |
||||
* Noteworthy changes in release 3.1-29 (2017-04-11) [RHEL7.4] |
||||
|
||||
Parted now recognizes NVMe devices |
||||
+ Add resizepart command to resize a partition |
||||
|
||||
* Noteworthy changes in release 3.1-18 (2014-08-12) [RHEL7.1] |
||||
|
||||
diff --git a/parted/parted.c b/parted/parted.c |
||||
index d4a397b..d64b0b8 100644 |
||||
--- a/parted/parted.c |
||||
+++ b/parted/parted.c |
||||
@@ -152,6 +152,9 @@ static const char* fs_type_msg_start = N_("FS-TYPE is one of: "); |
||||
static const char* start_end_msg = N_("START and END are disk locations, such as " |
||||
"4GB or 10%. Negative values count from the end of the disk. " |
||||
"For example, -1s specifies exactly the last sector.\n"); |
||||
+static const char* end_msg = N_("END is disk location, such as " |
||||
+ "4GB or 10%. Negative value counts from the end of the disk. " |
||||
+ "For example, -1s specifies exactly the last sector.\n"); |
||||
static const char* state_msg = N_("STATE is one of: on, off\n"); |
||||
static const char* device_msg = N_("DEVICE is usually /dev/hda or /dev/sda\n"); |
||||
static const char* name_msg = N_("NAME is any word you want\n"); |
||||
@@ -435,6 +438,21 @@ constraint_from_start_end (PedDevice* dev, PedGeometry* range_start, |
||||
range_start, range_end, 1, dev->length); |
||||
} |
||||
|
||||
+ |
||||
+static PedConstraint* |
||||
+constraint_from_start_end_fixed_start (PedDevice* dev, PedSector start_sector, |
||||
+ PedGeometry* range_end) |
||||
+{ |
||||
+ PedGeometry range_start; |
||||
+ range_start.dev = dev; |
||||
+ range_start.start = start_sector; |
||||
+ range_start.end = start_sector; |
||||
+ range_start.length = 1; |
||||
+ |
||||
+ return ped_constraint_new (ped_alignment_any, ped_alignment_any, |
||||
+ &range_start, range_end, 1, dev->length); |
||||
+} |
||||
+ |
||||
void |
||||
help_on (char* topic) |
||||
{ |
||||
@@ -1478,7 +1496,7 @@ error: |
||||
} |
||||
|
||||
static int |
||||
-do_resize (PedDevice **dev, PedDisk** diskp) |
||||
+do_resize (PedDevice **dev) |
||||
{ |
||||
ped_exception_throw ( |
||||
PED_EXCEPTION_ERROR, |
||||
@@ -1488,6 +1506,63 @@ do_resize (PedDevice **dev, PedDisk** diskp) |
||||
} |
||||
|
||||
static int |
||||
+do_resizepart (PedDevice** dev) |
||||
+{ |
||||
+ PedDisk *disk; |
||||
+ PedPartition *part = NULL; |
||||
+ PedSector start, end, oldend; |
||||
+ PedGeometry *range_end = NULL; |
||||
+ PedConstraint* constraint; |
||||
+ int rc = 0; |
||||
+ |
||||
+ disk = ped_disk_new (*dev); |
||||
+ if (!disk) |
||||
+ goto error; |
||||
+ |
||||
+ if (ped_disk_is_flag_available(disk, PED_DISK_CYLINDER_ALIGNMENT)) |
||||
+ if (!ped_disk_set_flag(disk, PED_DISK_CYLINDER_ALIGNMENT, |
||||
+ alignment == ALIGNMENT_CYLINDER)) |
||||
+ goto error; |
||||
+ |
||||
+ if (!command_line_get_partition (_("Partition number?"), disk, &part)) |
||||
+ goto error; |
||||
+ if (!_partition_warn_busy (part)) |
||||
+ goto error; |
||||
+ |
||||
+ start = part->geom.start; |
||||
+ end = oldend = part->geom.end; |
||||
+ if (!command_line_get_sector (_("End?"), *dev, &end, &range_end, NULL)) |
||||
+ goto error; |
||||
+ /* Do not move start of the partition */ |
||||
+ constraint = constraint_from_start_end_fixed_start (*dev, start, range_end); |
||||
+ if (!ped_disk_set_partition_geom (disk, part, constraint, |
||||
+ start, end)) |
||||
+ goto error_destroy_constraint; |
||||
+ /* warn when shrinking partition - might lose data */ |
||||
+ if (part->geom.end < oldend) |
||||
+ if (ped_exception_throw ( |
||||
+ PED_EXCEPTION_WARNING, |
||||
+ PED_EXCEPTION_YES_NO, |
||||
+ _("Shrinking a partition can cause data loss, " \ |
||||
+ "are you sure you want to continue?")) != PED_EXCEPTION_YES) |
||||
+ goto error_destroy_constraint; |
||||
+ ped_disk_commit (disk); |
||||
+ |
||||
+ if ((*dev)->type != PED_DEVICE_FILE) |
||||
+ disk_is_modified = 1; |
||||
+ |
||||
+ rc = 1; |
||||
+ |
||||
+error_destroy_constraint: |
||||
+ ped_constraint_destroy (constraint); |
||||
+error: |
||||
+ if (range_end != NULL) |
||||
+ ped_geometry_destroy (range_end); |
||||
+ return rc; |
||||
+} |
||||
+ |
||||
+ |
||||
+static int |
||||
do_rm (PedDevice** dev) |
||||
{ |
||||
PedDisk* disk; |
||||
-- |
||||
2.9.4 |
||||
|
@ -0,0 +1,86 @@
@@ -0,0 +1,86 @@
|
||||
From e3f74af78b774b235123b9d5fa40fead3b003bb2 Mon Sep 17 00:00:00 2001 |
||||
From: "Brian C. Lane" <bcl@redhat.com> |
||||
Date: Fri, 20 Jan 2012 15:31:43 -0800 |
||||
Subject: [PATCH] libparted: use dm_udev_wait (#698121) |
||||
|
||||
This applies Peter Rajnoha's patch to use dm_udev_wait to |
||||
synchronize with udev. |
||||
|
||||
This requires libdevmapper v1.02.39 and higher. |
||||
|
||||
Patch is from: |
||||
https://lists.gnu.org/archive/html/bug-parted/2010-09/msg00007.html |
||||
|
||||
Resolves: rhbz#698121 |
||||
--- |
||||
libparted/arch/linux.c | 16 +++++++++++++++- |
||||
1 files changed, 15 insertions(+), 1 deletions(-) |
||||
|
||||
diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c |
||||
index e2c4139..1fcbcad 100644 |
||||
--- a/libparted/arch/linux.c |
||||
+++ b/libparted/arch/linux.c |
||||
@@ -1319,6 +1319,10 @@ linux_new (const char* path) |
||||
dev->dirty = 0; |
||||
dev->boot_dirty = 0; |
||||
|
||||
+#ifdef ENABLE_DEVICE_MAPPER |
||||
+ dm_udev_set_sync_support(1); |
||||
+#endif |
||||
+ |
||||
if (!_device_probe_type (dev)) |
||||
goto error_free_arch_specific; |
||||
|
||||
@@ -2676,16 +2680,21 @@ static int |
||||
_dm_remove_map_name(char *name) |
||||
{ |
||||
struct dm_task *task = NULL; |
||||
- int rc; |
||||
+ int rc = 0; |
||||
+ uint32_t cookie = 0; |
||||
|
||||
task = dm_task_create(DM_DEVICE_REMOVE); |
||||
if (!task) |
||||
return 1; |
||||
|
||||
dm_task_set_name (task, name); |
||||
+ if (!dm_task_set_cookie(task, &cookie, 0)) |
||||
+ goto err; |
||||
|
||||
rc = dm_task_run(task); |
||||
+ dm_udev_wait(cookie); |
||||
dm_task_update_nodes(); |
||||
+err: |
||||
dm_task_destroy(task); |
||||
if (!rc) |
||||
return 1; |
||||
@@ -2796,6 +2805,7 @@ _dm_add_partition (PedDisk* disk, PedPartition* part) |
||||
const char* dev_name = NULL; |
||||
char* params = NULL; |
||||
LinuxSpecific* arch_specific = LINUX_SPECIFIC (disk->dev); |
||||
+ uint32_t cookie = 0; |
||||
|
||||
/* Get map name from devicemapper */ |
||||
struct dm_task *task = dm_task_create (DM_DEVICE_INFO); |
||||
@@ -2832,14 +2842,18 @@ _dm_add_partition (PedDisk* disk, PedPartition* part) |
||||
dm_task_set_name (task, vol_name); |
||||
dm_task_add_target (task, 0, part->geom.length, |
||||
"linear", params); |
||||
+ if (!dm_task_set_cookie(task, &cookie, 0)) |
||||
+ goto err; |
||||
if (dm_task_run (task)) { |
||||
//printf("0 %ld linear %s\n", part->geom.length, params); |
||||
+ dm_udev_wait(cookie); |
||||
dm_task_update_nodes(); |
||||
dm_task_destroy(task); |
||||
free(params); |
||||
free(vol_name); |
||||
return 1; |
||||
} else { |
||||
+ dm_udev_wait(cookie); |
||||
_dm_remove_map_name(vol_name); |
||||
} |
||||
err: |
||||
-- |
||||
1.7.7.6 |
||||
|
@ -0,0 +1,25 @@
@@ -0,0 +1,25 @@
|
||||
From 43663f1226da0a6284b5f52f6e2f741473c077b6 Mon Sep 17 00:00:00 2001 |
||||
From: "Brian C. Lane" <bcl@redhat.com> |
||||
Date: Fri, 3 Feb 2012 13:03:27 -0800 |
||||
Subject: [PATCH] libparted: copy pmbr_boot when duplicating GPT disk |
||||
|
||||
* libparted/labels/gpt.c (gpt_duplicate): copy pmbr_boot flag |
||||
--- |
||||
libparted/labels/gpt.c | 1 + |
||||
1 files changed, 1 insertions(+), 0 deletions(-) |
||||
|
||||
diff --git a/libparted/labels/gpt.c b/libparted/labels/gpt.c |
||||
index bad9ed4..0f07250 100644 |
||||
--- a/libparted/labels/gpt.c |
||||
+++ b/libparted/labels/gpt.c |
||||
@@ -562,6 +562,7 @@ gpt_duplicate (const PedDisk *disk) |
||||
old_disk_data->data_area.length); |
||||
new_disk_data->entry_count = old_disk_data->entry_count; |
||||
new_disk_data->uuid = old_disk_data->uuid; |
||||
+ new_disk_data->pmbr_boot = old_disk_data->pmbr_boot; |
||||
return new_disk; |
||||
} |
||||
|
||||
-- |
||||
1.7.6.5 |
||||
|
@ -0,0 +1,59 @@
@@ -0,0 +1,59 @@
|
||||
Subject: [PATCH] libparted: Avoid dasd as default disk type while probe |
||||
|
||||
From: Nageswara R Sastry <rnsastry@linux.vnet.ibm.com> |
||||
|
||||
This patch avoids setting 'dasd' as a default disk type for |
||||
'disk image file' at the time of probe. |
||||
|
||||
Signed-off-by: Nageswara R Sastry <rnsastry@linux.vnet.ibm.com> |
||||
--- |
||||
include/parted/fdasd.h | 1 + |
||||
libparted/labels/fdasd.c | 6 +++++- |
||||
2 files changed, 6 insertions(+), 1 deletion(-) |
||||
|
||||
--- a/include/parted/fdasd.h |
||||
+++ b/include/parted/fdasd.h |
||||
@@ -261,6 +261,7 @@ typedef struct fdasd_anchor { |
||||
struct fdasd_hd_geometry geo; |
||||
unsigned int label_block; |
||||
unsigned int FBA_layout; |
||||
+ bool is_file; |
||||
} fdasd_anchor_t; |
||||
|
||||
enum offset {lower, upper}; |
||||
--- a/libparted/labels/fdasd.c |
||||
+++ b/libparted/labels/fdasd.c |
||||
@@ -301,6 +301,7 @@ fdasd_initialize_anchor (fdasd_anchor_t |
||||
} |
||||
anc->hw_cylinders = 0; |
||||
anc->formatted_cylinders = 0; |
||||
+ anc->is_file = 0; |
||||
} |
||||
|
||||
/* |
||||
@@ -892,7 +893,7 @@ fdasd_check_volume (fdasd_anchor_t *anc, |
||||
/* Some times LDL formatted disks does not |
||||
contain any volume label */ |
||||
return 1; |
||||
- } else { |
||||
+ } else if (! anc->is_file) { |
||||
/* didn't find VOL1 volume label */ |
||||
anc->formatted_cylinders = anc->hw_cylinders; |
||||
anc->fspace_trk = anc->formatted_cylinders * anc->geo.heads |
||||
@@ -976,6 +977,7 @@ fdasd_get_geometry (const PedDevice *dev |
||||
dasd_info.FBA_layout = 0; |
||||
anc->hw_cylinders = ((st.st_size / blksize) / anc->geo.sectors) / |
||||
anc->geo.heads; |
||||
+ anc->is_file = 1; |
||||
} else { |
||||
if (ioctl(f, HDIO_GETGEO, &anc->geo) != 0) |
||||
fdasd_error(anc, unable_to_ioctl, |
||||
@@ -997,6 +999,8 @@ fdasd_get_geometry (const PedDevice *dev |
||||
anc->hw_cylinders = characteristics->long_no_cyl; |
||||
else |
||||
anc->hw_cylinders = characteristics->no_cyl; |
||||
+ |
||||
+ anc->is_file = 0; |
||||
} |
||||
|
||||
anc->dev_type = dasd_info.dev_type; |
@ -0,0 +1,54 @@
@@ -0,0 +1,54 @@
|
||||
From 1190dc5b214ce6ba4cbeadbdd599ab3ebb2cbb13 Mon Sep 17 00:00:00 2001 |
||||
From: "Richard W.M. Jones" <rjones@redhat.com> |
||||
Date: Fri, 8 Jun 2012 14:42:45 -0700 |
||||
Subject: [PATCH] libparted: Fix endian error with FirstUsableLBA (#829960) |
||||
|
||||
On big-endial systems (eg. ppc64) this would cause parted to |
||||
crash. |
||||
|
||||
* NEWS: add new bugfix |
||||
* libparted/labels/gpt.c (gpt_get_max_supported_partition_count): |
||||
fix endian issues with pth->FirstUsableLBA |
||||
--- |
||||
NEWS | 3 ++- |
||||
libparted/labels/gpt.c | 4 ++-- |
||||
2 files changed, 4 insertions(+), 3 deletions(-) |
||||
|
||||
diff --git a/NEWS b/NEWS |
||||
index b0a0657..596ab37 100644 |
||||
--- a/NEWS |
||||
+++ b/NEWS |
||||
@@ -1,9 +1,10 @@ |
||||
GNU parted NEWS -*- outline -*- |
||||
|
||||
-* Noteworthy changes in release 3.1-2 (2012-03-21) [Fedora] |
||||
+* Noteworthy changes in release 3.1-4 (2012-06-08) [Fedora] |
||||
|
||||
** Bug Fixes |
||||
|
||||
+ libparted: Don't crash on big-endian systems when using GPT |
||||
libparted: Treat disks without a PMBR as msdos labeled disks |
||||
even if they have GPT partition tables. |
||||
|
||||
diff --git a/libparted/labels/gpt.c b/libparted/labels/gpt.c |
||||
index ab2145e..6ca33c8 100644 |
||||
--- a/libparted/labels/gpt.c |
||||
+++ b/libparted/labels/gpt.c |
||||
@@ -1787,12 +1787,12 @@ gpt_get_max_supported_partition_count (const PedDisk *disk, int *max_n) |
||||
|
||||
if (!_header_is_valid (disk, pth, 1)) |
||||
{ |
||||
- pth->FirstUsableLBA = 34; |
||||
+ pth->FirstUsableLBA = PED_CPU_TO_LE64 (34); |
||||
pth->SizeOfPartitionEntry |
||||
= PED_CPU_TO_LE32 (sizeof (GuidPartitionEntry_t)); |
||||
} |
||||
|
||||
- *max_n = (disk->dev->sector_size * (pth->FirstUsableLBA - 2) |
||||
+ *max_n = (disk->dev->sector_size * (PED_LE64_TO_CPU (pth->FirstUsableLBA)-2) |
||||
/ PED_LE32_TO_CPU (pth->SizeOfPartitionEntry)); |
||||
pth_free (pth); |
||||
return true; |
||||
-- |
||||
1.7.7.6 |
||||
|
@ -0,0 +1,35 @@
@@ -0,0 +1,35 @@
|
||||
From dc213bf52d640c0219541afb002f71b49a888c7f Mon Sep 17 00:00:00 2001 |
||||
From: "Brian C. Lane" <bcl@redhat.com> |
||||
Date: Wed, 4 Sep 2013 11:45:44 -0700 |
||||
Subject: [PATCH] libparted: Flush parent device on open (#962611) |
||||
|
||||
Parted probes for filesystems using geometry offsets into the parent |
||||
device, not the partition device itself. This means it may get stale |
||||
information if a partition has just been formatted. |
||||
|
||||
On kernels before 2.6 this will also flush all partition devices. On 2.6 |
||||
and newer kernels it will only flush the parent device. |
||||
|
||||
* libparted/arch/linux.c (linux_open): Always call _flush_cache |
||||
--- |
||||
libparted/arch/linux.c | 4 +--- |
||||
1 file changed, 1 insertion(+), 3 deletions(-) |
||||
|
||||
diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c |
||||
index 2c410a0..4af0d5c 100644 |
||||
--- a/libparted/arch/linux.c |
||||
+++ b/libparted/arch/linux.c |
||||
@@ -1579,9 +1579,7 @@ retry: |
||||
dev->read_only = 0; |
||||
} |
||||
|
||||
- /* With kernels < 2.6 flush cache for cache coherence issues */ |
||||
- if (!_have_kern26()) |
||||
- _flush_cache (dev); |
||||
+ _flush_cache (dev); |
||||
|
||||
return 1; |
||||
} |
||||
-- |
||||
1.8.3.1 |
||||
|
@ -0,0 +1,184 @@
@@ -0,0 +1,184 @@
|
||||
From 242217de0268d6036a6e6a3f196abd79bfcb98b8 Mon Sep 17 00:00:00 2001 |
||||
From: "Brian C. Lane" <bcl@redhat.com> |
||||
Date: Tue, 27 Aug 2013 17:27:07 -0700 |
||||
Subject: [PATCH 1/2] libparted: Recognize btrfs filesystem |
||||
|
||||
Add support for showing 'btrfs' in the 'file system' column. Also |
||||
allows the used to enter btrfs as the fs type. It doesn't really do |
||||
anything -- just sets the partition type to linux. |
||||
|
||||
* NEWS (Changes in behavior): Mention it. |
||||
* doc/parted.texti: Document btrfs fs. |
||||
* (libparted/fs/Makefile.am): Add btrfs.c |
||||
* (libparted/fs/btrfs/btrfs.c): Probe for btrfs |
||||
* (libparted/libparted.c): Register btrfs |
||||
--- |
||||
NEWS | 3 ++ |
||||
doc/parted.texi | 1 + |
||||
libparted/fs/Makefile.am | 1 + |
||||
libparted/fs/btrfs/btrfs.c | 78 ++++++++++++++++++++++++++++++++++++++++++++++ |
||||
libparted/libparted.c | 4 +++ |
||||
5 files changed, 87 insertions(+) |
||||
create mode 100644 libparted/fs/btrfs/btrfs.c |
||||
|
||||
diff --git a/NEWS b/NEWS |
||||
index 596ab37..e2d01ed 100644 |
||||
--- a/NEWS |
||||
+++ b/NEWS |
||||
@@ -84,6 +84,9 @@ GNU parted NEWS -*- outline -*- |
||||
|
||||
** Changes in behavior |
||||
|
||||
+ Added support for recognizing btrfs filesystem. This simply displays |
||||
+ btrfs in the 'file system' column of the parted output. |
||||
+ |
||||
Floppy drives are no longer scanned on linux: they cannot be partitioned |
||||
anyhow, and some users have a misconfigured BIOS that claims to have a |
||||
floppy when they don't, and scanning gets hung up. |
||||
diff --git a/doc/parted.texi b/doc/parted.texi |
||||
index 6561d0e..2b1ce64 100644 |
||||
--- a/doc/parted.texi |
||||
+++ b/doc/parted.texi |
||||
@@ -575,6 +575,7 @@ partition table. |
||||
@item NTFS |
||||
@item reiserfs |
||||
@item ufs |
||||
+@item btrfs |
||||
@end itemize |
||||
|
||||
Example: |
||||
diff --git a/libparted/fs/Makefile.am b/libparted/fs/Makefile.am |
||||
index 8d48ea1..a8fb313 100644 |
||||
--- a/libparted/fs/Makefile.am |
||||
+++ b/libparted/fs/Makefile.am |
||||
@@ -25,6 +25,7 @@ libfs_la_SOURCES = \ |
||||
amiga/asfs.c \ |
||||
amiga/asfs.h \ |
||||
amiga/a-interface.c \ |
||||
+ btrfs/btrfs.c \ |
||||
ext2/ext2.h \ |
||||
ext2/ext2_fs.h \ |
||||
ext2/interface.c \ |
||||
diff --git a/libparted/fs/btrfs/btrfs.c b/libparted/fs/btrfs/btrfs.c |
||||
new file mode 100644 |
||||
index 0000000..e5abed6 |
||||
--- /dev/null |
||||
+++ b/libparted/fs/btrfs/btrfs.c |
||||
@@ -0,0 +1,78 @@ |
||||
+/* |
||||
+ libparted - a library for manipulating disk partitions |
||||
+ Copyright (C) 2013 Free Software Foundation, Inc. |
||||
+ |
||||
+ This program is free software; you can redistribute it and/or modify |
||||
+ it under the terms of the GNU General Public License as published by |
||||
+ the Free Software Foundation; either version 3 of the License, or |
||||
+ (at your option) any later version. |
||||
+ |
||||
+ This program is distributed in the hope that it will be useful, |
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
+ GNU General Public License for more details. |
||||
+ |
||||
+ You should have received a copy of the GNU General Public License |
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>. |
||||
+*/ |
||||
+ |
||||
+#include <config.h> |
||||
+ |
||||
+#include <parted/parted.h> |
||||
+#include <parted/endian.h> |
||||
+ |
||||
+/* Located 64k inside the partition (start of the first btrfs superblock) */ |
||||
+#define BTRFS_MAGIC 0x4D5F53665248425FULL /* ascii _BHRfS_M, no null */ |
||||
+#define BTRFS_CSUM_SIZE 32 |
||||
+#define BTRFS_FSID_SIZE 16 |
||||
+ |
||||
+ |
||||
+static PedGeometry* |
||||
+btrfs_probe (PedGeometry* geom) |
||||
+{ |
||||
+ union { |
||||
+ struct { |
||||
+ /* Just enough of the btrfs_super_block to get the magic */ |
||||
+ uint8_t csum[BTRFS_CSUM_SIZE]; |
||||
+ uint8_t fsid[BTRFS_FSID_SIZE]; |
||||
+ uint64_t bytenr; |
||||
+ uint64_t flags; |
||||
+ uint64_t magic; |
||||
+ } sb; |
||||
+ int8_t sector[8192]; |
||||
+ } buf; |
||||
+ PedSector offset = (64*1024)/geom->dev->sector_size; |
||||
+ |
||||
+ if (geom->length < offset+1) |
||||
+ return 0; |
||||
+ if (!ped_geometry_read (geom, &buf, offset, 1)) |
||||
+ return 0; |
||||
+ |
||||
+ if (PED_LE64_TO_CPU(buf.sb.magic) == BTRFS_MAGIC) { |
||||
+ return ped_geometry_new (geom->dev, geom->start, geom->length); |
||||
+ } |
||||
+ return NULL; |
||||
+} |
||||
+ |
||||
+static PedFileSystemOps btrfs_ops = { |
||||
+ probe: btrfs_probe, |
||||
+}; |
||||
+ |
||||
+static PedFileSystemType btrfs_type = { |
||||
+ next: NULL, |
||||
+ ops: &btrfs_ops, |
||||
+ name: "btrfs", |
||||
+ block_sizes: ((int[2]){512, 0}) |
||||
+}; |
||||
+ |
||||
+void |
||||
+ped_file_system_btrfs_init () |
||||
+{ |
||||
+ ped_file_system_type_register (&btrfs_type); |
||||
+} |
||||
+ |
||||
+void |
||||
+ped_file_system_btrfs_done () |
||||
+{ |
||||
+ ped_file_system_type_unregister (&btrfs_type); |
||||
+} |
||||
diff --git a/libparted/libparted.c b/libparted/libparted.c |
||||
index a6d86f0..3c3b337 100644 |
||||
--- a/libparted/libparted.c |
||||
+++ b/libparted/libparted.c |
||||
@@ -109,6 +109,7 @@ extern void ped_file_system_hfs_init (void); |
||||
extern void ped_file_system_fat_init (void); |
||||
extern void ped_file_system_ext2_init (void); |
||||
extern void ped_file_system_nilfs2_init (void); |
||||
+extern void ped_file_system_btrfs_init (void); |
||||
|
||||
static void |
||||
init_file_system_types () |
||||
@@ -124,6 +125,7 @@ init_file_system_types () |
||||
ped_file_system_fat_init (); |
||||
ped_file_system_ext2_init (); |
||||
ped_file_system_nilfs2_init (); |
||||
+ ped_file_system_btrfs_init (); |
||||
} |
||||
|
||||
extern void ped_disk_aix_done (); |
||||
@@ -186,6 +188,7 @@ extern void ped_file_system_reiserfs_done (void); |
||||
extern void ped_file_system_ufs_done (void); |
||||
extern void ped_file_system_xfs_done (void); |
||||
extern void ped_file_system_amiga_done (void); |
||||
+extern void ped_file_system_btrfs_done (void); |
||||
|
||||
static void |
||||
done_file_system_types () |
||||
@@ -201,6 +204,7 @@ done_file_system_types () |
||||
ped_file_system_ufs_done (); |
||||
ped_file_system_xfs_done (); |
||||
ped_file_system_amiga_done (); |
||||
+ ped_file_system_btrfs_done (); |
||||
} |
||||
|
||||
static void _done() __attribute__ ((destructor)); |
||||
-- |
||||
1.8.3.1 |
||||
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,187 @@
@@ -0,0 +1,187 @@
|
||||
Subject: [PATCH] libparted: add support for implicit FBA DASD partitions |
||||
|
||||
From: Nageswara R Sastry <rnsastry@linux.vnet.ibm.com> |
||||
|
||||
Fixed Block Access (FBA) DASDs are mainframe-specific disk devices |
||||
which are layed out as a sequence of 512-byte sectors. In contrast |
||||
to ECKD DASDs, these disks do not require formatting and resemble |
||||
the LBA layout of non-mainframe disks. Despite this resemblance, |
||||
the Linux kernel applies special handling during partition detection |
||||
for FBA DASDs, resulting in a single, immutable partition being |
||||
reported. |
||||
|
||||
While actual FBA DASD hardware is no longer available, the z/VM |
||||
hypervisor can simulate FBA DASD disks, backed by either ECKD or |
||||
SCSI devices. |
||||
|
||||
This patch adds support for recognizing FBA DASD partitions |
||||
to parted. |
||||
|
||||
Signed-off-by: Nageswara R Sastry <rnsastry@linux.vnet.ibm.com> |
||||
Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com> |
||||
|
||||
--- |
||||
include/parted/fdasd.h | 2 + |
||||
libparted/labels/dasd.c | 63 ++++++++++++++++++++++++++++++++++++++++------- |
||||
libparted/labels/fdasd.c | 5 +++ |
||||
3 files changed, 61 insertions(+), 9 deletions(-) |
||||
|
||||
--- a/include/parted/fdasd.h |
||||
+++ b/include/parted/fdasd.h |
||||
@@ -194,6 +194,8 @@ typedef struct fdasd_anchor { |
||||
volume_label_t *vlabel; |
||||
config_data_t confdata[USABLE_PARTITIONS]; |
||||
struct fdasd_hd_geometry geo; |
||||
+ unsigned int label_block; |
||||
+ unsigned int FBA_layout; |
||||
} fdasd_anchor_t; |
||||
|
||||
enum offset {lower, upper}; |
||||
--- a/libparted/labels/dasd.c |
||||
+++ b/libparted/labels/dasd.c |
||||
@@ -71,6 +71,7 @@ typedef struct { |
||||
|
||||
typedef struct { |
||||
unsigned int format_type; |
||||
+ unsigned int label_block; |
||||
volume_label_t vlabel; |
||||
} DasdDiskSpecific; |
||||
|
||||
@@ -151,6 +152,7 @@ dasd_alloc (const PedDevice* dev) |
||||
|
||||
/* CDL format, newer */ |
||||
disk_specific->format_type = 2; |
||||
+ disk_specific->label_block = 2; |
||||
|
||||
/* Setup volume label (for fresh disks) */ |
||||
snprintf(volser, sizeof(volser), "0X%04X", arch_specific->devno); |
||||
@@ -226,7 +228,9 @@ dasd_probe (const PedDevice *dev) |
||||
|
||||
fdasd_check_api_version(&anchor, arch_specific->fd); |
||||
|
||||
- if (fdasd_check_volume(&anchor, arch_specific->fd)) |
||||
+ /* Labels are required on CDL formatted DASDs. */ |
||||
+ if (fdasd_check_volume(&anchor, arch_specific->fd) && |
||||
+ anchor.FBA_layout == 0) |
||||
goto error_cleanup; |
||||
|
||||
fdasd_cleanup(&anchor); |
||||
@@ -273,17 +277,53 @@ dasd_read (PedDisk* disk) |
||||
fdasd_initialize_anchor(&anchor); |
||||
|
||||
fdasd_get_geometry(disk->dev, &anchor, arch_specific->fd); |
||||
+ disk_specific->label_block = anchor.label_block; |
||||
+ |
||||
+ if ((anchor.geo.cylinders * anchor.geo.heads) > BIG_DISK_SIZE) |
||||
+ anchor.big_disk++; |
||||
|
||||
/* check dasd for labels and vtoc */ |
||||
- if (fdasd_check_volume(&anchor, arch_specific->fd)) |
||||
- goto error_close_dev; |
||||
+ if (fdasd_check_volume(&anchor, arch_specific->fd)) { |
||||
+ DasdPartitionData* dasd_data; |
||||
+ |
||||
+ /* Kernel partitioning code will report 'implicit' partitions |
||||
+ * for non-CDL format DASDs even when there is no |
||||
+ * label/VTOC. */ |
||||
+ if (anchor.FBA_layout == 0) |
||||
+ goto error_close_dev; |
||||
+ |
||||
+ disk_specific->format_type = 1; |
||||
+ |
||||
+ /* Register implicit partition */ |
||||
+ ped_disk_delete_all (disk); |
||||
+ |
||||
+ start = (PedSector) arch_specific->real_sector_size / |
||||
+ (PedSector) disk->dev->sector_size * |
||||
+ (PedSector) (anchor.label_block + 1); |
||||
+ end = disk->dev->length - 1; |
||||
+ part = ped_partition_new (disk, PED_PARTITION_NORMAL, NULL, |
||||
+ start, end); |
||||
+ if (!part) |
||||
+ goto error_close_dev; |
||||
+ |
||||
+ part->num = 1; |
||||
+ part->fs_type = ped_file_system_probe (&part->geom); |
||||
+ dasd_data = part->disk_specific; |
||||
+ dasd_data->raid = 0; |
||||
+ dasd_data->lvm = 0; |
||||
+ dasd_data->type = 0; |
||||
+ |
||||
+ if (!ped_disk_add_partition (disk, part, NULL)) |
||||
+ goto error_close_dev; |
||||
+ |
||||
+ fdasd_cleanup(&anchor); |
||||
+ |
||||
+ return 1; |
||||
+ } |
||||
|
||||
/* Save volume label (read by fdasd_check_volume) for writing */ |
||||
memcpy(&disk_specific->vlabel, anchor.vlabel, sizeof(volume_label_t)); |
||||
|
||||
- if ((anchor.geo.cylinders * anchor.geo.heads) > BIG_DISK_SIZE) |
||||
- anchor.big_disk++; |
||||
- |
||||
ped_disk_delete_all (disk); |
||||
|
||||
bool is_ldl = strncmp(anchor.vlabel->volkey, |
||||
@@ -348,7 +388,7 @@ dasd_read (PedDisk* disk) |
||||
/ (long long) disk->dev->sector_size |
||||
* (long long) (cms_ptr->block_count - 1) - 1; |
||||
|
||||
- part = ped_partition_new (disk, PED_PARTITION_PROTECTED, NULL, start, end); |
||||
+ part = ped_partition_new (disk, PED_PARTITION_NORMAL, NULL, start, end); |
||||
if (!part) |
||||
goto error_close_dev; |
||||
|
||||
@@ -923,7 +963,12 @@ dasd_alloc_metadata (PedDisk* disk) |
||||
the start of the first partition */ |
||||
if (disk_specific->format_type == 1) { |
||||
part = ped_disk_get_partition(disk, 1); |
||||
- vtoc_end = part->geom.start - 1; |
||||
+ if (part) |
||||
+ vtoc_end = part->geom.start - 1; |
||||
+ else |
||||
+ vtoc_end = (PedSector) arch_specific->real_sector_size / |
||||
+ (PedSector) disk->dev->sector_size * |
||||
+ (PedSector) disk_specific->label_block; |
||||
} |
||||
else { |
||||
if (disk->dev->type == PED_DEVICE_FILE) |
||||
@@ -943,7 +988,7 @@ dasd_alloc_metadata (PedDisk* disk) |
||||
goto error; |
||||
} |
||||
|
||||
- if (disk_specific->format_type == 1) { |
||||
+ if (disk_specific->format_type == 1 && part) { |
||||
/* |
||||
For LDL or CMS there may be trailing metadata as well. |
||||
For example: the last block of a CMS reserved file, |
||||
--- a/libparted/labels/fdasd.c |
||||
+++ b/libparted/labels/fdasd.c |
||||
@@ -721,6 +721,7 @@ fdasd_check_volume (fdasd_anchor_t *anc, |
||||
unsigned long b = -1; |
||||
char str[LINE_LENGTH]; |
||||
|
||||
+ memset(v, 0, sizeof(volume_label_t)); |
||||
vtoc_read_volume_label (fd, anc->label_pos, v); |
||||
|
||||
if (strncmp(v->vollbl, vtoc_ebcdic_enc ("VOL1", str, 4), 4) == 0) { |
||||
@@ -800,6 +801,8 @@ fdasd_get_geometry (const PedDevice *dev |
||||
dasd_info.dev_type = 13200; |
||||
dasd_info.label_block = 2; |
||||
dasd_info.devno = 513; |
||||
+ dasd_info.label_block = 2; |
||||
+ dasd_info.FBA_layout = 0; |
||||
} else { |
||||
if (ioctl(f, HDIO_GETGEO, &anc->geo) != 0) |
||||
fdasd_error(anc, unable_to_ioctl, |
||||
@@ -820,6 +823,8 @@ fdasd_get_geometry (const PedDevice *dev |
||||
anc->label_pos = dasd_info.label_block * blksize; |
||||
anc->devno = dasd_info.devno; |
||||
anc->fspace_trk = anc->geo.cylinders * anc->geo.heads - FIRST_USABLE_TRK; |
||||
+ anc->label_block = dasd_info.label_block; |
||||
+ anc->FBA_layout = dasd_info.FBA_layout; |
||||
} |
||||
|
||||
/* |
@ -0,0 +1,91 @@
@@ -0,0 +1,91 @@
|
||||
From 9343e79fee796a142a4bd12674aa3fdb56526eb6 Mon Sep 17 00:00:00 2001 |
||||
From: "Brian C. Lane" <bcl@redhat.com> |
||||
Date: Tue, 20 Mar 2012 16:08:25 -0700 |
||||
Subject: [PATCH 1/2] libparted: check PMBR before GPT partition table |
||||
(#805272) |
||||
|
||||
The UEFI spec requires that a valid GPT disk label have a PMBR |
||||
partition. This moves the PMBR check to before the GPT check, |
||||
exiting gpt_probe with a 0 if the PMBR is not valid. |
||||
|
||||
The previous behavior would cause problems in the following situation: |
||||
1. format a disk as GPT |
||||
2. re-format it as MSDOS using tools that don't understand GPT |
||||
|
||||
Subsequent operations with parted would then complain about the invlid |
||||
PMBR, but would not allow the disk to be used as a msdos disk. This |
||||
change causes parted to tread the disk as a msdos disk. |
||||
|
||||
* libparted/labels/gpt.c (gpt_probe): Move _pmbr_is_valid test |
||||
--- |
||||
libparted/labels/gpt.c | 44 +++++++++++++------------------------------- |
||||
1 files changed, 13 insertions(+), 31 deletions(-) |
||||
|
||||
diff --git a/libparted/labels/gpt.c b/libparted/labels/gpt.c |
||||
index 84bdc12..e57b3a2 100644 |
||||
--- a/libparted/labels/gpt.c |
||||
+++ b/libparted/labels/gpt.c |
||||
@@ -465,6 +465,17 @@ gpt_probe (const PedDevice *dev) |
||||
if (dev->length <= 1) |
||||
return 0; |
||||
|
||||
+ void *label; |
||||
+ if (!ptt_read_sector (dev, 0, &label)) |
||||
+ return 0; |
||||
+ |
||||
+ if (!_pmbr_is_valid ((const LegacyMBR_t *) label)) |
||||
+ { |
||||
+ free (label); |
||||
+ return 0; |
||||
+ } |
||||
+ free (label); |
||||
+ |
||||
void *pth_raw = ped_malloc (pth_get_size (dev)); |
||||
if (ped_device_read (dev, pth_raw, 1, GPT_HEADER_SECTORS) |
||||
|| ped_device_read (dev, pth_raw, dev->length - 1, GPT_HEADER_SECTORS)) |
||||
@@ -472,40 +483,11 @@ gpt_probe (const PedDevice *dev) |
||||
gpt = pth_new_from_raw (dev, pth_raw); |
||||
if (gpt->Signature == PED_CPU_TO_LE64 (GPT_HEADER_SIGNATURE)) |
||||
gpt_sig_found = 1; |
||||
+ pth_free (gpt); |
||||
} |
||||
- |
||||
free (pth_raw); |
||||
|
||||
- pth_free (gpt); |
||||
- |
||||
- if (!gpt_sig_found) |
||||
- return 0; |
||||
- |
||||
- void *label; |
||||
- if (!ptt_read_sector (dev, 0, &label)) |
||||
- return 0; |
||||
- |
||||
- int ok = 1; |
||||
- if (!_pmbr_is_valid ((const LegacyMBR_t *) label)) |
||||
- { |
||||
- int ex_status = ped_exception_throw |
||||
- (PED_EXCEPTION_WARNING, |
||||
- PED_EXCEPTION_YES_NO, |
||||
- _("%s contains GPT signatures, indicating that it has " |
||||
- "a GPT table. However, it does not have a valid " |
||||
- "fake msdos partition table, as it should. Perhaps " |
||||
- "it was corrupted -- possibly by a program that " |
||||
- "doesn't understand GPT partition tables. Or " |
||||
- "perhaps you deleted the GPT table, and are now " |
||||
- "using an msdos partition table. Is this a GPT " |
||||
- "partition table?"), |
||||
- dev->path); |
||||
- if (ex_status == PED_EXCEPTION_NO) |
||||
- ok = 0; |
||||
- } |
||||
- |
||||
- free (label); |
||||
- return ok; |
||||
+ return gpt_sig_found; |
||||
} |
||||
|
||||
static PedDisk * |
||||
-- |
||||
1.7.7.6 |
||||
|
@ -0,0 +1,37 @@
@@ -0,0 +1,37 @@
|
||||
From c17f0c2e68960969789427eca20ddab1b8e4fcc6 Mon Sep 17 00:00:00 2001 |
||||
From: "Brian C. Lane" <bcl@redhat.com> |
||||
Date: Thu, 1 Nov 2012 16:22:42 -0700 |
||||
Subject: [PATCH] libparted: don't canonicalize /dev/md/ paths (#872361) |
||||
|
||||
This is the same issue we have with /dev/mapper/ paths that was fixed in |
||||
commit c1eb485b9fd8919e18f192d678bc52b0488e6ee0. When libparted |
||||
is used to setup the device the symlink should be used to reference it, |
||||
not the backing device name which could change. |
||||
|
||||
* libparted/device.c (ped_device_get): Don't canonicalize names |
||||
that start with "/dev/md/". |
||||
--- |
||||
libparted/device.c | 7 +++++-- |
||||
1 file changed, 5 insertions(+), 2 deletions(-) |
||||
|
||||
diff --git a/libparted/device.c b/libparted/device.c |
||||
index 738b320..cdcc117 100644 |
||||
--- a/libparted/device.c |
||||
+++ b/libparted/device.c |
||||
@@ -152,8 +152,11 @@ ped_device_get (const char* path) |
||||
char* normal_path = NULL; |
||||
|
||||
PED_ASSERT (path != NULL); |
||||
- /* Don't canonicalize /dev/mapper paths, see tests/symlink.c */ |
||||
- if (strncmp (path, "/dev/mapper/", 12)) |
||||
+ /* Don't canonicalize /dev/mapper or /dev/md/ paths, see |
||||
+ tests/symlink.c |
||||
+ */ |
||||
+ if (strncmp (path, "/dev/mapper/", 12) && |
||||
+ strncmp (path, "/dev/md/", 8)) |
||||
normal_path = canonicalize_file_name (path); |
||||
if (!normal_path) |
||||
/* Well, maybe it is just that the file does not exist. |
||||
-- |
||||
1.7.11.7 |
||||
|
@ -0,0 +1,151 @@
@@ -0,0 +1,151 @@
|
||||
Subject: [PATCH] libparted: mklabel to support EAV DASD |
||||
|
||||
From: Nageswara R Sastry <rnsastry@linux.vnet.ibm.com> |
||||
|
||||
Extended Address Volume (EAV) DASDs are ECKD DASDs with more than |
||||
65520 cylinders. This patch adds support for mklabel to properly |
||||
handle unformatted EAV DASDs. |
||||
|
||||
Signed-off-by: Nageswara R Sastry <rnsastry@linux.vnet.ibm.com> |
||||
--- |
||||
include/parted/fdasd.h | 1 |
||||
libparted/labels/fdasd.c | 92 +++++++++++++++++++++++++++++++++++++++++++++- |
||||
2 files changed, 90 insertions(+), 3 deletions(-) |
||||
|
||||
--- a/include/parted/fdasd.h |
||||
+++ b/include/parted/fdasd.h |
||||
@@ -288,7 +288,6 @@ void fdasd_get_geometry (const PedDevice |
||||
void fdasd_check_api_version (fdasd_anchor_t *anc, int fd); |
||||
int fdasd_check_volume (fdasd_anchor_t *anc, int fd); |
||||
int fdasd_write_labels (fdasd_anchor_t *anc, int fd); |
||||
-int fdasd_invalid_vtoc_pointer(fdasd_anchor_t *anc); |
||||
void fdasd_recreate_vtoc(fdasd_anchor_t *anc); |
||||
partition_info_t * fdasd_add_partition (fdasd_anchor_t *anc, |
||||
unsigned int start, unsigned int stop); |
||||
--- a/libparted/labels/fdasd.c |
||||
+++ b/libparted/labels/fdasd.c |
||||
@@ -581,6 +581,22 @@ fdasd_recreate_vtoc (fdasd_anchor_t *anc |
||||
anc->vtoc_changed++; |
||||
} |
||||
|
||||
+ /* |
||||
+ * initialize the VOL1 volume label |
||||
+ */ |
||||
+static void |
||||
+fdasd_init_volume_label(fdasd_anchor_t *anc, int fd) |
||||
+{ |
||||
+ volume_label_t *vlabel = anc->vlabel; |
||||
+ |
||||
+ vtoc_volume_label_init(vlabel); |
||||
+ vtoc_volume_label_set_key(vlabel, "VOL1"); |
||||
+ vtoc_volume_label_set_label(vlabel, "VOL1"); |
||||
+ |
||||
+ vtoc_set_cchhb(&vlabel->vtoc, VTOC_START_CC, VTOC_START_HH, 0x01); |
||||
+} |
||||
+ |
||||
+ |
||||
/* |
||||
* sets some important partition data |
||||
* (like used, start_trk, end_trk, len_trk) |
||||
@@ -769,6 +785,52 @@ fdasd_process_valid_vtoc (fdasd_anchor_t |
||||
fdasd_update_partition_info (anc); |
||||
} |
||||
|
||||
+static void |
||||
+fdasd_invalid_vtoc_pointer(fdasd_anchor_t *anc) |
||||
+{ |
||||
+ PDEBUG |
||||
+ anc->formatted_cylinders = anc->hw_cylinders; |
||||
+ anc->fspace_trk = anc->formatted_cylinders * anc->geo.heads |
||||
+ - FIRST_USABLE_TRK; |
||||
+ vtoc_init_format4_label(anc->f4, USABLE_PARTITIONS, |
||||
+ anc->geo.cylinders, anc->formatted_cylinders, |
||||
+ anc->geo.heads, anc->geo.sectors, |
||||
+ anc->blksize, anc->dev_type); |
||||
+ |
||||
+ vtoc_init_format5_label(anc->f5); |
||||
+ vtoc_init_format7_label(anc->f7); |
||||
+ |
||||
+ vtoc_set_freespace(anc->f4, anc->f5, anc->f7, '+', anc->verbose, |
||||
+ FIRST_USABLE_TRK, |
||||
+ anc->formatted_cylinders * anc->geo.heads - 1, |
||||
+ anc->formatted_cylinders, anc->geo.heads); |
||||
+ |
||||
+ vtoc_set_cchhb(&anc->vlabel->vtoc, VTOC_START_CC, VTOC_START_HH, 0x01); |
||||
+} |
||||
+ |
||||
+/* |
||||
+ * we have a invalid FMT4 DSCB and therefore we will re-create the VTOC |
||||
+ */ |
||||
+static void |
||||
+fdasd_process_invalid_vtoc(fdasd_anchor_t *anc) |
||||
+{ |
||||
+ anc->formatted_cylinders = anc->hw_cylinders; |
||||
+ anc->fspace_trk = anc->formatted_cylinders * anc->geo.heads |
||||
+ - FIRST_USABLE_TRK; |
||||
+ vtoc_init_format4_label(anc->f4, USABLE_PARTITIONS, |
||||
+ anc->geo.cylinders, anc->formatted_cylinders, |
||||
+ anc->geo.heads, anc->geo.sectors, |
||||
+ anc->blksize, anc->dev_type); |
||||
+ |
||||
+ vtoc_init_format5_label(anc->f5); |
||||
+ vtoc_init_format7_label(anc->f7); |
||||
+ vtoc_set_freespace(anc->f4, anc->f5, anc->f7, '+', anc->verbose, |
||||
+ FIRST_USABLE_TRK, |
||||
+ anc->formatted_cylinders * anc->geo.heads - 1, |
||||
+ anc->formatted_cylinders, anc->geo.heads); |
||||
+} |
||||
+ |
||||
+ |
||||
static int |
||||
fdasd_valid_vtoc_pointer(fdasd_anchor_t *anc, unsigned long b, int fd) |
||||
{ |
||||
@@ -781,6 +843,8 @@ fdasd_valid_vtoc_pointer(fdasd_anchor_t |
||||
if (anc->f4->DS4IDFMT == 0xf4) { |
||||
fdasd_process_valid_vtoc (anc, b, fd); |
||||
return 0; |
||||
+ } else { |
||||
+ fdasd_process_invalid_vtoc(anc); |
||||
} |
||||
if (strncmp(anc->vlabel->volkey, vtoc_ebcdic_enc("LNX1",str,4),4) == 0 || |
||||
strncmp(anc->vlabel->volkey, vtoc_ebcdic_enc("CMS1",str,4),4) == 0) |
||||
@@ -817,13 +881,37 @@ fdasd_check_volume (fdasd_anchor_t *anc, |
||||
else |
||||
return 0; |
||||
} else { |
||||
- return 1; |
||||
+ fdasd_invalid_vtoc_pointer(anc); |
||||
} |
||||
} else if (strncmp (v->volkey, vtoc_ebcdic_enc ("LNX1", str, 4), 4) == 0 || |
||||
strncmp (v->volkey, vtoc_ebcdic_enc ("CMS1", str, 4), 4) == 0) { |
||||
return 0; |
||||
+ } else if (anc->FBA_layout == 1) { |
||||
+ /* Some times LDL formatted disks does not |
||||
+ contain any volume label */ |
||||
+ return 1; |
||||
+ } else { |
||||
+ /* didn't find VOL1 volume label */ |
||||
+ anc->formatted_cylinders = anc->hw_cylinders; |
||||
+ anc->fspace_trk = anc->formatted_cylinders * anc->geo.heads |
||||
+ - FIRST_USABLE_TRK; |
||||
+ |
||||
+ fdasd_init_volume_label(anc, fd); |
||||
+ |
||||
+ vtoc_init_format4_label(anc->f4, USABLE_PARTITIONS, |
||||
+ anc->geo.cylinders, anc->formatted_cylinders, |
||||
+ anc->geo.heads, anc->geo.sectors, |
||||
+ anc->blksize, anc->dev_type); |
||||
+ |
||||
+ vtoc_init_format5_label(anc->f5); |
||||
+ vtoc_init_format7_label(anc->f7); |
||||
+ |
||||
+ vtoc_set_freespace(anc->f4, anc->f5, anc->f7, '+', |
||||
+ anc->verbose, FIRST_USABLE_TRK, |
||||
+ anc->formatted_cylinders * anc->geo.heads - 1, |
||||
+ anc->formatted_cylinders, anc->geo.heads); |
||||
+ return 0; |
||||
} |
||||
- |
||||
return 1; |
||||
} |
||||
|
@ -0,0 +1,48 @@
@@ -0,0 +1,48 @@
|
||||
Subject: [PATCH] libparted: mklabel to support EDEV DASD |
||||
|
||||
From: Nageswara R Sastry <rnsastry@linux.vnet.ibm.com> |
||||
|
||||
Fixed Block Access (FBA) DASDs are mainframe-specific disk devices |
||||
which are layed out as a sequence of 512-byte sectors. This patch adds |
||||
support for mklabel to properly handle FBA devices. |
||||
|
||||
Signed-off-by: Nageswara R Sastry <rnsastry@linux.vnet.ibm.com> |
||||
--- |
||||
libparted/labels/fdasd.c | 24 +++++++++++++----------- |
||||
1 file changed, 13 insertions(+), 11 deletions(-) |
||||
|
||||
--- a/libparted/labels/fdasd.c |
||||
+++ b/libparted/labels/fdasd.c |
||||
@@ -869,19 +869,21 @@ fdasd_check_volume (fdasd_anchor_t *anc, |
||||
vtoc_read_volume_label (fd, anc->label_pos, v); |
||||
|
||||
if (strncmp(v->vollbl, vtoc_ebcdic_enc ("VOL1", str, 4), 4) == 0) { |
||||
- /* found VOL1 volume label */ |
||||
- b = (cchhb2blk (&v->vtoc, &anc->geo) - 1) * anc->blksize; |
||||
+ if (anc->FBA_layout != 1 ) { |
||||
+ /* found VOL1 volume label */ |
||||
+ b = (cchhb2blk (&v->vtoc, &anc->geo) - 1) * anc->blksize; |
||||
|
||||
- if (b > 0) { |
||||
- int rc; |
||||
- rc = fdasd_valid_vtoc_pointer (anc, b, fd); |
||||
+ if (b > 0) { |
||||
+ int rc; |
||||
+ rc = fdasd_valid_vtoc_pointer (anc, b, fd); |
||||
|
||||
- if (rc < 0) |
||||
- return 1; |
||||
- else |
||||
- return 0; |
||||
- } else { |
||||
- fdasd_invalid_vtoc_pointer(anc); |
||||
+ if (rc < 0) |
||||
+ return 1; |
||||
+ else |
||||
+ return 0; |
||||
+ } else { |
||||
+ fdasd_invalid_vtoc_pointer(anc); |
||||
+ } |
||||
} |
||||
} else if (strncmp (v->volkey, vtoc_ebcdic_enc ("LNX1", str, 4), 4) == 0 || |
||||
strncmp (v->volkey, vtoc_ebcdic_enc ("CMS1", str, 4), 4) == 0) { |
@ -0,0 +1,71 @@
@@ -0,0 +1,71 @@
|
||||
From e2b9f9051c8d9905b15af0f7fa79c85502370b25 Mon Sep 17 00:00:00 2001 |
||||
From: Brian C. Lane <bcl@redhat.com> |
||||
Date: Fri, 3 Aug 2012 17:03:50 -0700 |
||||
Subject: [PATCH] libparted: preserve the uuid on dm partitions (#832145) |
||||
|
||||
* libparted/arch/linux.c (_dm_add_partition): Set the uuid if there was |
||||
one. |
||||
--- |
||||
libparted/arch/linux.c | 11 +++++++++++ |
||||
1 file changed, 11 insertions(+) |
||||
|
||||
diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c |
||||
index 37ddb5f..2c410a0 100644 |
||||
--- a/libparted/arch/linux.c |
||||
+++ b/libparted/arch/linux.c |
||||
@@ -2803,6 +2803,8 @@ _dm_add_partition (PedDisk* disk, PedPartition* part) |
||||
{ |
||||
char* vol_name = NULL; |
||||
const char* dev_name = NULL; |
||||
+ char* vol_uuid = NULL; |
||||
+ const char* dev_uuid = NULL; |
||||
char* params = NULL; |
||||
LinuxSpecific* arch_specific = LINUX_SPECIFIC (disk->dev); |
||||
uint32_t cookie = 0; |
||||
@@ -2820,6 +2822,7 @@ _dm_add_partition (PedDisk* disk, PedPartition* part) |
||||
goto err; |
||||
|
||||
dev_name = dm_task_get_name (task); |
||||
+ dev_uuid = dm_task_get_uuid (task); |
||||
|
||||
if (isdigit (dev_name[strlen (dev_name) - 1])) { |
||||
if ( ! (vol_name = zasprintf ("%sp%d", dev_name, part->num))) |
||||
@@ -2827,6 +2830,10 @@ _dm_add_partition (PedDisk* disk, PedPartition* part) |
||||
} else if ( ! (vol_name = zasprintf ("%s%d", dev_name, part->num))) |
||||
goto err; |
||||
|
||||
+ if ( dev_uuid && (strlen(dev_uuid) > 0) \ |
||||
+ && ! (vol_uuid = zasprintf ("part%d-%s", part->num, dev_uuid))) |
||||
+ goto err; |
||||
+ |
||||
/* Caution: dm_task_destroy frees dev_name. */ |
||||
dm_task_destroy (task); |
||||
task = NULL; |
||||
@@ -2840,6 +2847,8 @@ _dm_add_partition (PedDisk* disk, PedPartition* part) |
||||
goto err; |
||||
|
||||
dm_task_set_name (task, vol_name); |
||||
+ if (vol_uuid) |
||||
+ dm_task_set_uuid (task, vol_uuid); |
||||
dm_task_add_target (task, 0, part->geom.length, |
||||
"linear", params); |
||||
if (!dm_task_set_cookie(task, &cookie, 0)) |
||||
@@ -2850,6 +2859,7 @@ _dm_add_partition (PedDisk* disk, PedPartition* part) |
||||
dm_task_update_nodes(); |
||||
dm_task_destroy(task); |
||||
free(params); |
||||
+ free(vol_uuid); |
||||
free(vol_name); |
||||
return 1; |
||||
} else { |
||||
@@ -2861,6 +2871,7 @@ err: |
||||
if (task) |
||||
dm_task_destroy (task); |
||||
free (params); |
||||
+ free (vol_uuid); |
||||
free (vol_name); |
||||
return 0; |
||||
} |
||||
-- |
||||
1.7.11.4 |
||||
|
@ -0,0 +1,36 @@
@@ -0,0 +1,36 @@
|
||||
From 4ee2a7d03f6720c5f97eef93c4df4b9c52e79b5e Mon Sep 17 00:00:00 2001 |
||||
From: Brian C. Lane <bcl@redhat.com> |
||||
Date: Tue, 4 Sep 2012 15:56:47 -0700 |
||||
Subject: [PATCH] libparted: reallocate buf after _disk_analyse_block_size |
||||
call |
||||
|
||||
The call to _disk_analyse_block_size may change the |
||||
disk->dev->sector_size, if this happens buf may be too small for |
||||
subsequent reads. |
||||
|
||||
libparted/labels/mac.c (mac_read): reallocate buf |
||||
--- |
||||
libparted/labels/mac.c | 7 +++++++ |
||||
1 file changed, 7 insertions(+) |
||||
|
||||
diff --git a/libparted/labels/mac.c b/libparted/labels/mac.c |
||||
index 1f59a1a..5fa8283 100644 |
||||
--- a/libparted/labels/mac.c |
||||
+++ b/libparted/labels/mac.c |
||||
@@ -759,6 +759,13 @@ mac_read (PedDisk* disk) |
||||
mac_disk_data->block_size = raw_disk->block_size; |
||||
} |
||||
|
||||
+ /* re-allocate buf in case _disk_analyse_block_size changed |
||||
+ * the sector_size */ |
||||
+ free (buf); |
||||
+ buf = ped_malloc (disk->dev->sector_size); |
||||
+ if (!buf) |
||||
+ goto error; |
||||
+ |
||||
for (num=1; num==1 || num <= last_part_entry_num; num++) { |
||||
void *raw_part = buf; |
||||
if (!ped_device_read (disk->dev, raw_part, |
||||
-- |
||||
1.7.11.4 |
||||
|
@ -0,0 +1,41 @@
@@ -0,0 +1,41 @@
|
||||
From 26fbffe8389e732be29225bd649adfdd5588b131 Mon Sep 17 00:00:00 2001 |
||||
From: "Brian C. Lane" <bcl@redhat.com> |
||||
Date: Wed, 21 Mar 2012 15:34:20 -0700 |
||||
Subject: [PATCH] libparted: use largest_partnum in dm_reread_part_table |
||||
(#803108) |
||||
|
||||
DM devices can have more than 16 partitions, notify the kernel about |
||||
all of them. |
||||
|
||||
Resolves: rhbz#803108 |
||||
|
||||
* libparted/arch/linux.c (dm_reread_part_table): Use largest_partnum |
||||
|
||||
fixup |
||||
--- |
||||
libparted/arch/linux.c | 3 +-- |
||||
1 files changed, 1 insertions(+), 2 deletions(-) |
||||
|
||||
diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c |
||||
index 7dd664e..ed14f50 100644 |
||||
--- a/libparted/arch/linux.c |
||||
+++ b/libparted/arch/linux.c |
||||
@@ -2516,14 +2516,13 @@ _dm_reread_part_table (PedDisk* disk) |
||||
return 1; |
||||
|
||||
int rc = 1; |
||||
- int last = PED_MIN (largest_partnum, 16); |
||||
int i; |
||||
|
||||
sync(); |
||||
if (!_dm_remove_parts(disk->dev)) |
||||
rc = 0; |
||||
|
||||
- for (i = 1; i <= last; i++) { |
||||
+ for (i = 1; i <= largest_partnum; i++) { |
||||
PedPartition* part; |
||||
|
||||
part = ped_disk_get_partition (disk, i); |
||||
-- |
||||
1.7.7.6 |
||||
|
@ -0,0 +1,94 @@
@@ -0,0 +1,94 @@
|
||||
From 166491bd870df6877e04831c9da593e2f8e77ca8 Mon Sep 17 00:00:00 2001 |
||||
From: "Brian C. Lane" <bcl@redhat.com> |
||||
Date: Thu, 19 Apr 2012 17:11:09 -0700 |
||||
Subject: [PATCH] tests: test creating 20 device-mapper partitions (#803108) |
||||
|
||||
* tests/t6002-dm-many-partitions.sh: Make sure > 17 partitions appear in |
||||
device mapper. |
||||
--- |
||||
tests/Makefile.am | 1 + |
||||
tests/t6002-dm-many-partitions.sh | 60 +++++++++++++++++++++++++++++++++++++ |
||||
2 files changed, 61 insertions(+), 0 deletions(-) |
||||
create mode 100755 tests/t6002-dm-many-partitions.sh |
||||
|
||||
diff --git a/tests/Makefile.am b/tests/Makefile.am |
||||
index 1b37fd9..57771be 100644 |
||||
--- a/tests/Makefile.am |
||||
+++ b/tests/Makefile.am |
||||
@@ -55,6 +55,7 @@ TESTS = \ |
||||
t5000-tags.sh \ |
||||
t6000-dm.sh \ |
||||
t6001-psep.sh \ |
||||
+ t6002-dm-many-partitions.sh \ |
||||
t6100-mdraid-partitions.sh \ |
||||
t7000-scripting.sh \ |
||||
t8000-loop.sh \ |
||||
diff --git a/tests/t6002-dm-many-partitions.sh b/tests/t6002-dm-many-partitions.sh |
||||
new file mode 100755 |
||||
index 0000000..4d08e72 |
||||
--- /dev/null |
||||
+++ b/tests/t6002-dm-many-partitions.sh |
||||
@@ -0,0 +1,60 @@ |
||||
+#!/bin/sh |
||||
+# device-mapper: create many partitions |
||||
+# This would not create partitions > 16 when using device-mapper |
||||
+ |
||||
+# Copyright (C) 2012 Free Software Foundation, Inc. |
||||
+ |
||||
+# This program is free software; you can redistribute it and/or modify |
||||
+# it under the terms of the GNU General Public License as published by |
||||
+# the Free Software Foundation; either version 3 of the License, or |
||||
+# (at your option) any later version. |
||||
+ |
||||
+# This program is distributed in the hope that it will be useful, |
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
+# GNU General Public License for more details. |
||||
+ |
||||
+# You should have received a copy of the GNU General Public License |
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>. |
||||
+ |
||||
+. "${srcdir=.}/init.sh"; path_prepend_ ../parted |
||||
+ |
||||
+require_root_ |
||||
+(dmsetup --help) > /dev/null 2>&1 || skip_test_ "No dmsetup installed" |
||||
+ |
||||
+ss=$sector_size_ |
||||
+ns=300 |
||||
+n_partitions=20 |
||||
+start_sector=34 |
||||
+loop_file=loop-file-$$ |
||||
+dm_name=dm-test-$$ |
||||
+ |
||||
+cleanup_() { |
||||
+ dmsetup remove $dm_name |
||||
+ test -n "$dev" && losetup -d "$dev" |
||||
+ rm -f $loop_file; |
||||
+} |
||||
+ |
||||
+# create a file large enough to hold a GPT partition table |
||||
+dd if=/dev/null of=$loop_file bs=$ss seek=$ns || framework_failure |
||||
+dev=$(losetup --show -f $loop_file) || framework_failure |
||||
+dmsetup create $dm_name --table "0 $ns linear $dev 0" || framework_failure |
||||
+ |
||||
+cmd= |
||||
+for ((i=1; i<=$n_partitions; i+=1)); do |
||||
+ s=$((start_sector + i - 1)) |
||||
+ cmd="$cmd mkpart p$i ${s}s ${s}s" |
||||
+done |
||||
+parted -m -a min -s /dev/mapper/$dm_name mklabel gpt $cmd > /dev/null 2>&1 || fail=1 |
||||
+ |
||||
+# Make sure all the partitions appeared under /dev/mapper/ |
||||
+for ((i=1; i<=$n_partitions; i+=1)); do |
||||
+ if [ ! -e "/dev/mapper/${dm_name}p$i" ]; then |
||||
+ fail=1 |
||||
+ break |
||||
+ fi |
||||
+ # remove the partitions as we go, otherwise cleanup won't work. |
||||
+ dmsetup remove /dev/mapper/${dm_name}p$i |
||||
+done |
||||
+ |
||||
+Exit $fail |
||||
-- |
||||
1.7.7.6 |
||||
|
@ -0,0 +1,26 @@
@@ -0,0 +1,26 @@
|
||||
From 17027da1eda39d20b2d6dca0a59ac4afc5409318 Mon Sep 17 00:00:00 2001 |
||||
From: "Brian C. Lane" <bcl@redhat.com> |
||||
Date: Wed, 28 Aug 2013 08:47:26 -0700 |
||||
Subject: [PATCH 69/69] tests: Add btrfs and xfs to the fs probe test |
||||
|
||||
* tests/tests/t1700-probe-fs.sh: Add btrfs and xfs |
||||
--- |
||||
tests/t1700-probe-fs.sh | 2 +- |
||||
1 file changed, 1 insertion(+), 1 deletion(-) |
||||
|
||||
diff --git a/tests/t1700-probe-fs.sh b/tests/t1700-probe-fs.sh |
||||
index 7ce53d0..0418e73 100755 |
||||
--- a/tests/t1700-probe-fs.sh |
||||
+++ b/tests/t1700-probe-fs.sh |
||||
@@ -22,7 +22,7 @@ require_512_byte_sector_size_ |
||||
dev=loop-file |
||||
ss=$sector_size_ |
||||
|
||||
-for type in ext2 ext3 ext4 nilfs2; do |
||||
+for type in ext2 ext3 ext4 btrfs xfs nilfs2; do |
||||
|
||||
( mkfs.$type -V ) >/dev/null 2>&1 \ |
||||
|| { warn_ "$ME: no $type support"; continue; } |
||||
-- |
||||
1.8.3.1 |
||||
|
@ -0,0 +1,92 @@
@@ -0,0 +1,92 @@
|
||||
From cc96f793bb4fb088123a40fb9d802e7db1fdbffb Mon Sep 17 00:00:00 2001 |
||||
From: Brian C. Lane <bcl@redhat.com> |
||||
Date: Tue, 7 Aug 2012 10:14:03 -0700 |
||||
Subject: [PATCH] tests: Make sure dm UUIDs are not erased |
||||
|
||||
* tests/t6003-dm-uuid.sh: Make sure dm UUIDs are not erased |
||||
--- |
||||
tests/Makefile.am | 1 + |
||||
tests/t6003-dm-uuid.sh | 59 ++++++++++++++++++++++++++++++++++++++++++++++++ |
||||
2 files changed, 60 insertions(+), 0 deletions(-) |
||||
create mode 100755 tests/t6003-dm-uuid.sh |
||||
|
||||
diff --git a/tests/Makefile.am b/tests/Makefile.am |
||||
index 57771be..98310f2 100644 |
||||
--- a/tests/Makefile.am |
||||
+++ b/tests/Makefile.am |
||||
@@ -56,6 +56,7 @@ TESTS = \ |
||||
t6000-dm.sh \ |
||||
t6001-psep.sh \ |
||||
t6002-dm-many-partitions.sh \ |
||||
+ t6003-dm-uuid.sh \ |
||||
t6100-mdraid-partitions.sh \ |
||||
t7000-scripting.sh \ |
||||
t8000-loop.sh \ |
||||
diff --git a/tests/t6003-dm-uuid.sh b/tests/t6003-dm-uuid.sh |
||||
new file mode 100755 |
||||
index 0000000..1751cb4 |
||||
--- /dev/null |
||||
+++ b/tests/t6003-dm-uuid.sh |
||||
@@ -0,0 +1,59 @@ |
||||
+#!/bin/sh |
||||
+# device-mapper: preserve uuid |
||||
+# The dm's partitions uuid would be removed when creating new partitions |
||||
+ |
||||
+# Copyright (C) 2012 Free Software Foundation, Inc. |
||||
+ |
||||
+# This program is free software; you can redistribute it and/or modify |
||||
+# it under the terms of the GNU General Public License as published by |
||||
+# the Free Software Foundation; either version 3 of the License, or |
||||
+# (at your option) any later version. |
||||
+ |
||||
+# This program is distributed in the hope that it will be useful, |
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
+# GNU General Public License for more details. |
||||
+ |
||||
+# You should have received a copy of the GNU General Public License |
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>. |
||||
+ |
||||
+. "${srcdir=.}/init.sh"; path_prepend_ ../parted |
||||
+ |
||||
+require_root_ |
||||
+(dmsetup --help) > /dev/null 2>&1 || skip_test_ "No dmsetup installed" |
||||
+ |
||||
+ss=$sector_size_ |
||||
+ns=300 |
||||
+n_partitions=3 |
||||
+start_sector=34 |
||||
+loop_file=loop-file-$$ |
||||
+dm_name=dm-test-$$ |
||||
+ |
||||
+cleanup_() { |
||||
+ dmsetup remove $dm_name |
||||
+ test -n "$dev" && losetup -d "$dev" |
||||
+ rm -f $loop_file; |
||||
+} |
||||
+ |
||||
+# create a file large enough to hold a GPT partition table |
||||
+dd if=/dev/null of=$loop_file bs=$ss seek=$ns || framework_failure |
||||
+dev=$(losetup --show -f $loop_file) || framework_failure |
||||
+dmsetup create $dm_name --table "0 $ns linear $dev 0" || framework_failure |
||||
+dmsetup rename $dm_name --setuuid f139317b-f98a-45d7-ab3b-9b4e0a336872 || framework_failure |
||||
+ |
||||
+cmd= |
||||
+for ((i=1; i<=$n_partitions; i+=1)); do |
||||
+ s=$((start_sector + i - 1)) |
||||
+ cmd="$cmd mkpart p$i ${s}s ${s}s" |
||||
+done |
||||
+parted -m -a min -s /dev/mapper/$dm_name mklabel gpt $cmd > /dev/null 2>&1 || fail=1 |
||||
+ |
||||
+# Make sure all the partitions have UUIDs |
||||
+for ((i=1; i<=$n_partitions; i+=1)); do |
||||
+ dmsetup info /dev/mapper/${dm_name}p$i | grep UUID || fail=1 |
||||
+ |
||||
+ # remove the partitions as we go, otherwise cleanup won't work. |
||||
+ dmsetup remove /dev/mapper/${dm_name}p$i |
||||
+done |
||||
+ |
||||
+Exit $fail |
||||
-- |
||||
1.7.7.6 |
||||
|
@ -0,0 +1,34 @@
@@ -0,0 +1,34 @@
|
||||
From 98f1556d8a134f54d62ebdac27e9d16aa7884983 Mon Sep 17 00:00:00 2001 |
||||
From: "Brian C. Lane" <bcl@redhat.com> |
||||
Date: Tue, 20 Mar 2012 17:17:10 -0700 |
||||
Subject: [PATCH 2/2] tests: add t0301-overwrite-gpt-pmbr.sh |
||||
|
||||
Make sure parted checks the PMBR before the GPT partition table. |
||||
|
||||
* NEWS: Update with new GPT behavior |
||||
* tests/Makefile.am: Add new test |
||||
* tests/overwrite-gpt-pmbr.sh: new test |
||||
--- |
||||
NEWS | 7 +++++++ |
||||
1 files changed, 7 insertions(+), 0 deletions(-) |
||||
|
||||
diff --git a/NEWS b/NEWS |
||||
index fe0fcdd..b0a0657 100644 |
||||
--- a/NEWS |
||||
+++ b/NEWS |
||||
@@ -1,5 +1,12 @@ |
||||
GNU parted NEWS -*- outline -*- |
||||
|
||||
+* Noteworthy changes in release 3.1-2 (2012-03-21) [Fedora] |
||||
+ |
||||
+** Bug Fixes |
||||
+ |
||||
+ libparted: Treat disks without a PMBR as msdos labeled disks |
||||
+ even if they have GPT partition tables. |
||||
+ |
||||
* Noteworthy changes in release 3.1 (2012-03-02) [stable] |
||||
|
||||
** New features |
||||
-- |
||||
1.7.7.6 |
||||
|
@ -0,0 +1,137 @@
@@ -0,0 +1,137 @@
|
||||
From a1aa9eb26f357bb1a5111eb332594dfb7b39ace0 Mon Sep 17 00:00:00 2001 |
||||
From: "Brian C. Lane" <bcl@redhat.com> |
||||
Date: Mon, 15 Oct 2012 17:27:18 -0700 |
||||
Subject: [PATCH 1/2] tests: cleanup losetup usage |
||||
|
||||
The unsafe_losetup_ function was failing because losetup didn't |
||||
recognize that the 'private' /dev/loopX devices were the same as |
||||
/dev/loopX, it would fail even if one was in use. Switch to using |
||||
losetup --show which is a cleaner solution. |
||||
Also use sparse file for loop_setup to save space. |
||||
--- |
||||
tests/lvm-utils.sh | 24 ++---------------------- |
||||
tests/t-lvm.sh | 24 ++---------------------- |
||||
tests/t6001-psep.sh | 8 ++------ |
||||
tests/t6003-dm-uuid.sh | 3 +-- |
||||
4 files changed, 7 insertions(+), 52 deletions(-) |
||||
|
||||
diff --git a/tests/lvm-utils.sh b/tests/lvm-utils.sh |
||||
index 456d265..a204b08 100644 |
||||
--- a/tests/lvm-utils.sh |
||||
+++ b/tests/lvm-utils.sh |
||||
@@ -16,34 +16,14 @@ export LVM_SUPPRESS_FD_WARNINGS=1 |
||||
ME=$(basename "$0") |
||||
warn() { echo >&2 "$ME: $@"; } |
||||
|
||||
-unsafe_losetup_() |
||||
-{ |
||||
- f=$1 |
||||
- |
||||
- test -n "$G_dev_" \ |
||||
- || fail_ "Internal error: unsafe_losetup_ called before init_root_dir_" |
||||
- |
||||
- # Iterate through $G_dev_/loop{,/}{0,1,2,3,4,5,6,7,8,9} |
||||
- for slash in '' /; do |
||||
- for i in 0 1 2 3 4 5 6 7 8 9; do |
||||
- dev=$G_dev_/loop$slash$i |
||||
- losetup $dev > /dev/null 2>&1 && continue; |
||||
- losetup "$dev" "$f" > /dev/null && { echo "$dev"; return 0; } |
||||
- break |
||||
- done |
||||
- done |
||||
- |
||||
- return 1 |
||||
-} |
||||
- |
||||
loop_setup_() |
||||
{ |
||||
file=$1 |
||||
- dd if=/dev/zero of="$file" bs=1M count=1 seek=1000 > /dev/null 2>&1 \ |
||||
+ dd if=/dev/null of="$file" bs=1M count=1 seek=1000 > /dev/null 2>&1 \ |
||||
|| { warn "loop_setup_ failed: Unable to create tmp file $file"; return 1; } |
||||
|
||||
# NOTE: this requires a new enough version of losetup |
||||
- dev=$(unsafe_losetup_ "$file") \ |
||||
+ dev=$(losetup --show -f "$file") 2>/dev/null \ |
||||
|| { warn "loop_setup_ failed: Unable to create loopback device"; return 1; } |
||||
|
||||
echo "$dev" |
||||
diff --git a/tests/t-lvm.sh b/tests/t-lvm.sh |
||||
index b08f934..3c7657b 100644 |
||||
--- a/tests/t-lvm.sh |
||||
+++ b/tests/t-lvm.sh |
||||
@@ -16,34 +16,14 @@ export LVM_SUPPRESS_FD_WARNINGS=1 |
||||
ME=$(basename "$0") |
||||
warn() { echo >&2 "$ME: $@"; } |
||||
|
||||
-unsafe_losetup_() |
||||
-{ |
||||
- f=$1 |
||||
- |
||||
- test -n "$G_dev_" \ |
||||
- || error "Internal error: unsafe_losetup_ called before init_root_dir_" |
||||
- |
||||
- # Iterate through $G_dev_/loop{,/}{0,1,2,3,4,5,6,7,8,9} |
||||
- for slash in '' /; do |
||||
- for i in 0 1 2 3 4 5 6 7 8 9; do |
||||
- dev=$G_dev_/loop$slash$i |
||||
- losetup $dev > /dev/null 2>&1 && continue; |
||||
- losetup "$dev" "$f" > /dev/null && { echo "$dev"; return 0; } |
||||
- break |
||||
- done |
||||
- done |
||||
- |
||||
- return 1 |
||||
-} |
||||
- |
||||
loop_setup_() |
||||
{ |
||||
file=$1 |
||||
- dd if=/dev/zero of="$file" bs=1M count=1 seek=1000 > /dev/null 2>&1 \ |
||||
+ dd if=/dev/null of="$file" bs=1M count=1 seek=1000 > /dev/null 2>&1 \ |
||||
|| { warn "loop_setup_ failed: Unable to create tmp file $file"; return 1; } |
||||
|
||||
# NOTE: this requires a new enough version of losetup |
||||
- dev=$(unsafe_losetup_ "$file" 2>/dev/null) \ |
||||
+ dev=$(losetup --show -f "$file") 2>/dev/null \ |
||||
|| { warn "loop_setup_ failed: Unable to create loopback device"; return 1; } |
||||
|
||||
echo "$dev" |
||||
diff --git a/tests/t6001-psep.sh b/tests/t6001-psep.sh |
||||
index 490c6d2..1859ac9 100644 |
||||
--- a/tests/t6001-psep.sh |
||||
+++ b/tests/t6001-psep.sh |
||||
@@ -44,14 +44,10 @@ cleanup_fn_() { |
||||
# create a file of size N bytes |
||||
N=10M |
||||
|
||||
-# create the test file |
||||
-f1=$(pwd)/1; dd if=/dev/null of=$f1 bs=1 seek=$N 2> /dev/null || fail=1 |
||||
-f2=$(pwd)/2; dd if=/dev/null of=$f2 bs=1 seek=$N 2> /dev/null || fail=1 |
||||
- |
||||
-d1=$(loop_setup_ "$f1") \ |
||||
+f1=$(pwd)/1; d1=$(loop_setup_ "$f1") \ |
||||
|| skip_ "is this partition mounted with 'nodev'?" |
||||
|
||||
-d2=$(loop_setup_ "$f2") \ |
||||
+f2=$(pwd)/2 ;d2=$(loop_setup_ "$f2") \ |
||||
|| skip_ "is this partition mounted with 'nodev'?" |
||||
|
||||
dmsetup_cmd="0 `blockdev --getsz $d1` linear $d1 0" |
||||
diff --git a/tests/t6003-dm-uuid.sh b/tests/t6003-dm-uuid.sh |
||||
index 1751cb4..f58cb06 100755 |
||||
--- a/tests/t6003-dm-uuid.sh |
||||
+++ b/tests/t6003-dm-uuid.sh |
||||
@@ -36,8 +36,7 @@ cleanup_() { |
||||
} |
||||
|
||||
# create a file large enough to hold a GPT partition table |
||||
-dd if=/dev/null of=$loop_file bs=$ss seek=$ns || framework_failure |
||||
-dev=$(losetup --show -f $loop_file) || framework_failure |
||||
+dev=$(loop_setup_ $loop_file) || framework_failure |
||||
dmsetup create $dm_name --table "0 $ns linear $dev 0" || framework_failure |
||||
dmsetup rename $dm_name --setuuid f139317b-f98a-45d7-ab3b-9b4e0a336872 || framework_failure |
||||
|
||||
-- |
||||
1.7.11.4 |
||||
|
@ -0,0 +1,98 @@
@@ -0,0 +1,98 @@
|
||||
From 7d4947fd094f1dda491473a57a9275971405684e Mon Sep 17 00:00:00 2001 |
||||
From: Fedora Ninjas <parted-owner@fedoraproject.org> |
||||
Date: Wed, 17 Apr 2013 14:59:36 -0700 |
||||
Subject: [PATCH] tests: rewrite t6001 to use /dev/mapper |
||||
|
||||
This test begain failing because using a private copy of /dev/mapper |
||||
confuses the system. This fixes that and generally cleans up the test. |
||||
|
||||
tests/t6001.sh: update to use /dev/mapper directly |
||||
--- |
||||
tests/t6001-psep.sh | 43 ++++++++++++++++++------------------------- |
||||
1 file changed, 18 insertions(+), 25 deletions(-) |
||||
|
||||
diff --git a/tests/t6001-psep.sh b/tests/t6001-psep.sh |
||||
index 1859ac9..0c1ab99 100644 |
||||
--- a/tests/t6001-psep.sh |
||||
+++ b/tests/t6001-psep.sh |
||||
@@ -1,4 +1,5 @@ |
||||
#!/bin/sh |
||||
+ |
||||
# ensure that parted names partitions on dm disks correctly |
||||
|
||||
# Copyright (C) 2011-2012 Free Software Foundation, Inc. |
||||
@@ -19,10 +20,7 @@ |
||||
. "${srcdir=.}/init.sh"; path_prepend_ ../parted |
||||
|
||||
require_root_ |
||||
-lvm_init_root_dir_ |
||||
- |
||||
-test "x$ENABLE_DEVICE_MAPPER" = xyes \ |
||||
- || skip_ "no device-mapper support" |
||||
+(dmsetup --help) > /dev/null 2>&1 || skip_test_ "No dmsetup installed" |
||||
|
||||
# Device maps names - should be random to not conflict with existing ones on |
||||
# the system |
||||
@@ -41,25 +39,19 @@ cleanup_fn_() { |
||||
rm -f "$f1 $f2"; |
||||
} |
||||
|
||||
-# create a file of size N bytes |
||||
-N=10M |
||||
+loop_file_1=loop-file-1-$$ |
||||
+loop_file_2=loop-file-2-$$ |
||||
|
||||
-f1=$(pwd)/1; d1=$(loop_setup_ "$f1") \ |
||||
- || skip_ "is this partition mounted with 'nodev'?" |
||||
+d1=$(loop_setup_ $loop_file_1) || framework_failure |
||||
+d1_size=$(blockdev --getsz $d1) |
||||
+d2=$(loop_setup_ $loop_file_2) || framework_failure |
||||
+d2_size=$(blockdev --getsz $d2) |
||||
|
||||
-f2=$(pwd)/2 ;d2=$(loop_setup_ "$f2") \ |
||||
- || skip_ "is this partition mounted with 'nodev'?" |
||||
- |
||||
-dmsetup_cmd="0 `blockdev --getsz $d1` linear $d1 0" |
||||
-# setup: create a mapping |
||||
-echo "$dmsetup_cmd" | dmsetup create "$linear_" || fail=1 |
||||
-dev="$DM_DEV_DIR/mapper/$linear_" |
||||
+dmsetup create $linear_ --table "0 $d1_size linear $d1 0" || framework_failure |
||||
+dev="/dev/mapper/$linear_" |
||||
|
||||
# Create msdos partition table |
||||
-parted -s $dev mklabel msdos > out 2>&1 || fail=1 |
||||
-compare /dev/null out || fail=1 |
||||
- |
||||
-parted -s $dev mkpart primary fat32 1m 5m > out 2>&1 || fail=1 |
||||
+parted -s $dev mklabel msdos mkpart primary fat32 1m 5m > out 2>&1 || fail=1 |
||||
compare /dev/null out || fail=1 |
||||
|
||||
#make sure device name is correct |
||||
@@ -67,17 +59,18 @@ test -e ${dev}p1 || fail=1 |
||||
|
||||
#repeat on name not ending in a digit |
||||
# setup: create a mapping |
||||
-echo "$dmsetup_cmd" | dmsetup create "$linear2_" || fail=1 |
||||
-dev="$DM_DEV_DIR/mapper/$linear2_" |
||||
+dmsetup create $linear2_ --table "0 $d2_size linear $d2 0" || framework_failure |
||||
+dev="/dev/mapper/$linear2_" |
||||
|
||||
# Create msdos partition table |
||||
-parted -s $dev mklabel msdos > out 2>&1 || fail=1 |
||||
-compare /dev/null out || fail=1 |
||||
- |
||||
-parted -s $dev mkpart primary fat32 1m 5m > out 2>&1 || fail=1 |
||||
+parted -s $dev mklabel msdos mkpart primary fat32 1m 5m > out 2>&1 || fail=1 |
||||
compare /dev/null out || fail=1 |
||||
|
||||
#make sure device name is correct |
||||
test -e ${dev}1 || fail=1 |
||||
|
||||
+if [ -n "$fail" ]; then |
||||
+ ls /dev/mapper |
||||
+fi |
||||
+ |
||||
Exit $fail |
||||
-- |
||||
1.8.1.4 |
||||
|
@ -0,0 +1,371 @@
@@ -0,0 +1,371 @@
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK----- |
||||
Version: GnuPG v1.4.11 (GNU/Linux) |
||||
|
||||
mQINBEwWvdkBEACyOXTiLBZ5MFNM6jmm83ui3MqW0/eD8TcAI4gt0gwOvd/jXerI |
||||
ros8dRVook7FBoNiFSiJSMVOiNPUMfv5h5wZm0bje33qTJPL7IanSKXtk/I7Za1G |
||||
EJfEnfgZI/d4EIV8wrl0WI1lPEteTgRJbo76zfLIUOHpynVC2Wm5gALJ4oeJIS0A |
||||
hYSzbFmHD9dFI7m3sO/HmbhxTiMISy0FbmoqE/cpo8ZX6eahND2UrS2oGNC0Ok8/ |
||||
nN8XLPPsikx35FKx6bDTfoAK/svx6PK1sSPfAdoZFZ5Jy6Ti4zubebUD+5I8+bOn |
||||
6R9I7P0HerCTqMBLnf9LJHTPhTk8fHEwlAeH+WfpEmN9/4YORb84WY97tFbVK4f/ |
||||
icEjnYBc0Ozl4qMGI1g/1R5Q9Z8qxLGsW9tNWyIfAf+2BhLA08RfA0wxmEf2Gnfp |
||||
J379s5c0U8xLZegOGRF1tOAEIC+5wRKFN/qU9zpLbUZIGrB+ysVeTlDuCDnTnyUe |
||||
WBQeRnfItl4taEN0/axNGB/NuHvxShyzxez/flbyqKwsxc35/a2OCbwmADeUh+ct |
||||
sYUGZya/GuXfejWbCuaqZLLkP6Ed9k4+LY+ww6jA7uNPRXpCYoXFo2WN9OaIqfb/ |
||||
RDk6zW708qbxvcWKe6j9f8R0lPMYdtUzZhyxZxeZ0/2BdDyXAj1Wvnw1UwARAQAB |
||||
tB9KaW0gTWV5ZXJpbmcgPGppbUBtZXllcmluZy5uZXQ+iEUEEBECAAYFAkwiDagA |
||||
CgkQDdyqMnjVJk6YVQCeOq5SMJuPrc81HvHOwX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vIPQD+NiNoHoBRo932v470wXw89CCNhqvpDfig |
||||
9hwS/8LRg0CJARwEEAEIAAYFAkwX7uAACgkQp6FrSiUnQ2qfDQf9FQIy4ooXEzzm |
||||
veh0Ap0euWzWJRMEvrodZxazOy4TqfXEojQPQbpBU1i3RLERJg2PAfq2RWpj00ia |
||||
UshAIDRLcGfgL/NR45rbryEE7e1wEiiImQ7dhIKQF4ntn6FDia91X+EAaQkobG4N |
||||
ug0wq7o+CImD6+5KM526eABYa5Ca1KuY8h6X8gGHmQxkwccUxop2nGYiBEhOWC9f |
||||
MmfenOH2EatecrD3EDB8+/IvlRBETu7ARIjr90kwD3HlcYTA5hPKGDe1QxGeFOUd |
||||
IgDM/ClmSvEzMpU45XI7wwQiEeqC6plgGWeAne39qZxDOQWig1T5g4fUCo7T4lRJ |
||||
kioLmxpUIYkCHAQQAQIABgUCTDYj1wAKCRB2tTSy6ZAH4Gr8EACvM0xiNLjEezzS |
||||
DoaZWghCEZiK1d/YTk7/zor8oFSPYyxVFM+g9WVUd7gL36azmijr158D7tsoqWaM |
||||
CHeYehJ5LghMCPd+q1zWF4lAwD6NqBIG0hc8xnQ2LkdnIRBQdEv31sKueKfaP1zP |
||||
u+MI/3BZubAsSD8Hq3B4pOBWODhJVKvpR/K66IcbPNWchhXUzwj9prGgcX6HTz90 |
||||
FKbqDlRRJPn70MrnObJYyHRWkrYSyAN7yaiX8RNAs/g/XlNGYUbL4VT65G/PcoqM |
||||
KlReGiqrAfRATPLjICWCXFsIuW4SnbvtuTFx9bE72K6YuSmq1V/gDTYyJ+WGWWa7 |
||||
Bo8wnDfu4UAsKRO6i5NWWBGEmSwm9lsm7InYOne+LXiNlsnzTLkgqzAPl7DHuX+l |
||||
wbp40qQHbRVRuNGwxbHZZ8DJ6IkO/0yYQJFGmBNkYSXnG5rnBNvZs5wfGllF4y3E |
||||
xUWUygh2P4ha3IXlEjHBy6gk5nmzTjDXbMLFUvgapvMKEy2ARlBLwbeXwGWs3jwQ |
||||
BfNBqP7BLU73uVoHB6hMqD9MmfR2onRqzOOoCJdeXJqx2Am/5FTWozcxdgdIKqEG |
||||
OUmfD8jwLsKb0SALWdWEMCj2/uT3eadZNo+T14KiT59jVRqR1uois61jeS0GaEfX |
||||
Na5voq0aTNiAp+Ohv4Y3waO4P2X7dIkCHAQQAQIABgUCTDdpgQAKCRDvgfcsKanW |
||||
723WEACWbHdKZUEKMRnG7Af9OOIL4gf971SWP57IfPAodgl/VvfW2jQ9LV+HbMej |
||||
TNdW5nYdGd3iy3yi3J+cd4L9eJcgjwOzitz2dbSb7BzAzaHD4ge0CtdnY2jeLOXA |
||||
2VdczI9XbUhXSrcFYsOSj9j1UGW9UTMBNKyMvaaMB+VNFk8DQfHk5bcWg6wkag8D |
||||
Y1mYIff844XiLNAZ6ohiYVYuMcVXijU0HDL/74q1DJwiMBMDIrWTDxiib1YpN/jv |
||||
/NJDxaUUVMK1LIjJmykFvj7Y4MZpPGgJ7F2YD8ZFRWQPcZQKqXunVNVVVDkq5bWo |
||||
ST+XSMInPiI3euaLm0srUOh8XTBocS8/fNZFmPD0DIC9kiZomrp1xa/3W9jbSERH |
||||
Hfjju2odJjWz/DGm2P0gszlix1aibRhK+PnrSGR3Ql3VH0JEZw9UK0joxiODSQKH |
||||
5paq0XBDJBisUR3MSP8oEUjbdmPuYE/oMmfJMGLWPbJK/7BBeL3dD2rv9hxSnoTS |
||||
EImCoGCFOMZC0HG4iY75doo627XUbTaoL4nuUiRF/5fK/3oiTS/rBhGQOBSrKDUp |
||||
Z6iuQKImIwhNGvttaiORTtmQkBzEvoHz6IvniL/SJh7SAEhrVFAR7HztEr3ODNIg |
||||
RWn3F9hGeAEuev6BSKfkUhu6AFmm0ZU5fvBZMlUjpbxhd6BORokCHAQQAQIABgUC |
||||
TD2XbgAKCRDsbnDffAimYoqPD/0UV4K/9ENdyc084RcDZ4OoUWfbwfNKUmOoNm6c |
||||
FUr0m+lR+NL1STRCACTblTuBRdGILYvAAOk/QSjJchtV+VwgJrnmcxJawVZqieb9 |
||||
6cIr70rLblLhU3ONoAe7HvLhNkfJr8TFWzOw8oEOFIMCiIOjkbzeTmaXcf0q6s3n |
||||
CVXnhNUz1VrTP2en5puzxTfjVmAF20hVOICsuVgFnVwO2DOAkel50eA3/19Lc0P4 |
||||
TYuOp5qllcl65y8yPSsX+DPJC9k5Wf3JuN6aXF1seo7soqXfabF8njqnpo0uZUNZ |
||||
M+HTfOr1gAaLiKYtDzdOsEsrfX0/JmJP44e7tqor+tP8etuYqfzIS9m78wfJv+RG |
||||
9lR4kOhhIGbf+MxjznmVX4Wf2yf8GEK/hxo0Td90OXlWQUR9JBZb9k2vcb26T5A9 |
||||
RMs0rSbxJKj2NRJW9nTHAnhZgENXv4nO/wnWISVVjdcQIZJzJCNZzves/Tbw98GF |
||||
HQwMjiFHw2FET7J+ImFVnI/ooDApWsytdqqiXlhL4qzA3OvFDvHOpaqikf0XouwX |
||||
834CN/8OukVByOWra0xlItjYePvCqocKNVtBRdDVIkPqf3FKKbPWRJPgY800Jt9h |
||||
Rk3BNSjBu0TZUBCkIlL+X2KI/M0x/yIHnCKCrtwPA4zeCSav3KSUMA+bAEI1B9ym |
||||
Cm3rPYkCHAQQAQgABgUCTGIaDAAKCRDlYr2UvwNEXjA+EAC9lh2HPZViXSWbiPKz |
||||
0rKIvM9y+FwXhvKNC96RdmykXW70U7L6pRY/pLQJGdKmiYjUKFhaYYjlP34oTl+k |
||||
cnjC8KnRDGs20kybNw6cX3vrwBkf4aBiKFLK7wteTOkSdZnJWjAg4ix0Q/Zsv2xX |
||||
IVKZswLMe4s+zZUZfYmrwXIXJmpoQY/ikAlJKtyJiHAroolsagKRuYEDdwDFZIrm |
||||
XOB3AaFg3U7tXinBDNigIVcM8kzhhLoPOT1WERfKpurwQc7vWXcOjbR6/fZcIdXW |
||||
+6Or66lPIrd6CrmKehE6KCld9V2WphdKIeOyadCUxCfCIRKG2LRHQYPvi4a7E8bk |
||||
paKeIAFg6P+XBojrSEqz/Klv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m/BqtP8NUW5dsYasYgda5IZJDcZc |
||||
QlPWL3yukwziH1qGrt6+YqoZU6+sNXb/J4DIgDw6Bs3e/VfKqsYSjugIsUz8DJzY |
||||
ArB09WMxmwjZ5J3KMlztPLIHigFxvty4nqCstZkqRsTVgJor9bunownIkhbs5P++ |
||||
bFf/gdiG6pYwCDpIoktrgy837MtRhs7YLK8QfCfvnf8beli+7KF4UOIw8MbXZP2P |
||||
d5OYoT0p5kXzLCYyGsk5i94y1lELAWqnk+D20Irze6d8gNGK38srbVQLui01dYQO |
||||
+f3BnwIdYGG4S7OofPYbCmDCHBDMCANBy0kMpU9JMz8G4ELrbJI0TomJAhwEEwEC |
||||
AAYFAkw07PYACgkQvNuVtwqjvw5pdA//ZIWJelr1yaj7f97ypaA2nk1DC9Hd/+9w |
||||
06kKgX0qV+vHsusmCdQkfRCK7r/BUPtXWj7swc4DGDE40lJ+v1oswjQonQUh5tg2 |
||||
AkacZ7YTczPrr01Lk8nPC3a3QH/CCtMwwN+AX1PAAGfAH4rIlgLV4tMJIjvVgEd7 |
||||
ZY2+bEcc1LpwAdQXEySQPMs4lWK4itvYrQkRR40EMEhvEfQeLSvl32m7u7+2byGy |
||||
X2cko+jlHL3phWfMKfLXVREgU4zFoPfejZW7x/pFw0euV9z3iRTi7EagFWVFPQAI |
||||
edyUR8SFDYTYfVuDehXGpWk5b40a7+HBPMHtf65oE5WRC0YPq4zkk6lQBTF5pyQh |
||||
/GyKdQdIWfNLRz0Q1ge1T0fEPOwl9KVwLOa1yT/576mgxScH7lSZymVMUWDY1Vxl |
||||
YbMCOaaBoUUOPS8mjyPjOdJn+8b2p6kAeMh+xpmB4wONdu8ouLrcyp+P6O+gsEqD |
||||
TuGwX1uAkiMpAmgHfsbh33e/CA0m+LtSS8WCRW4sa+Zd4DULkO40alCh1sxoFXrg |
||||
aiNhawIu5gv9xT4wMrlzHJFlLsQGznX592rmNxyHyCbq393rjdzsNWoVbVk8d5Rd |
||||
e+Fnxs36cwvoc6a0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SKvBe7JTMZd7sK6hKsidTgrapl1pC |
||||
86BletDPdeRHR1heAhABadyZH/MyHLyieC9pyjDHxhLVDuUio3LFt8qmT7ebBe7r |
||||
tQijGEs+CIqTzMQ35bTbQhk5iQIcBBABAgAGBQJMPZd8AAoJEOxucN98CKZiqEwP |
||||
/iN5n70cWR4FY0n3AaSvYV3mtaiisfkn/O27KWQjSdrVagXCoKdRmARZBFs1QBDH |
||||
rLmDQ7UtH8O/G9QOTO77BXvDsk9zhf79Z3nyh18J8S4x+mWMuqG99k6u6hsLN4+S |
||||
E7VZ02hC88UfcNvSSSZHlXfcrhzrwPIu1+fUGTGuPsVSOj589sQ5/GM1De5MWUXd |
||||
fCoceLQu1bLZAgxebzcII7kllSFWsppATPkYX6rXMsQ6XgMp1WeY9RIjCo/9DIeQ |
||||
GwcYsjrCdUah5le8cIML8xNyBE/UPhLZvL5vHOA2Jvo5zbHIhnRNlD105ydb0mzu |
||||
AJPxxxdihTgGqJORlC/2pnmuXD6K9KT1Lt/PTtQBp4GAU/OKfSIF2N5e1vzkQVUs |
||||
id5dfE1FIP52yA1FY2pFNCuwTSam3InOGvvfhAVLMYDDTrLBDzAM/kYwOTWgQ622 |
||||
OXMX1vJRzTrH6eFVUXr6/kelCJixUyV8RiiPmvKCGS5xEcQr2cyJvCuxXs1Wgnmn |
||||
djyaffZKEtAPv5oHBLjQO2tMyrtXSrCmFL8sU2itN14I7q3IawWfQIbjU62dq+df |
||||
6gzdBxud3X+ygTPpDb/cmeMuJ1GpKpgWC2Fy0C9d71v9tt/ViqHNUXSOes8Fculv |
||||
t6h5imuRCQ+2IxsrVm43ILHq5h/fSQzFIICrv7r/f3jziQIcBBABCAAGBQJMYhoM |
||||
AAoJEOVivZS/A0Re2EEP/jaZgjwkx/IFITCSb/hfF3jzM8/X5RgtspFWW3GePUOh |
||||
jSzT6zB5b8fahSkyr3a+v1UVCHta+qQQ/HGsDcaPALlcWdG/ncqZ6jyxmmFCl0GX |
||||
B8CxGJBzjX1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fXQMTXhv8oRCh/Cf37E9E8iQI3BBMBCAAhBQJMF3E9Ahsv |
||||
BQsJCAcDBRUKCQgLBRYCAwEAAh4BAheAAAoJEH/Z/MsAC+7uQ1wP/1YVbfNBaod/ |
||||
malsZCksoa7fFIATOdunMT72KA5s/RQ7GETUX9zJmdQnePg0jabptCnFi4epzslu |
||||
AVA2DGt+H9AqN5gHlI2DK6DlNovpmSRG4+7hewCKq2axfq7GzY+gsSh7moxQWgrL |
||||
VlnzO56rXOH5PWGQb0POj0dItj6ZfTberH/I33Wts67Wu/BaxgQjpw2c5mZw9A7v |
||||
5PKgJHm/W3YXb5ibDyGrQCb1+J/2jZI2VtQxpZuT5k8d+NYSCw80X0X9pLL+jFQk |
||||
Apol9/YVoBe7ybQ2EbzE7ovwu2YTfRDdDlr4EObhggQwMpck16Id/yrRe+ELd4ay |
||||
uuT4/EVvrh93+rMydRWYALZyLCcQycWtxjo0tcvMr+JC644nlSbyh3dWPqlfNm2H |
||||
n70UMHpo/XCT3hJplrT8sXyQXA3WgFTnbyavNf0G1e/R1vnjn1iqRR9eBpC8ykQy |
||||
Y8TtuYz8wG3nmTQqHjZMwGjh7gsFNy46hcg4ofX+DpoNuyzor0vINqxhEU7bdm4s |
||||
s/eE/2G/cYk4wi8oYlUv4tUw2wP5ggkiCxaj8k6Cb13H6yQmBuj5yVQATFQE3n/u |
||||
xK9njPWi4Qge6JRd9gixON+iCaeFozpvUd2ywO8CnGPOKP6YwPcqJE4j1AlQLLEv |
||||
TsT5hoBVIBulDJ13iotYt5qIhAlhASJs |
||||
=Nb2k |
||||
-----END PGP PUBLIC KEY BLOCK----- |
Loading…
Reference in new issue