Hi,
I think the comment about devfs can and should be removed too, esp.
as we no longer test for devfs (and fallback to the reread ioctl in
case of devfs).
Regards,
Hans
On 11/22/2010 10:04 AM, Jim Meyering wrote:
Brian C. Lane wrote:
---
libparted/arch/linux.c | 23 ++-
libparted/arch/linux.c(SCSI_BLK_MAJOR): recognize high majors
---
NEWS |2 ++
libparted/arch/linux.c | 11 ++-
2 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/NEWS b/NEWS
index 45bd2bf..a1863fc 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,8 @@ GNU parted
Microsoft advices creating recovery partitions with a GUID of
de94bba4-06d1-4d40-a16a-bfd50179d6ac, see:
http://technet.microsoft.com/en-us/library/dd744301%28WS.10%29.aspx
This patch makes parted recognize this guid (using the DIAG flag).
* libparted/labels/gpt.c(PARTITION_MSFT_RECOVERY, GPTParti
msdos partitiontable partition id 27 is recommended by microsoft for
use as id for recovery partitions, see:
http://technet.microsoft.com/en-us/library/dd744364%28WS.10%29.aspx
http://bugzilla.redhat.com/show_bug.cgi?id=534066
* libparted/labels/dos.c(PARTITION_MSFT_RECOVERY): add define
* libpart
0-flags.sh: New test, suggested by Hans De Goede.
* tests/Makefile.am (TESTS): Add it.
---
tests/Makefile.am|1 +
tests/t3310-flags.sh | 68 ++
2 files changed, 69 insertions(+), 0 deletions(-)
create mode 100644 tests/t3310-flags.sh
_device_unregister() can get called 2 times for the same device if
a libparted user explictly removes the device from the cache using
ped_device_cache_remove(), it gets called and it then becomes the
user's responsibility to free the PedDevice by calling
ped_device_destroy(). ped_device_destroy() w
msdos partition tables can contain diagnostics partitions (often used
now a days as system recovery partitions). For some users of libparted
(ie anaconda) it is usefull to know if a dos partition is a regular partition
or a diagnostic partition (see rh bug 534066).
* include/parted/disk.h(_PedPart
We were checking for a return value of < 0 for dm_task_run errors, but
dm_task_run returns 0 on error (and 1 on success). Thanks to Joe Jin
for spotting this, see Red Hat bug 582907.
* libparted/arch/linux.c(_dm_remove_map_name, _dm_is_part,
_dm_remove_parts, _dm_add_partition): dm_task_run return
Hi,
On 04/20/2010 08:38 PM, Jim Meyering wrote:
Hans de Goede wrote:
msdos partition tables can contain diagnostics partitions (often used
now a days as system recovery partitions). For some users of libparted
(ie anaconda) it is usefull to know if a dos partition is a regular partition
or a
Setting the prep flag was not clearing the palo flag and vica versa
* libparted/labels/dos.c(msdos_partition_set_flag): Fix prep / palo
flag handling.
---
libparted/labels/dos.c |2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/libparted/labels/dos.c b/libparted/labels/dos.
msdos partition tables can contain diagnostics partitions (often used
now a days as system recovery partitions). For some users of libparted
(ie anaconda) it is usefull to know if a dos partition is a regular partition
or a diagnostic partition (see rh bug 534066).
* include/parted/disk.h(_PedPart
Besides fixing the issue displayed by libparted/tests/symlink.c,
this has the added advantage that the output of parted p on one of these
devices now says:
"Disk /dev/mapper/BigVol2-lv_iscsi_disk2: 34.4GB"
Which is a lot more user friendly then the output before this patch:
"Disk /dev/dm-6: 34.4GB
Sometimes libparted operates on device mapper files, with a path of
/dev/mapper/foo. With newer lvm versions /dev/mapper/foo is a symlink to
/dev/dm-#. However some storage administration programs (anaconda for
example) may do the following:
1) Create a ped_device for /dev/mapper/foo
2) ped_get_dev
From: David Cantrell
Since the hidden flag cannot be set on extended partitions,
msdos_partition_is_flag_available() should return 0 for hidden on
extended partitions. Also change msdos_partition_get_flag()
to always return 0 for hidden on extended partitions.
* libparted/labels/dos.c (msdos_part
Most duplicate disk_ops use ped_disk_new_fresh, which sets needs_clobber
to 1. This would lead to clobbering the disk when committing a duplicate
disk even when the original disk was not made with ped_disk_new_fresh.
* libparted/disk.c (ped_disk_duplicate): copy needs_clobber value.
---
libparted/
When the topology info is incomplete or non existent, return something
more sensible then NULL (which ends up being interpreted as
PedAlignmentAny in most cases). The default minimum alignment aligns to
physical sector size, the default optimal alignment is 1 MiB, which is
what vista and windows 7
In do_mkpart we first try to create a partition using a constraint
derived from the user input intersected with the devices alignment
needs. And if that fails we try again without any constraint.
However the warning given when this happens only takes into account
the user not getting what he asked
* libparted/labels/dasd.c (dasd_read): Fix NULL ptr dereference.
---
libparted/labels/dasd.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libparted/labels/dasd.c b/libparted/labels/dasd.c
index 4b5840b..516d189 100644
--- a/libparted/labels/dasd.c
+++ b/libparted/label
parted/parted.c (do_mkpartfs,do_print,do_resize): honor --align
---
parted/parted.c | 26 +-
1 files changed, 25 insertions(+), 1 deletions(-)
diff --git a/parted/parted.c b/parted/parted.c
index 06b9f6c..69451a8 100644
--- a/parted/parted.c
+++ b/parted/parted.c
@@ -949
parted/parted.c: change --align default value to optimal
tests/*.sh: adjust for alignment changes where necessary
---
NEWS |3 +++
parted/parted.c|2 +-
tests/t0220-gpt-msftres.sh |4 ++--
tests/t0280-gpt
The topology information returned by libblkid is not always complete
(as the kernel does not always have complete information).
This patch makes the linux_get_*_alignment() alignment functions handle
this. The algorithm used for linux_get_optimum_alignment is:
1) Always use the reported aligment of
1) Use the logical sector size as physical sector size instead of 512
when not compiled with libblkid support, this fixes problems
with logical sector size > physical sector size.
2) blkid_topology_get_physical_sector_size() can return 0 when it could
not determine the physical sector size
Hi,
On 01/31/2010 05:14 PM, Jim Meyering wrote:
Hans de Goede wrote:
Thanks for the heads up, note that I've finished a couple
of test installs this morning and the rest of the patch set
is good to go too from my pov.
Actually I've already build Fedora and RHEL-6 packages
Hi,
Thanks for the heads up, note that I've finished a couple
of test installs this morning and the rest of the patch set
is good to go too from my pov.
Actually I've already build Fedora and RHEL-6 packages with
it in.
Regards,
Hans
On 01/31/2010 03:55 PM, Jim Meyering wrote
parted/parted.c: change --align default value to optimal
tests/*.sh: adjust for alignment changes where necessary
---
NEWS |3 +++
parted/parted.c|2 +-
tests/t0220-gpt-msftres.sh |4 ++--
tests/t0280-gpt
When the topology info is incomplete or non existent, return something
more sensible then NULL (which ends up being interpreted as
PedAlignmentAny in most cases). The default minimum alignment aligns to
physical sector size, the default optimal alignment is 1 MiB, which is
what vista and windows 7
The topology information returned by libblkid is not always complete
(as the kernel does not always have complete information).
This patch makes the linux_get_*_alignment() alignment functions handle
this. The algorithm used for linux_get_optimum_alignment is:
1) Always use the reported aligment of
parted/parted.c (do_mkpartfs,do_print,do_resize): honor --align
---
parted/parted.c | 26 +-
1 files changed, 25 insertions(+), 1 deletions(-)
diff --git a/parted/parted.c b/parted/parted.c
index c4d1779..5ba8bbf 100644
--- a/parted/parted.c
+++ b/parted/parted.c
@@ -949
Atleast on my system check-other-sector_sizes was actually just testing
512 bytes sectors 4 times. This fixes this.
* Makefile.am: Fix check-other-sector_sizes
---
Makefile.am |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 0e80967..d5a32ef
In do_mkpart we first try to create a partition using a constraint
derived from the user input intersected with the devices alignment
needs. And if that fails we try again without any constraint.
However the warning given when this happens only takes into account
the user not getting what he asked
1) Use the logical sector size as physical sector size instead of 512
when not compiled with libblkid support, this fixes problems
with logical sector size > physical sector size.
2) blkid_topology_get_physical_sector_size() can return 0 when it could
not determine the physical sector size
Hi,
On 01/29/2010 10:31 AM, Jim Meyering wrote:
Hans de Goede wrote:
_device_set_sector_size never get called for devices with a type of
PED_DEVICE_FILE, and having a PED_DEVICE_FILE check inside an ifdef
__390__ block does not make sense.
* libparted/arch/linux.c(_device_set_sector_size
_device_set_sector_size never get called for devices with a type of
PED_DEVICE_FILE, and having a PED_DEVICE_FILE check inside an ifdef
__390__ block does not make sense.
* libparted/arch/linux.c(_device_set_sector_size): Remove
PED_DEVICE_FILE check.
---
libparted/arch/linux.c |3 +--
1 files
The official 2.17 release of util-linux-ng, has added a function to
get the physical sector size, use that instead of getting the
minimum io size.
* libparted/arch/linux.c(_device_set_sector_size): use
blkid_topology_get_physical_sector_size.
---
libparted/arch/linux.c |2 +-
1 files changed,
* libparted/arch/linux.c: Don't include blkpg.h.
* libparted/arch/blkpg.h: Deleted.
---
libparted/arch/blkpg.h | 64
libparted/arch/linux.c |1 -
2 files changed, 0 insertions(+), 65 deletions(-)
delete mode 100644 libparted/arch/blkpg.h
dif
Hi,
On 12/18/2009 01:59 PM, Jim Meyering wrote:
Hans de Goede wrote:
Is this adjustment ok with you, since I'm leaving your name on it?
I don't want to leave the assignments to NULL, since they're
effectively dead code and I don't want to provoke warnings
from the likes o
Hi,
On 12/18/2009 01:26 PM, Jim Meyering wrote:
Hans de Goede wrote:
* libparted/arch/linux.c (_dm_add_partition): Fix use of dm_task
information after freeing it.
---
libparted/arch/linux.c |6 --
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/libparted/arch/linux.c
* libparted/arch/linux.c (_dm_add_partition): Fix use of dm_task
information after freeing it.
---
libparted/arch/linux.c |6 --
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
index 9d15bf2..36a698d 100644
--- a/libparted/arch
The partition_print_flags() function was truncating the flag names,
but these are translated strings, and thus can contain multibyte
characters. Truncating multibyte chars in a non multibyte aware way
is not good and was causing issues when printing tables in Russian:
http://bugzilla.redhat.com/sho
* libparted/labels/dos.c (add_startend_metadata): Honor cylinder
alignment flag.
---
libparted/labels/dos.c |5 -
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/libparted/labels/dos.c b/libparted/labels/dos.c
index ea8fc0b..581506e 100644
--- a/libparted/labels/dos.c
+++ b/
Disk flags can change how the metadata gets allocated, so push/pop
update mode around ops->disk_set_flag, so that the metadata gets
re-allocated.
* libparted/disk.c (ped_disk_set_flag): push/pop update mode.
---
libparted/disk.c | 13 -
1 files changed, 12 insertions(+), 1 deletions(
We cannot do partition related ioctl's on loopback devices, so
treat them as files.
* libparted/arch/linux.c(LOOP_MAJOR): New define.
* libparted/arch/linux.c(_device_probe_type): Treat loopback
devices as files.
---
libparted/arch/linux.c |3 +++
1 files changed, 3 insertions(+), 0 deletions
doc/parted.texi: Document --align option.
---
doc/parted.texi |5 +
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/doc/parted.texi b/doc/parted.texi
index a1d794d..5704520 100644
--- a/doc/parted.texi
+++ b/doc/parted.texi
@@ -496,6 +496,11 @@ display a help message
@itemx
* doc/C/parted.8: add --align option to manpage.
---
doc/C/parted.8 | 20
1 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/doc/C/parted.8 b/doc/C/parted.8
index 9909ba8..2a8992e 100644
--- a/doc/C/parted.8
+++ b/doc/C/parted.8
@@ -30,6 +30,26 @@ never prompts
* NEWS: Add new --align option.
---
NEWS | 15 +++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/NEWS b/NEWS
index 500e060..cd67678 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,21 @@ GNU parted NEWS-*- outline
-*-
** New features
* libparted/disk.c(ped_disk_delete_all): Add missing update mode pop
call in error path.
---
libparted/disk.c |4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/libparted/disk.c b/libparted/disk.c
index 476ece8..5ca5b74 100644
--- a/libparted/disk.c
+++ b/libparted/disk.c
From: Joel Granados Moreno
* libparted/disk.c(ped_disk_duplicate): Add missing update mode
pop call in error path.
---
libparted/disk.c |4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/libparted/disk.c b/libparted/disk.c
index 7660ee9..d14fe41 100644
--- a/libparted/di
From: Joel Granados Moreno
include/parted/Makefile.am: Don't install s390 dasd internal headers
in /usr/include.
---
include/parted/Makefile.am |6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/parted/Makefile.am b/include/parted/Makefile.am
index a1ba960..022
Sanity check errors indicate something is really really wrong, still
sometimes they happen, when they happen it helps a lot in debugging
them when the libparted caller immediately errors out at the first
moment, rather then slugging along until things crash somewere.
* libparted/disk.c(_disk_push_u
From: Joel Granados Moreno
* include/parted/disk.h(PedPartitionFlag): Add
PED_PARTITION_APPLE_TV_RECOVERY.
* libparted/disk.c(ped_partition_flag_get_name): Handle
PED_PARTITION_APPLE_TV_RECOVERY.
* libparted/labels/gpt.c(PARTITION_APPLE_TV_RECOVERY_GUID):
New define.
* libparted/labels/gpt.c(GPTP
doc/parted.texi: Document --align option.
---
doc/parted.texi |5 +
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/doc/parted.texi b/doc/parted.texi
index a1d794d..a4090df 100644
--- a/doc/parted.texi
+++ b/doc/parted.texi
@@ -496,6 +496,11 @@ display a help message
@itemx
---
doc/C/parted.8 | 20
1 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/doc/C/parted.8 b/doc/C/parted.8
index 9909ba8..31c33ec 100644
--- a/doc/C/parted.8
+++ b/doc/C/parted.8
@@ -30,6 +30,26 @@ never prompts for user intervention
.TP
.B -v, --version
dis
* NEWS: Add new --align option.
---
NEWS | 16
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/NEWS b/NEWS
index c0b29cc..bf1044d 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,22 @@ GNU parted NEWS-*- outline
-*-
** New features
* NEWS: Change the note for the align-check command to also reference
libblkid, add a note to the libparted alignment functions NEWS entry
about libblkid and kernel requirements.
---
NEWS |4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/NEWS b/NEWS
index bf1044d..5b01e9c
* NEWS: Add new disk flag functions.
---
NEWS | 12
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/NEWS b/NEWS
index 9a0ac2c..c0b29cc 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,18 @@ GNU parted NEWS-*- outline
-*-
** New features
The new --align commandline option can have the following values:
none: Use the minimum alignment allowed by the disk type
cyl: Align partitions to cylinders (the default)
min: Use minimum alignment as given by the disk topology information
opt: Use optimum alignment as given by the disk top
Sometimes we want to be able to set flags at the disk level rather then
at the parition level, to influence how new partitions will be created
for example. This patch adds functions to do this (modelled after the
partition flag functions), and adds a PED_DISK_CYLINDER_ALIGNMENT flag.
This flag (wh
* libparted/labels/dasd.c(dasd_free): free disk_specific data.
---
libparted/labels/dasd.c |4
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/libparted/labels/dasd.c b/libparted/labels/dasd.c
index dd492f2..57612a3 100644
--- a/libparted/labels/dasd.c
+++ b/libparted/label
* libparted/labels/dos.c(DosDiskData): New struct.
* libparted/labels/dos.c(msdos_alloc, msdos_duplicate, msdos_free):
Handle per disk DosDiskData.
* libparted/labels/dos.c(msdos_disk_set_flag, msdos_disk_get_flag,
msdos_disk_is_flag_available): New functions.
* libparted/labels/sun.c(sun_disk_set_
---
NEWS | 18 ++
1 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/NEWS b/NEWS
index c8c5724..6564ab8 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,18 @@ GNU parted NEWS-*- outline
-*-
* Noteworthy changes in release ?.? (-??-?
Hi,
On 11/09/2009 06:28 PM, Jim Meyering wrote:
Hans de Goede wrote:
dasd_write(), was reading the volume label from the disk (trough
fdasd_check_volume()) and later writing it back again, this is fine for
existing dasd labels, but when creating a fresh label, this would
also cause the old
dasd_write(), was reading the volume label from the disk (trough
fdasd_check_volume()) and later writing it back again, this is fine for
existing dasd labels, but when creating a fresh label, this would
also cause the old volume label to be re-used, and if the old label
was corrupt, it would cause
Hi,
On 11/04/2009 10:32 AM, Jim Meyering wrote:
Hans de Goede wrote:
The current dasd label code keeps an fdasd anchor struct in the
DasdDiskSpecific struct, and fills this during dasd_read. However this
anchor does not get updated with any future mods, until dasd_write,
at which points it
The part_info pointer in DasdPartitionData was only used to
pass fdasd partition_info_t pointers from dasd_write to
the dasd_write dasd_update_type utility function. Since these
pointers are not valid outside the lifetime of dasd_write, they
should not be stored in the longer lived DasdPartitionDat
Fix dasd_duplicate and add a dasd_partition_duplicate function.
* libparted/labels/dasd.c(dasd_partition_duplicate): New function.
(dasd_duplicate): Don't set the disk_specific pointer to NULL!
(dasd_duplicate): Copy DasdDiskSpecific from old disk to new disk.
---
libparted/labels/dasd.c | 24 ++
Set disk_specific->format_type in dasd_alloc, so that the disk
returned by ped_disk_new_fresh is a valid dasd disk.
* libparted/labels/dasd.c (dasd_alloc): Set disk_specific->format_type.
---
libparted/labels/dasd.c |3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/libpart
dasd_alloc was doing an ioctl to get the real sector size for the dasd
device (we are faking 512 bytes sectors), but when called directly
from ped_disk_new_fresh(), the device is not open causing this to fail.
This patch fixes things by caching the real_sector_size in the linux
arch_specific data
The current dasd label code keeps an fdasd anchor struct in the
DasdDiskSpecific struct, and fills this during dasd_read. However this
anchor does not get updated with any future mods, until dasd_write,
at which points it gets completely re-initialized.
Since the contents of the anchor saved durin
Use major / minor to specify device mapper device instead of
dm_task_set_name. This is needed for upcoming lvm changes where the
/dev/mapper/foobar files are becoming symlinks, so we will end up
opening /dev/dm-#, and dm-# is not a valid dm_task name.
This is only needed in this one place, as in t
Use devicemapper task name instead of device node name as basename for
devicemapper disk partitions.
This is needed for upcoming lvm changes where the /dev/mapper/foobar files are
becoming symlinks, so we will end up opening /dev/dm-#, and naming our
partitions dm-#p1, dm-#p2, instead of foobarp1,
---
libparted/arch/linux.c | 10 --
1 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
index 3ca938a..a87f7e2 100644
--- a/libparted/arch/linux.c
+++ b/libparted/arch/linux.c
@@ -2333,22 +2333,20 @@ err:
static int
_dm_remove_
Implement get_partition_alignment DiskOp for all labels which require
an alignment with a grain_size != 1.
---
libparted/labels/dasd.c | 12
libparted/labels/mac.c | 11 ++-
libparted/labels/pc98.c | 12 +++-
libparted/labels/rdb.c | 12 +++-
libparte
This functions get the alignment needed for partition boundaries on this disk.
The returned alignment describes the alignment for the start sector of the
partition, for all disklabel types which require alignment, except Sun
disklabels, the end sector must be aligned too. To get the end sector
alig
In libparted-1.9 ped_device_get_constraint() would always return a constraint
without any start / end aligning (grain_size == 1). Now that we are starting to
support disks with a physical sector size other then 512, the old
ped_device_get_constraint() code may actually start returning constrains
wi
* libparted/arch/linux.c (get_minimum_alignment): New function.
(get_optimum_alignment): New function.
---
libparted/arch/linux.c | 34 +-
1 files changed, 33 insertions(+), 1 deletions(-)
diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
index a03c80d
This is a preparation patch for adding get_minimum_alignment
and get_optimum_alignment functions to linux's _PedDeviceArchOps.
* libparted/arch/linux.h (struct_LinuxSpecific) [probe, topology]:
Add members.
* libparted/arch/linux.c (linux_new): initialize
arch_specific->probe and arch_specific->top
Add ped_device_get_minimal_aligned_constraint() and
ped_device_get_optimal_aligned_constraint() functions to libparted.
These functions can be used to get a device constraint taking alignment into
account.
---
include/parted/device.h |5 +++
libparted/device.c | 69
Add ped_device_get_minimum_alignment() and ped_device_get_optimum_alignment()
functions to libparted.
Note this is a resent of my previous patchset with a number of typos corrected:
aligment -> alignment
minimal_alignment -> minimum_aligment
optimal_alignment -> optimum_aligment
Sorry for the noi
* libparted/arch/linux.c (linux_get_xxx_alignment): blkid's topology io size
may be 0 when blkid could not get the minimum / optimum iosize. Return NULL
in this case instead of returning a bogus (grain_size == 0) alignment.
---
libparted/arch/linux.c |4 ++--
1 files changed, 2 insertions(+),
* libparted/arch/linux.c (linux_new): When compiled with blkid support
initialize arch_specific->probe and arch_specific->topology to NULL,
as get_blkid_topology(), which sets them, does not get called for
regular files.
* libparted/arch/linux.c (get_blkid_topology): No need to set
arch_specific->t
Hi,
On 10/29/2009 05:38 PM, Jim Meyering wrote:
Hans de Goede wrote:
Add ped_device_get_minimum_alignment() and ped_device_get_optimum_alignment()
functions to libparted.
Note this is a resent of my previous patchset with a number of typos corrected:
aligment -> alignment
minimal_alignm
---
libparted/arch/linux.c | 34 +-
1 files changed, 33 insertions(+), 1 deletions(-)
diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
index 176e7da..3069c59 100644
--- a/libparted/arch/linux.c
+++ b/libparted/arch/linux.c
@@ -2521,6 +2521,34 @@ linux
This functions get the alignment needed for partition boundaries on this disk.
The returned alignment describes the alignment for the start sector of the
partition, for all disklabel types which require alignment, except Sun
disklabels, the end sector must be aligned too. To get the end sector
alig
Implement get_partition_alignment DiskOp for all labels which require
an alignment with a grain_size != 1.
---
libparted/labels/dasd.c | 12
libparted/labels/mac.c | 11 ++-
libparted/labels/pc98.c | 12 +++-
libparted/labels/rdb.c | 12 +++-
libparte
Add ped_device_get_minimal_aligned_constraint() and
ped_device_get_optimal_aligned_constraint() functions to libparted.
These functions can be used to get a device constraint taking alignment into
account.
---
include/parted/device.h |5 +++
libparted/device.c | 69
Add ped_device_get_minimum_alignment() and ped_device_get_optimum_alignment()
functions to libparted.
Note this is a resent of my previous patchset with a number of typos corrected:
aligment -> alignment
minimal_alignment -> minimum_aligment
optimal_alignment -> optimum_aligment
Sorry for the noi
This is a preparation patch for adding get_minimum_alignment
and get_optimum_alignment functions to linux's _PedDeviceArchOps.
---
libparted/arch/linux.c | 75 ++--
libparted/arch/linux.h |8 +
2 files changed, 36 insertions(+), 47 deletions(-)
In libparted-1.9 ped_device_get_constraint() would always return a constraint
without any start / end aligning (grain_size == 1). Now that we are starting to
support disks with a physical sector size other then 512, the old
ped_device_get_constraint() code may actually start returning constrains
wi
This functions get the aligment needed for partition boundaries on this disk.
The returned alignment describes the aligment for the start sector of the
partition, for all disklabel types which require alignment, except Sun
disklabels, the end sector must be aligned too. To get the end sector
aligme
In libparted-1.9 ped_device_get_constraint() would always return a constraint
without any start / end aligning (grain_size == 1). Now that we are starting to
support disks with a physical sector size other then 512, the old
ped_device_get_constraint() code may actually start returning constrains
wi
Implement get_partition_alignment DiskOp for all labels which require
an alignment with a grain_size != 1.
---
libparted/labels/dasd.c | 12
libparted/labels/mac.c | 11 ++-
libparted/labels/pc98.c | 12 +++-
libparted/labels/rdb.c | 12 +++-
libparte
Add ped_device_get_minimal_aligned_constraint() and
ped_device_get_optimal_aligned_constraint() functions to libparted.
These functions can be used to get a device constraint taking alignment into
account.
---
include/parted/device.h |5 +++
libparted/device.c | 69
This is a preparation patch for adding get_minimal_alignment
and get_optimal_alignment functions to linux's _PedDeviceArchOps.
---
libparted/arch/linux.c | 75 ++--
libparted/arch/linux.h |8 +
2 files changed, 36 insertions(+), 47 deletions(-)
---
libparted/arch/linux.c | 34 +-
1 files changed, 33 insertions(+), 1 deletions(-)
diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
index 176e7da..b6070d7 100644
--- a/libparted/arch/linux.c
+++ b/libparted/arch/linux.c
@@ -2521,6 +2521,34 @@ linux
Add ped_device_get_minimal_aligment() and ped_device_get_optimal_aligment()
functions to libparted.
---
include/parted/device.h |8
include/parted/natmath.h |1 +
libparted/device.c | 43 +++
3 files changed, 52 insertions(+), 0 del
Hi,
Me again I forgot one part of my reply:
On 10/28/2009 10:26 PM, Jim Meyering wrote:
@@ -31,6 +31,7 @@ typedef struct _PedAlignment PedAlignment;
#include
#include
+#include
Might as well indent consistently.
This is your mail client playing tricks, all 3 includes are not ind
Hi,
On 10/28/2009 10:26 PM, Jim Meyering wrote:
Hans de Goede wrote:
Note, these patches may apply to master with a couple of lines offset
left and right, as I also have some patches in my local tree to update
parted to keep working with upcoming lvm2 (libdevmapper) changes, I'm still
wa
efore
submitting them.
Regards,
Hans
p.s.
I also plan to backport this set of 5 to libparted-1.9 and add them to the
Fedora packages for F-13.
On 10/28/2009 10:20 PM, Hans de Goede wrote:
Add ped_device_get_minimal_aligment() and ped_device_get_optimal_aligment()
functions to libparted.
---
in
ped_device_get_constraint() was trying to do aligment based on physical
sector / logical sector differences, but this does not take
alignment offset into account. So use ped_device_get_minimal_aligment()
instead.
Note this may seem a regression for arch's which don't implement
ped_device_get_minim
---
libparted/arch/linux.c | 34 +-
1 files changed, 33 insertions(+), 1 deletions(-)
diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
index d261a04..32e8af9 100644
--- a/libparted/arch/linux.c
+++ b/libparted/arch/linux.c
@@ -2521,6 +2521,34 @@ linux
1 - 100 of 111 matches
Mail list logo