search for: partition_id

Displaying 20 results from an estimated 34 matches for "partition_id".

2020 Sep 15
0
[PATCH RFC v1 09/18] x86/hyperv: provide a bunch of helper functions
...IN(a, b) ((a) < (b) ? (a) : (b)) Nit: include/linux/kernel.h defines min() and max() macros with type checking. > + > +/* > + * Deposits exact number of pages > + * Must be called with interrupts enabled > + * Max 256 pages > + */ > +int hv_call_deposit_pages(int node, u64 partition_id, u32 num_pages) > +{ > + struct page **pages; > + int *counts; > + int num_allocations; > + int i, j, page_count; > + int order; > + int desired_order; > + int status; > + int ret; > + u64 base_pfn; > + struct hv_deposit_memory *input_page; > + unsigned long flag...
2014 Feb 03
0
Re: [PATCH] resize: properly restore GPT partition types
...tf "0x%x" i > + | None, Some i -> i > + | Some _, Some _ -> > + (* This should not happen. *) > + assert false You can actually make it not happen by having a clearer type. I believe something along these lines should work: type partition = { ... p_partition_id : partition_id; ... } and partition_id = No_ID | MBR_ID of int | GPT_ID of string > + match parttype with > + | GPT -> > + (match p.p_gpt_type with > + | None -> () > + | Some gpt_type -> > + g#part_set_gpt_type "/dev/sdb&qu...
2014 Feb 03
2
[PATCH] resize: properly restore GPT partition types
If there is a GPT partition layout, then what should be read and restored for each partition is the GPT type and not the MBR ID. Related to RHBZ#1060404. --- resize/resize.ml | 46 +++++++++++++++++++++++++++++++++++----------- 1 file changed, 35 insertions(+), 11 deletions(-) diff --git a/resize/resize.ml b/resize/resize.ml index 8683df7..a2670e5 100644 --- a/resize/resize.ml +++
2020 Sep 15
0
[PATCH RFC v1 07/18] x86/hyperv: extract partition ID from Microsoft Hypervisor if necessary
...a/arch/x86/hyperv/hv_init.c b/arch/x86/hyperv/hv_init.c > index ebba4be4185d..0eec1ed32023 100644 > --- a/arch/x86/hyperv/hv_init.c > +++ b/arch/x86/hyperv/hv_init.c > @@ -30,6 +30,9 @@ > bool hv_root_partition; > EXPORT_SYMBOL_GPL(hv_root_partition); > > +u64 hv_current_partition_id; > +EXPORT_SYMBOL_GPL(hv_current_partition_id); > + > void *hv_hypercall_pg; > EXPORT_SYMBOL_GPL(hv_hypercall_pg); > > @@ -345,6 +348,26 @@ static struct syscore_ops hv_syscore_ops = { > .resume = hv_resume, > }; > > +void __init hv_get_partition_id(void) &gt...
2014 Sep 19
1
Re: [PATCH v2 08/13] resize: add function mbr_part_type
...; resize/resize.ml | 12 +++++++++--- > 1 file changed, 9 insertions(+), 3 deletions(-) > > diff --git a/resize/resize.ml b/resize/resize.ml > index 2ffd26e..f57b2ff 100644 > --- a/resize/resize.ml > +++ b/resize/resize.ml > @@ -50,6 +50,7 @@ type partition = { > p_id : partition_id; (* Partition (MBR/GPT) ID. *) > p_type : partition_content; (* Content type and content size. *) > p_label : string option; (* Label/name. *) > + p_part_num: int; (* partition number *) I don't think it's necessary to store p_part_num in th...
2019 Jan 20
1
[PATCH nbdkit] partitioning: Support MBR logical partitions.
An evolution of the patch I posted yesterday to qemu-devel (https://www.mail-archive.com/qemu-devel@nongnu.org/msg588920.html) which (a) works and (b) has a test. Rich.
2009 May 01
4
How do I resize a Physical Partition in a Dom U that''s "on" a Logical Volume in the Dom 0?
Hey all, I''m trying to figure out how to re-size physical partitions in the Dom U. I''ve read up what I can find on line and finally decided to have Logical Volumes in the Dom 0 and pass them as physical volumes for use in the Dom U. Here''s an example of what I''m doing. To start in the Dom 0 I created the LV''s with lvcreate -n guest_boot -L 100M
2014 Feb 04
0
[PATCH 3/3] resize: preserve GPT partition names (RHBZ#1060404).
...9 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/resize/resize.ml b/resize/resize.ml index 191be83..c1794ed 100644 --- a/resize/resize.ml +++ b/resize/resize.ml @@ -49,6 +49,7 @@ type partition = { p_bootable : bool; (* Is it bootable? *) p_id : partition_id; (* Partition (MBR/GPT) ID. *) p_type : partition_content; (* Content type and content size. *) + p_label : string option; (* Label/name. *) (* What we're going to do: *) mutable p_operation : partition_operation; @@ -84,7 +85,12 @@ let rec debug_partition p =...
2014 Sep 22
0
[PATCH v3 6/7] resize: add partition type LogicalPartition
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com> --- resize/resize.ml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/resize/resize.ml b/resize/resize.ml index c56a91a..3f804a0 100644 --- a/resize/resize.ml +++ b/resize/resize.ml @@ -75,6 +75,7 @@ and partition_id = type partition_type = | PrimaryPartition + | LogicalPartition let rec debug_partition p = eprintf "%s:\n" p.p_name; @@ -449,13 +450,15 @@ read the man page virt-resize(1). let find_partitions part_type = let parts = Array.to_list (g#part_list "/dev/sda") i...
2014 Sep 26
0
[PATCH v4 1/7] resize: add function find_partitions
...igned-off-by: Hu Tao <hutao@cn.fujitsu.com> --- resize/resize.ml | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/resize/resize.ml b/resize/resize.ml index 81bb270..cfd02fc 100644 --- a/resize/resize.ml +++ b/resize/resize.ml @@ -73,6 +73,9 @@ and partition_id = | MBR_ID of int (* MBR ID. *) | GPT_Type of string (* GPT UUID. *) +type partition_type = + | PrimaryPartition + let rec debug_partition p = eprintf "%s:\n" p.p_name; eprintf "\tpartition data: %ld %Ld-%Ld (%Ld bytes)\n" @@ -443,14 +446...
2014 Oct 08
0
[PATCH V5 1/4] resize: add partition type LogicalPartition
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com> --- resize/resize.ml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/resize/resize.ml b/resize/resize.ml index 2090675..cc76aa0 100644 --- a/resize/resize.ml +++ b/resize/resize.ml @@ -75,6 +75,7 @@ and partition_id = type partition_type = | PrimaryPartition + | LogicalPartition let rec debug_partition p = eprintf "%s:\n" p.p_name; @@ -449,13 +450,15 @@ read the man page virt-resize(1). let find_partitions part_type = let parts = Array.to_list (g#part_list "/dev/sda") i...
2014 Feb 04
6
[PATCH 0/3] virt-resize: preserve GPT partitions label
Hi, attached there are few patches to implement a way to get the label of GPT partitions (refactoring an existing function and adding a new daemon API) and using it in virt-resize to restore them when copying partitions. Thanks, Pino Toscano (3): daemon: parted: refactor sgdisk info parsing code New API: part-get-name (RHBZ#593511). resize: preserve GPT partition names (RHBZ#1060404).
2018 Sep 17
0
[PATCH nbdkit v3 3/3] Add partitioning plugin.
...wn limit (2^32 sectors) and an estimate based on the amount of + * padding between partitions. + */ +#define MAX_MBR_DISK_SIZE (UINT32_MAX * SECTOR_SIZE - 5 * ALIGNMENT) + +#define GPT_PT_ENTRY_SIZE 128 + +/* XXX Make these configurable in future? */ +#define ALIGNMENT (2048 * SECTOR_SIZE) +#define PARTITION_ID 0x83 +#define PARTITION_GUID "\xaf\x3d\xc6\x0f\x83\x84\x72\x47\x8e\x79\x3d\x69\xd8\x47\x7d\xe4" + +/* Files supplied on the command line. */ +struct file { + const char *filename; /* file= supplied on the command line */ + int fd; + struct stat statbuf; + char guid[16];...
2015 Mar 30
1
[PATCH RFC] resize: add p_mbr_p_type as member of type partition
...TARGET partition start (sector num). *) p_target_end : int64; (* TARGET partition end (sector num). *) + p_mbr_p_type : partition_type (* Partiton Type (master/extended/logical) *) } and partition_content = | ContentUnknown (* undetermined *) @@ -73,9 +74,11 @@ and partition_id = | No_ID (* No identifier. *) | MBR_ID of int (* MBR ID. *) | GPT_Type of string (* GPT UUID. *) - -type partition_type = +and partition_type = | PrimaryPartition + | ExtendedPartition + | LogicalPartition + | NoTypePartition let re...
2014 Sep 22
13
[PATCH v3 0/7] add support to resize MBR logical partitions
Hi Rich, This is v3 series to add support for resizing MBR logical partitions. changes to v2: 1. remove p_part_num 2. remove filter_parts 3. name the function calculate_target_partitions 4. remove the code to restart guest introduced in v2 changes to v1: 1. spit the patches so it's easier to review 2. fix the parted error caused by unaligned logical partitions 3. extend the
2018 Sep 17
4
[PATCH nbdkit 0/3] Add partitioning plugin.
nbdkit partitioning boot.img swap.img root.img ... creates a virtual disk by adding a partition table. In ancient times Xen used to do this. Rich.
2014 Sep 19
22
[PATCH v2 00/13] virt-resize: add support for resizing MBR logical partitions
Hi Rich, This is v2 series to add support for resizing MBR logical partitions. I found the reason of problem in v1 that parted reports error when adding logical partitions, is that logical partitions are not aligned to 2 sectors. This problem doesn't appear in v2. This is for early review, because of: 1. I'm not sure the splitting of patches is appropriate or not, but it's much
2018 Sep 17
7
[PATCH nbdkit v3 0/3] Add partitioning plugin.
The partitioning plugin patch is the same (except for rebasing). However I have changed the first two patches based on feedback received. In particular this fixes a very serious bug found by Eric Blake in the current truncate filter. Rich.
2019 Jan 02
0
[PATCH nbdkit v2 1/2] Annotate internal function parameters with attribute((nonnull)).
...PT layouts. These are * published here because the GPT code calls into the MBR code, but * are not meant to be called from the main plugin. */ -extern void create_mbr_partition_table (unsigned char *out); -extern void create_mbr_partition_table_entry (const struct region *, int bootable, int partition_id, unsigned char *); +extern void create_mbr_partition_table (unsigned char *out) + __attribute__((__nonnull__ (1))); +extern void create_mbr_partition_table_entry (const struct region *, + int bootable, int partition_id, +...
2015 Feb 05
5
resize: Preserve GPT GUID so we don't break EFI bootloaders (RHBZ#1189284)
virt-resize didn't preserve the per-partition GPT GUID. Now that guests using UEFI are becoming common (basically it's the default on aarch64) we need to take into account that sometimes the partition GUID is used by the bootloader NVRAM variables to identify the boot partition, so it must be preserved across resize. This bug caused the 'virt-builder --size' option to fail on