Re: [Libguestfs] [PATCH RFC supermin] ext2_initrd: error out if we can't add anything

2016-07-24 Thread Chen Hanxiao
At 2016-07-22 16:41:43, "Richard W.M. Jones" <rjo...@redhat.com> wrote: >On Fri, Jul 22, 2016 at 03:59:58PM +0800, Chen Hanxiao wrote: >> From: Chen Hanxiao <chenhanx...@gmail.com> >> >> If we failed to add something to initrd, just error out. &

[Libguestfs] [PATCH RFC supermin] ext2_initrd: error out if we can't add anything

2016-07-22 Thread Chen Hanxiao
From: Chen Hanxiao <chenhanx...@gmail.com> If we failed to add something to initrd, just error out. Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- src/ext2_initrd.ml | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ext2_initrd.ml b/src/ext2_ini

Re: [Libguestfs] How to debug supermin5 issue?

2016-07-22 Thread Chen Hanxiao
At 2016-07-21 21:17:07, "Richard W.M. Jones" <rjo...@redhat.com> wrote: >On Thu, Jul 21, 2016 at 08:04:05PM +0800, Chen Hanxiao wrote: >> Thanks for your hint. >> I think we got the key: >> >> on the machine fail: >> we lack of lines like

Re: [Libguestfs] How to debug supermin5 issue?

2016-07-21 Thread Chen Hanxiao
At 2016-07-21 19:52:11, "Pino Toscano" <ptosc...@redhat.com> wrote: >On Thursday, 21 July 2016 18:50:52 CEST Chen Hanxiao wrote: >> >> At 2016-07-21 18:43:04, "Richard W.M. Jones" <rjo...@redhat.com> wrote: >> >On Thu, Jul 21, 2016 a

Re: [Libguestfs] How to debug supermin5 issue?

2016-07-21 Thread Chen Hanxiao
At 2016-07-21 19:04:07, "Richard W.M. Jones" <rjo...@redhat.com> wrote: >On Thu, Jul 21, 2016 at 06:50:52PM +0800, Chen Hanxiao wrote: >> >> >> At 2016-07-21 18:43:04, "Richard W.M. Jones" <rjo...@redhat.com> wrote: >> &g

Re: [Libguestfs] How to debug supermin5 issue?

2016-07-21 Thread Chen Hanxiao
At 2016-07-21 17:45:13, "Richard W.M. Jones" <rjo...@redhat.com> wrote: >On Thu, Jul 21, 2016 at 04:54:46PM +0800, Chen Hanxiao wrote: >> >> Hi, Rich: >> >> I met a supermin issue on CentOS 7.1: >> >> supermin: version: 5.1.10

[Libguestfs] [PATCH supermin] supermin: update out-dated comments

2016-07-21 Thread Chen Hanxiao
From: Chen Hanxiao <chenhanx...@gmail.com> ext2initrd.c belongs to supermin4. Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- init/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init/init.c b/init/init.c index 5ac53e9..fa9460d 100644 --- a/init/

[Libguestfs] How to debug supermin5 issue?

2016-07-21 Thread Chen Hanxiao
Hi, Rich: I met a supermin issue on CentOS 7.1: supermin: version: 5.1.10 supermin: rpm: detected RPM version 4.11 supermin: package handler: fedora/rpm supermin: acquiring lock on /root/test/aaa/lock supermin: build: /usr/lib64/guestfs/supermin.d supermin: build: visiting

[Libguestfs] [PATCH] daemon: add a space after func/macro to fit code-style

2015-07-17 Thread Chen Hanxiao
more daemon codes covered Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- daemon/debug.c | 2 +- daemon/devsparts.c | 2 +- daemon/guestfsd.c | 6 +++--- daemon/labels.c| 4 ++-- daemon/ldm.c | 16 daemon/md.c| 10 +- daemon/mkfs.c

Re: [Libguestfs] [PATCH rebase v4 00/11] virt-resize: add support for resizing MBR logical partitions

2015-07-13 Thread Chen, Hanxiao
Hi, Rich -Original Message- From: Richard W.M. Jones [mailto:rjo...@redhat.com] Sent: Saturday, July 11, 2015 1:38 AM To: Chen, Hanxiao/陈 晗霄 Cc: libguestfs@redhat.com Subject: Re: [Libguestfs] [PATCH rebase v4 00/11] virt-resize: add support for resizing MBR logical partitions

[Libguestfs] [PATCH] daemon: add a space after func name to fit code-style

2015-07-12 Thread Chen Hanxiao
Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- daemon/blkid.c | 2 +- daemon/btrfs.c | 28 ++-- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/daemon/blkid.c b/daemon/blkid.c index 1ac42b4..74d2fa6 100644 --- a/daemon/blkid.c +++ b/daemon

Re: [Libguestfs] [PATCH rebase v4 00/11] virt-resize: add support for resizing MBR logical partitions

2015-07-10 Thread Chen, Hanxiao
-Original Message- From: Chen, Hanxiao Sent: Wednesday, July 08, 2015 6:57 PM To: Chen, Hanxiao; libguestfs@redhat.com Subject: RE: [Libguestfs] [PATCH rebase v4 00/11] virt-resize: add support for resizing MBR logical partitions -Original Message- From

Re: [Libguestfs] [PATCH rebase v4 00/11] virt-resize: add support for resizing MBR logical partitions

2015-07-08 Thread Chen, Hanxiao
-Original Message- From: libguestfs-boun...@redhat.com [mailto:libguestfs-boun...@redhat.com] On Behalf Of Chen Hanxiao Sent: Monday, July 06, 2015 6:14 PM To: libguestfs@redhat.com Subject: [Libguestfs] [PATCH rebase v4 00/11] virt-resize: add support for resizing MBR logical

[Libguestfs] [PATCH v2 1/4] labels: move e2label to ext2.c and call it directly

2015-07-08 Thread Chen Hanxiao
ext2 should not call function in labels Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- v2: move e2label codes inside do_set_e2label call do_set_e2label in do_set_label daemon/ext2.c | 23 +-- daemon/labels.c | 24 +--- 2 files changed, 18

[Libguestfs] [PATCH v2 0/4] labels: rework

2015-07-08 Thread Chen Hanxiao
We should use the existing function from specific fs, if not, move it to specific fs files. Chen Hanxiao (4): labels: move e2label to ext2.c and call it directly labels: move ntfslabel to ntfs.c labels: use existing do_xfs_admin for xfslabel labels: return ENOTSUP if could not set label

[Libguestfs] [PATCH v2 2/4] labels: move ntfslabel to ntfs.c

2015-07-08 Thread Chen Hanxiao
Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- daemon/daemon.h | 1 + daemon/labels.c | 22 +- daemon/ntfs.c | 19 +++ 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/daemon/daemon.h b/daemon/daemon.h index 783d739..ade385e

[Libguestfs] [PATCH v2 3/4] labels: use existing do_xfs_admin for xfslabel

2015-07-08 Thread Chen Hanxiao
Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- daemon/daemon.h | 1 + daemon/labels.c | 18 +- daemon/xfs.c| 7 +++ 3 files changed, 9 insertions(+), 17 deletions(-) diff --git a/daemon/daemon.h b/daemon/daemon.h index ade385e..508691a 100644 --- a/daemon

Re: [Libguestfs] [PATCH 0/5] labels: rework

2015-07-08 Thread Chen, Hanxiao
Chen Hanxiao wrote: We should use the existing function from specific fs, if not, move it to specific fs files. Chen Hanxiao (5): label: move btrfslabel to btrfs.c label: move e2label to ext2.c and call it locally label: move ntfslabel to ntfs.c label: use existing

[Libguestfs] [PATCH v2] labels: return ENOTSUP if could not set label for specific fs

2015-07-08 Thread Chen Hanxiao
Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- daemon/labels.c | 6 ++ generator/actions.ml | 4 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/daemon/labels.c b/daemon/labels.c index 57c6e93..130f1db 100644 --- a/daemon/labels.c +++ b/daemon/labels.c

[Libguestfs] [PATCH 0/5] labels: rework

2015-07-07 Thread Chen Hanxiao
We should use the existing function from specific fs, if not, move it to specific fs files. Chen Hanxiao (5): label: move btrfslabel to btrfs.c label: move e2label to ext2.c and call it locally label: move ntfslabel to ntfs.c label: use existing do_xfs_admin for xfslabel labels: return

[Libguestfs] [PATCH 1/5] labels: move btrfslabel to btrfs.c

2015-07-07 Thread Chen Hanxiao
Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- daemon/btrfs.c | 16 daemon/daemon.h | 1 + daemon/labels.c | 19 +-- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/daemon/btrfs.c b/daemon/btrfs.c index 8fcfd81..ee3464d 100644

[Libguestfs] [PATCH 3/5] labels: move ntfslabel to ntfs.c

2015-07-07 Thread Chen Hanxiao
Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- daemon/daemon.h | 1 + daemon/labels.c | 22 +- daemon/ntfs.c | 19 +++ 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/daemon/daemon.h b/daemon/daemon.h index 0731b09..7a4b97f

[Libguestfs] [PATCH 5/5] labels: return ENOTSUP if could not set label for specific fs

2015-07-07 Thread Chen Hanxiao
Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- daemon/labels.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/daemon/labels.c b/daemon/labels.c index 92d339c..a1a2f3b 100644 --- a/daemon/labels.c +++ b/daemon/labels.c @@ -85,11 +85,9 @@ do_set_label (const

[Libguestfs] [PATCH 4/5] labels: use existing do_xfs_admin for xfslabel

2015-07-07 Thread Chen Hanxiao
Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- daemon/daemon.h | 1 + daemon/labels.c | 18 +- daemon/xfs.c| 7 +++ 3 files changed, 9 insertions(+), 17 deletions(-) diff --git a/daemon/daemon.h b/daemon/daemon.h index 7a4b97f..13add6c 100644 --- a/daemon

[Libguestfs] [PATCH rebase v4 01/11] resize: move loop check from find_partitions

2015-07-06 Thread Chen Hanxiao
As logical partitions laid inside extended partition, overlap check will not work. make loop as a individual function, which could do a seperate check on logical/extended partitions. Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- resize/resize.ml | 20 ++-- 1 file

[Libguestfs] [PATCH] doc: add missing ms-dos fs section in set_label

2015-07-06 Thread Chen Hanxiao
Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- generator/actions.ml | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/generator/actions.ml b/generator/actions.ml index 92f80d2..35f30d5 100644 --- a/generator/actions.ml +++ b/generator/actions.ml @@ -9919,7

[Libguestfs] [PATCH rebase v4 04/11] resize: add support for logical partitions for calculate_surplus

2015-07-06 Thread Chen Hanxiao
For it'll duplicate with logical partition, we'll count it later - we need at leat 1 gap between logical partitions. so --aligment=1 will be increased by 1 Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- v3: introduce max_logi_align for calculate_surplus resize/resize.ml | 27

[Libguestfs] [PATCH rebase v4 11/11] resize: test: add support for resizing extended and logical partitions

2015-07-06 Thread Chen Hanxiao
Signed-off-by: Hu Tao hu...@cn.fujitsu.com Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- resize/test-virt-resize.pl | 32 +--- 1 file changed, 5 insertions(+), 27 deletions(-) diff --git a/resize/test-virt-resize.pl b/resize/test-virt-resize.pl index

[Libguestfs] [PATCH rebase v4 10/11] resize: add support resize extended partition

2015-07-06 Thread Chen Hanxiao
Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- resize/resize.ml | 41 - 1 file changed, 28 insertions(+), 13 deletions(-) diff --git a/resize/resize.ml b/resize/resize.ml index 000a4f8..9dfa21e 100644 --- a/resize/resize.ml +++ b/resize

[Libguestfs] [PATCH rebase v4 03/11] resize: calculate max alignment of logical partitions

2015-07-06 Thread Chen Hanxiao
to ensure a successfull parted. Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- resize/resize.ml | 17 + 1 file changed, 17 insertions(+) diff --git a/resize/resize.ml b/resize/resize.ml index f4cc588..7aa1c96 100644 --- a/resize/resize.ml +++ b/resize/resize.ml @@ -820,6

[Libguestfs] [PATCH rebase v4 07/11] resize: calculate_target_partitions for logical partitions

2015-07-06 Thread Chen Hanxiao
Pass gap_start to calculate_target_partitions when calculating logical partitions. Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- resize/resize.ml | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/resize/resize.ml b/resize/resize.ml index 5deaa74

[Libguestfs] [PATCH rebase v4 08/11] resize: parted and copy logical partitions

2015-07-06 Thread Chen Hanxiao
Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- resize/resize.ml | 21 +++-- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/resize/resize.ml b/resize/resize.ml index 7d99b38..b4236ab 100644 --- a/resize/resize.ml +++ b/resize/resize.ml @@ -1258,6

[Libguestfs] [PATCH rebase v4 06/11] resize: add support for logical partitions of calculate_target_partitions

2015-07-06 Thread Chen Hanxiao
and extended partition. We need to remove gap_start from 'OpResize newsize' 2) OpIgnore | OpCopy: If in logical partition, add an extra alignment of 1 sector. Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- resize/resize.ml | 19 +-- 1 file changed, 17

[Libguestfs] [PATCH rebase v4 09/11] resize: more misc ops on logical partition

2015-07-06 Thread Chen Hanxiao
Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- resize/resize.ml | 9 + 1 file changed, 9 insertions(+) diff --git a/resize/resize.ml b/resize/resize.ml index b4236ab..000a4f8 100644 --- a/resize/resize.ml +++ b/resize/resize.ml @@ -1322,6 +1322,7 @@ read the man page virt

[Libguestfs] [PATCH rebase v4 02/11] resize: add logical_partitions and extended_partition

2015-07-06 Thread Chen Hanxiao
- extended_partition one MBR extended partition Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- v3: rewrite partitions/logical_partitions/extended_partition according to Rich and Pino's commnets resize/resize.ml | 44 +--- 1 file changed, 29

[Libguestfs] [PATCH] uuids: return ENOTSUP if could not set UUID for specific fs

2015-07-05 Thread Chen Hanxiao
Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- daemon/uuids.c | 6 ++ generator/actions.ml | 3 +++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/daemon/uuids.c b/daemon/uuids.c index 20eabe3..00c47d8 100644 --- a/daemon/uuids.c +++ b/daemon/uuids.c

[Libguestfs] [PATCH v6] New API: set_uuid_random

2015-07-02 Thread Chen Hanxiao
Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- v6: rename ext_set_e2uuid_random to ext_set_uuid_random improve longdesc of set_uuid_random v5: 1. improve testcases 2. rename set_uuid_random to ext_set_uuid_random 3. drop swap_set_uuid_random, call swap_set_uuid

Re: [Libguestfs] [PATCH v4 1/7] uuid: add support to change uuid of btrfs partition

2015-07-01 Thread Chen, Hanxiao
In data martedì 30 giugno 2015 19:23:08, Chen Hanxiao ha scritto: btrfs-progs v4.1 add support to change uuid of btrfs fs. Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- [...] +# Setting btrfs UUID +eval { +$g-set_uuid (/dev/sda1, 12345678-1234-1234-1234

Re: [Libguestfs] [PATCH v4 0/7] uuid: add btrfs uuid change support and set_uuid_random

2015-07-01 Thread Chen, Hanxiao
and set_uuid_random In data martedì 30 giugno 2015 19:23:07, Chen Hanxiao ha scritto: - Btrfs-progs v4.1 introduced new feature of changing uuid of btrfs partition. This patch add support of this. - Introduce set_uuid_random - uuids.c did a lot of deplicated work for changing uuid of fs. Use

[Libguestfs] [PATCH v5 1/3] uuid: add support to change uuid of btrfs partition

2015-07-01 Thread Chen Hanxiao
btrfs-progs v4.1 add support to change uuid of btrfs fs. Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- v5: use NOT_SUPPORTED macro improve testcases v4: although btrfstune did not had '--help', pass it anyway improve testcases v3: set errno as ENOTSUP when btrfstune -u

[Libguestfs] [PATCH v5 0/3] uuid: add btrfs uuid change support and set_uuid_random

2015-07-01 Thread Chen Hanxiao
: introduce get_random_uuid improve testcases squash internal API patches v3.1: fix typos v3: set errno if feature is not available. Chen Hanxiao (3): uuid: add support to change uuid of btrfs partition uuid: use newly introduced swap_set_uuid New API: set_uuid_random daemon/btrfs.c

[Libguestfs] [PATCH v5 3/3] New API: set_uuid_random

2015-07-01 Thread Chen Hanxiao
Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- v5: 1. improve testcases 2. rename set_uuid_random to ext_set_uuid_random 3. drop swap_set_uuid_random, call swap_set_uuid + get_random_uuid daemon/btrfs.c | 19 +++ daemon/daemon.h

[Libguestfs] [PATCH v5 2/3] uuid: use newly introduced swap_set_uuid

2015-07-01 Thread Chen Hanxiao
Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- v3: move swapuuid to swap.c rename it as swap_set_uuid daemon/daemon.h | 3 +++ daemon/swap.c | 16 daemon/uuids.c | 18 +- 3 files changed, 20 insertions(+), 17 deletions(-) diff --git a/daemon

[Libguestfs] [PATCH] tests: fix two minor warnings

2015-06-30 Thread Chen Hanxiao
my variable $output masks earlier declaration in same scope at /home/libguestfs/tests/daemon/test-btrfs.pl line 66. my variable @r masks earlier declaration in same scope at /home/libguestfs/tests/daemon/test-btrfs.pl line 72. Also remove some redundant whitespace. Signed-off-by: Chen Hanxiao

[Libguestfs] [PATCH v4 5/7] daemon: add get_random_uuid

2015-06-30 Thread Chen Hanxiao
Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- appliance/packagelist.in | 1 + daemon/daemon.h | 2 ++ daemon/guestfsd.c| 19 +++ 3 files changed, 22 insertions(+) diff --git a/appliance/packagelist.in b/appliance/packagelist.in index 76c7293

[Libguestfs] [PATCH v4 3/7] uuid: use newly introduced xfs_set_uuid of xfs

2015-06-30 Thread Chen Hanxiao
Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- v3: rename do_xfs_admin_uuid to xfs_set_uuid daemon/daemon.h | 1 + daemon/uuids.c | 12 +--- daemon/xfs.c| 7 +++ 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/daemon/daemon.h b/daemon/daemon.h index

[Libguestfs] [PATCH v4 1/7] uuid: add support to change uuid of btrfs partition

2015-06-30 Thread Chen Hanxiao
btrfs-progs v4.1 add support to change uuid of btrfs fs. Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- v4: although btrfstune did not had '--help', pass it anyway improve testcases v3: set errno as ENOTSUP when btrfstune -u is not available v2: put btrfs operation back to daemon

[Libguestfs] [PATCH v4 2/7] uuid: use existing function of ext2

2015-06-30 Thread Chen Hanxiao
Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- v3: improve commit log daemon/uuids.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/daemon/uuids.c b/daemon/uuids.c index f98d8e5..b8b820a 100644 --- a/daemon/uuids.c +++ b/daemon/uuids.c @@ -27,16

[Libguestfs] [PATCH v4 6/7] daemon: add functions for setting random uuid of fs

2015-06-30 Thread Chen Hanxiao
Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- daemon/btrfs.c | 21 + daemon/daemon.h | 4 daemon/ext2.c | 15 +++ daemon/swap.c | 13 + daemon/xfs.c| 7 +++ 5 files changed, 60 insertions(+) diff --git a/daemon/btrfs.c

[Libguestfs] [PATCH v4 0/7] uuid: add btrfs uuid change support and set_uuid_random

2015-06-30 Thread Chen Hanxiao
internal API patches v3.1: fix typos v3: set errno if feature is not available. Chen Hanxiao (7): uuid: add support to change uuid of btrfs partition uuid: use existing function of ext2 uuid: use newly introduced xfs_set_uuid of xfs uuid: use newly introduced swap_set_uuid daemon: add

[Libguestfs] [PATCH v4 4/7] uuid: use newly introduced swap_set_uuid

2015-06-30 Thread Chen Hanxiao
Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- v3: move swapuuid to swap.c rename it as swap_set_uuid daemon/daemon.h | 3 +++ daemon/swap.c | 16 daemon/uuids.c | 18 +- 3 files changed, 20 insertions(+), 17 deletions(-) diff --git a/daemon

[Libguestfs] [PATCH v4 7/7] New API: set_uuid_random

2015-06-30 Thread Chen Hanxiao
Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- daemon/uuids.c | 31 +++ generator/actions.ml | 16 src/MAX_PROC_NR| 2 +- tests/btrfs/test-btrfs-misc.pl | 15 +++ 4 files changed, 63

Re: [Libguestfs] [PATCH v4 00/11] virt-resize: add support for resizing MBR logical partitions

2015-06-29 Thread Chen, Hanxiao
Hi, -Original Message- From: Richard W.M. Jones [mailto:rjo...@redhat.com] Sent: Friday, June 26, 2015 1:44 AM To: Chen, Hanxiao/陈 晗霄 Cc: libguestfs@redhat.com Subject: Re: [Libguestfs] [PATCH v4 00/11] virt-resize: add support for resizing MBR logical partitions On Wed, Jun

Re: [Libguestfs] [PATCH v3.1 1/9] uuid: add support to change uuid of btrfs partition

2015-06-29 Thread Chen, Hanxiao
In data lunedì 29 giugno 2015 02:36:57, Chen, Hanxiao ha scritto: -Original Message- From: libguestfs-boun...@redhat.com [mailto:libguestfs-boun...@redhat.com] On Behalf Of Pino Toscano Sent: Friday, June 26, 2015 8:12 PM To: libguestfs@redhat.com Subject: Re

Re: [Libguestfs] [PATCH v3.1 1/9] uuid: add support to change uuid of btrfs partition

2015-06-28 Thread Chen, Hanxiao
In data venerdì 26 giugno 2015 17:35:36, Chen Hanxiao ha scritto: btrfs-progs v4.1 add support to change uuid of btrfs fs. Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- v3.1: fix a typo v3: set errno as ENOTSUP when btrfstune -u is not available v2: put btrfs operation

Re: [Libguestfs] [PATCH v3.1 7/9] New API: swap_set_uuid_random

2015-06-28 Thread Chen, Hanxiao
giugno 2015 17:35:42, Chen Hanxiao ha scritto: Also introduce get_random_uuid() Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- daemon/daemon.h | 2 ++ daemon/swap.c | 32 2 files changed, 34 insertions(+) diff --git a/daemon/daemon.h b

Re: [Libguestfs] [PATCH v3.1 0/9] uuid: add btrfs uuid change support and set_uuid_random

2015-06-28 Thread Chen, Hanxiao
and set_uuid_random In data venerdì 26 giugno 2015 17:35:35, Chen Hanxiao ha scritto: - Btrfs-progs v4.1 introduced new feature of changing uuid of btrfs partition. This patch add support of this. - Introduce set_uuid_random - uuids.c did a lot of deplicated work for changing uuid of fs. Use

[Libguestfs] [PATCH v3 1/4] uuid: add support to change uuid of btrfs partition

2015-06-26 Thread Chen Hanxiao
btrfs-progs v4.1 add support to change uuid of btrfs fs. Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- v3: set errno as ENOTSUP when btrfstune -u is not available v2: put btrfs operation back to daemon/btrfs.c move tests to tests/btrfs daemon/btrfs.c | 60

[Libguestfs] [PATCH v3 0/4] uuid: add btrfs uuid change support and some rework

2015-06-26 Thread Chen Hanxiao
- Btrfs-progs v4.1 introduced new feature of changing uuid of btrfs partition. This patch add support of this. - uuids.c did a lot of deplicated work for changing uuid of fs. Use existing functions. v3: set errno if feature is not available. Chen Hanxiao (4): uuid: add support to change

[Libguestfs] [PATCH v3 3/4] uuid: use newly introduced xfs_set_uuid of xfs

2015-06-26 Thread Chen Hanxiao
Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- v3: rename do_xfs_admin_uuid to xfs_set_uuid daemon/daemon.h | 1 + daemon/uuids.c | 12 +--- daemon/xfs.c| 7 +++ 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/daemon/daemon.h b/daemon/daemon.h index

[Libguestfs] [PATCH v3 2/4] uuid: use existing function of ext2

2015-06-26 Thread Chen Hanxiao
Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- v3: improve commit log daemon/uuids.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/daemon/uuids.c b/daemon/uuids.c index f98d8e5..b8b820a 100644 --- a/daemon/uuids.c +++ b/daemon/uuids.c @@ -27,16

[Libguestfs] [PATCH v3 4/4] uuid: use newly introduced swap_set_uuid

2015-06-26 Thread Chen Hanxiao
Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- v3: move swapuuid to swap.c rename it as swap_set_uuid daemon/daemon.h | 3 +++ daemon/swap.c | 16 daemon/uuids.c | 18 +- 3 files changed, 20 insertions(+), 17 deletions(-) diff --git a/daemon

[Libguestfs] [PATCH v3.1 0/9] uuid: add btrfs uuid change support and set_uuid_random

2015-06-26 Thread Chen Hanxiao
. Chen Hanxiao (9): uuid: add support to change uuid of btrfs partition uuid: use existing function of ext2 uuid: use newly introduced xfs_set_uuid of xfs uuid: use newly introduced swap_set_uuid New API: btrfs_set_uuid_random New API: set_e2uuid_random New API: swap_set_uuid_random New

[Libguestfs] [PATCH v3.1 7/9] New API: swap_set_uuid_random

2015-06-26 Thread Chen Hanxiao
Also introduce get_random_uuid() Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- daemon/daemon.h | 2 ++ daemon/swap.c | 32 2 files changed, 34 insertions(+) diff --git a/daemon/daemon.h b/daemon/daemon.h index 9c8476c..6c07c6a 100644 --- a/daemon

[Libguestfs] [PATCH v3.1 9/9] New API: set_uuid_random

2015-06-26 Thread Chen Hanxiao
Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- daemon/uuids.c | 31 +++ generator/actions.ml | 16 src/MAX_PROC_NR| 2 +- tests/btrfs/test-btrfs-misc.pl | 11 +++ 4 files changed, 59

[Libguestfs] [PATCH v3.1 3/9] uuid: use newly introduced xfs_set_uuid of xfs

2015-06-26 Thread Chen Hanxiao
Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- v3: rename do_xfs_admin_uuid to xfs_set_uuid daemon/daemon.h | 1 + daemon/uuids.c | 12 +--- daemon/xfs.c| 7 +++ 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/daemon/daemon.h b/daemon/daemon.h index

[Libguestfs] [PATCH v3.1 5/9] New API: btrfs_set_uuid_random

2015-06-26 Thread Chen Hanxiao
Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- daemon/btrfs.c | 21 + daemon/daemon.h | 1 + 2 files changed, 22 insertions(+) diff --git a/daemon/btrfs.c b/daemon/btrfs.c index a69c512..a3f3590 100644 --- a/daemon/btrfs.c +++ b/daemon/btrfs.c @@ -867,6 +867,27

Re: [Libguestfs] [PATCH v3 0/4] uuid: add btrfs uuid change support and some rework

2015-06-26 Thread Chen, Hanxiao
Hi, I found some typos in this series. I'll resend v3.1 soon with set_uuid_random feature. Please ignore this series. Regards, - Chen -Original Message- From: libguestfs-boun...@redhat.com [mailto:libguestfs-boun...@redhat.com] On Behalf Of Chen Hanxiao Sent: Friday, June 26, 2015

[Libguestfs] [PATCH v3.1 6/9] New API: set_e2uuid_random

2015-06-26 Thread Chen Hanxiao
Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- daemon/daemon.h | 1 + daemon/ext2.c | 15 +++ 2 files changed, 16 insertions(+) diff --git a/daemon/daemon.h b/daemon/daemon.h index 5087327..9c8476c 100644 --- a/daemon/daemon.h +++ b/daemon/daemon.h @@ -219,6 +219,7

[Libguestfs] [PATCH v3.1 8/9] New API: xfs_set_uuid_random

2015-06-26 Thread Chen Hanxiao
Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- daemon/daemon.h | 1 + daemon/xfs.c| 7 +++ 2 files changed, 8 insertions(+) diff --git a/daemon/daemon.h b/daemon/daemon.h index 6c07c6a..6d98eb9 100644 --- a/daemon/daemon.h +++ b/daemon/daemon.h @@ -262,6 +262,7 @@ extern int

[Libguestfs] [PATCH v3.1 2/9] uuid: use existing function of ext2

2015-06-26 Thread Chen Hanxiao
Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- v3: improve commit log daemon/uuids.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/daemon/uuids.c b/daemon/uuids.c index f98d8e5..b8b820a 100644 --- a/daemon/uuids.c +++ b/daemon/uuids.c @@ -27,16

Re: [Libguestfs] [PATCH v2 1/5] uuid: add support to change uuid of btrfs partition

2015-06-25 Thread Chen, Hanxiao
partition In data mercoledì 24 giugno 2015 15:54:03, Chen Hanxiao ha scritto: btrfs-progs v4.1 add support to change uuid of btrfs fs. Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- v2: put btrfs operation back to daemon/btrfs.c move tests to tests/btrfs daemon

[Libguestfs] [PATCH v2 1/5] uuid: add support to change uuid of btrfs partition

2015-06-24 Thread Chen Hanxiao
btrfs-progs v4.1 add support to change uuid of btrfs fs. Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- v2: put btrfs operation back to daemon/btrfs.c move tests to tests/btrfs daemon/btrfs.c | 60 ++ daemon/daemon.h

[Libguestfs] [PATCH 0/5] uuid: add btrfs uuid change support and some rework

2015-06-24 Thread Chen Hanxiao
- Btrfs-progs v4.1 introduced new feature of changing uuid of btrfs partition. This patch add support of this. - uuids.c did a lot of deplicated work for changing uuid of fs. Use existed functions. -- Introduce new API: btrfstune_set_uuid_random Chen Hanxiao (5): uuid: add support

[Libguestfs] [PATCH 2/5] uuid: use existed function of ext2

2015-06-24 Thread Chen Hanxiao
Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- daemon/daemon.h | 1 + daemon/uuids.c | 12 +--- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/daemon/daemon.h b/daemon/daemon.h index ee0c96f..eeb4ff7 100644 --- a/daemon/daemon.h +++ b/daemon/daemon.h

[Libguestfs] [PATCH 4/5] uuid: use existed do_mkswap_U

2015-06-24 Thread Chen Hanxiao
Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- daemon/daemon.h | 3 +++ daemon/uuids.c | 13 + 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/daemon/daemon.h b/daemon/daemon.h index aba6ef2..c887cfd 100644 --- a/daemon/daemon.h +++ b/daemon/daemon.h

Re: [Libguestfs] [PATCH v4 00/11] virt-resize: add support for resizing MBR logical partitions

2015-06-23 Thread Chen, Hanxiao
ping -Original Message- From: libguestfs-boun...@redhat.com [mailto:libguestfs-boun...@redhat.com] On Behalf Of Chen Hanxiao Sent: Wednesday, June 17, 2015 5:46 PM To: libguestfs@redhat.com Subject: [Libguestfs] [PATCH v4 00/11] virt-resize: add support for resizing MBR logical

[Libguestfs] [PATCH] btrfs: remove redundant whitespace

2015-06-23 Thread Chen Hanxiao
s/ =/ = Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- daemon/btrfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon/btrfs.c b/daemon/btrfs.c index 8b5779a..306cade 100644 --- a/daemon/btrfs.c +++ b/daemon/btrfs.c @@ -512,7 +512,7

[Libguestfs] [PATCH] uuid: add support to change uuid of btrfs partition

2015-06-23 Thread Chen Hanxiao
btrfs-progs v4.1 add support to change uuid of btrfs fs. Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- daemon/uuids.c | 19 +-- generator/actions.ml | 4 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/daemon/uuids.c b/daemon/uuids.c index

Re: [Libguestfs] [PATCH] uuid: add support to change uuid of btrfs partition

2015-06-23 Thread Chen, Hanxiao
, In data martedì 23 giugno 2015 15:59:19, Chen Hanxiao ha scritto: btrfs-progs v4.1 add support to change uuid of btrfs fs. This needs to support older btrfs-progs versions though, so run btrfstune to check whether it has the -U parameter, and if not return the old error message. Something like

[Libguestfs] [PATCH] error log: keep more calloc and its error messages match

2015-06-18 Thread Chen Hanxiao
Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- cat/cat.c | 4 ++-- cat/ls.c | 4 ++-- daemon/md.c | 2 +- daemon/stat.c | 2 +- daemon/xattr.c| 2 +- df/main.c | 4 ++-- edit/edit.c | 4 ++-- fish/fish.c

Re: [Libguestfs] [PATCH v4 2/3] do_btrfs_subvolume_list: fix a bad return value

2015-06-18 Thread Chen, Hanxiao
Hi, -Original Message- From: libguestfs-boun...@redhat.com [mailto:libguestfs-boun...@redhat.com] On Behalf Of Pino Toscano Sent: Thursday, June 18, 2015 4:32 PM To: libguestfs@redhat.com Subject: Re: [Libguestfs] [PATCH v4 2/3] do_btrfs_subvolume_list: fix a bad return value

Re: [Libguestfs] [PATCH v4 2/3] do_btrfs_subvolume_list: fix a bad return value

2015-06-17 Thread Chen, Hanxiao
value On Wednesday 17 June 2015 16:19:32 Chen Hanxiao wrote: don't return a value which is to be freed. v4: use strndup v3: v3: fix test case failure Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- daemon/btrfs.c | 26 +- 1 file changed, 17

Re: [Libguestfs] [PATCH v4 1/3] do_btrfs_qgroup_show: fix a bad return value

2015-06-17 Thread Chen, Hanxiao
On Wednesday 17 June 2015 16:19:31 Chen Hanxiao wrote: We should not use tmp lines buffer as return value, for lines buffer will be freed. s/tmp/temporary/ Fine. Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- v4: take advantage of sscanf's '%m'. v3: fix test case failure

[Libguestfs] [PATCH v4 2/3] do_btrfs_subvolume_list: fix a bad return value

2015-06-17 Thread Chen Hanxiao
don't return a value which is to be freed. v4: use strndup v3: v3: fix test case failure Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- daemon/btrfs.c | 26 +- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/daemon/btrfs.c b/daemon/btrfs.c index

[Libguestfs] [PATCH v4 0/3] btrfs: use CLEANUP_FREE_STRING_LIST for list free

2015-06-17 Thread Chen Hanxiao
As Pino's comment, we should take advantage of macro CLEANUP_FREE_STRING_LIST v4: remove some redundant strdup v3: fix test case failure v2: properly initialize lines Chen Hanxiao (3): do_btrfs_qgroup_show: fix a bad return value do_btrfs_subvolume_list: fix a bad return value btrfs: use

[Libguestfs] [PATCH v4 1/3] do_btrfs_qgroup_show: fix a bad return value

2015-06-17 Thread Chen Hanxiao
We should not use tmp lines buffer as return value, for lines buffer will be freed. Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- v4: take advantage of sscanf's '%m'. v3: fix test case failure daemon/btrfs.c | 40 ++-- 1 file changed, 18

[Libguestfs] [PATCH v4 02/11] resize: add logical_partitions and extended_partition

2015-06-17 Thread Chen Hanxiao
- extended_partition one MBR extended partition Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- v3: rewrite partitions/logical_partitions/extended_partition according to Rich and Pino's commnets resize/resize.ml | 44 +--- 1 file changed, 29

[Libguestfs] [PATCH v4 00/11] virt-resize: add support for resizing MBR logical partitions

2015-06-17 Thread Chen Hanxiao
patches by Hu Tao at: https://www.redhat.com/archives/libguestfs/2014-October/msg00238.html Chen Hanxiao (11): resize: move loop check from find_partitions resize: add logical_partitions and extended_partition resize: calculate max alignment of logical partitions resize: add support for logical

[Libguestfs] [PATCH v4 05/11] resize: handle resize of logical partitions

2015-06-17 Thread Chen Hanxiao
This will re-calculate the size of logical partitions. and take logical partitions' aligment into account. If needed, update extended partition's OpResize. Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- resize/resize.ml | 31 +++ 1 file changed, 31

[Libguestfs] [PATCH v4 03/11] resize: calculate max alignment of logical partitions

2015-06-17 Thread Chen Hanxiao
to ensure a successfull parted. Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- resize/resize.ml | 17 + 1 file changed, 17 insertions(+) diff --git a/resize/resize.ml b/resize/resize.ml index f4cc588..7aa1c96 100644 --- a/resize/resize.ml +++ b/resize/resize.ml @@ -820,6

[Libguestfs] [PATCH v4 11/11] resize: test: add support for resizing extended and logical partitions

2015-06-17 Thread Chen Hanxiao
Signed-off-by: Hu Tao hu...@cn.fujitsu.com Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- resize/test-virt-resize.pl | 32 +--- 1 file changed, 5 insertions(+), 27 deletions(-) diff --git a/resize/test-virt-resize.pl b/resize/test-virt-resize.pl index

Re: [Libguestfs] [PATCH] btrfs: keep calloc and its error message match

2015-06-17 Thread Chen, Hanxiao
On Wednesday 17 June 2015 10:44:09 Chen Hanxiao wrote: commit 3f4ba2e98d21746723d291939ccc2e1f1526aa6d left some error messages unchanged. That commit was about converting a couple of malloc+memset to calloc, not about replacing messages in other parts. Hence, this note is wrong. Thanks for your

[Libguestfs] [PATCH v4 10/11] resize: add support resize extended partition

2015-06-17 Thread Chen Hanxiao
Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- resize/resize.ml | 41 - 1 file changed, 28 insertions(+), 13 deletions(-) diff --git a/resize/resize.ml b/resize/resize.ml index 000a4f8..9dfa21e 100644 --- a/resize/resize.ml +++ b/resize

[Libguestfs] [PATCH v4 06/11] resize: add support for logical partitions of calculate_target_partitions

2015-06-17 Thread Chen Hanxiao
and extended partition. We need to remove gap_start from 'OpResize newsize' 2) OpIgnore | OpCopy: If in logical partition, add an extra alignment of 1 sector. Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- resize/resize.ml | 19 +-- 1 file changed, 17

[Libguestfs] [PATCH v4 01/11] resize: move loop check from find_partitions

2015-06-17 Thread Chen Hanxiao
As logical partitions laid inside extended partition, overlap check will not work. make loop as a individual function, which could do a seperate check on logical/extended partitions. Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- resize/resize.ml | 20 ++-- 1 file

[Libguestfs] [PATCH v4 08/11] resize: parted and copy logical partitions

2015-06-17 Thread Chen Hanxiao
Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- resize/resize.ml | 21 +++-- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/resize/resize.ml b/resize/resize.ml index 7d99b38..b4236ab 100644 --- a/resize/resize.ml +++ b/resize/resize.ml @@ -1258,6

[Libguestfs] [PATCH v4 09/11] resize: more misc ops on logical partition

2015-06-17 Thread Chen Hanxiao
Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- resize/resize.ml | 9 + 1 file changed, 9 insertions(+) diff --git a/resize/resize.ml b/resize/resize.ml index b4236ab..000a4f8 100644 --- a/resize/resize.ml +++ b/resize/resize.ml @@ -1322,6 +1322,7 @@ read the man page virt

[Libguestfs] [PATCH v4 04/11] resize: add support for logical partitions for calculate_surplus

2015-06-17 Thread Chen Hanxiao
For it'll duplicate with logical partition, we'll count it later - we need at leat 1 gap between logical partitions. so --aligment=1 will be increased by 1 Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- v3: introduce max_logi_align for calculate_surplus resize/resize.ml | 27

[Libguestfs] [PATCH] btrfs: keep calloc and its error message match

2015-06-16 Thread Chen Hanxiao
commit 3f4ba2e98d21746723d291939ccc2e1f1526aa6d left some error messages unchanged. Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- daemon/btrfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon/btrfs.c b/daemon/btrfs.c index 7b14bac..e8059db 100644

  1   2   3   >