On Sun, Oct 09, 2016 at 05:17:27PM +0800, Xu Tian wrote:
> If backing file can not open when do qemu-img rebase, var 'ret' not
> assign a no-zero value, qemu-img process go out with exit code zero.
>
> Signed-off-by: Xu Tian
> ---
> qemu-img.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff
The subcommand dd was creating an output image regardless of whether there
was one already created. With this patch we try to check first if the output
image exists and resize it if necessary.
Signed-off-by: Reda Sallahi
---
qemu-img.c | 124
Previously img_open() always printed file opening errors even if the intended
action is just to check the file existence as is sometimes the case in
qemu-img dd.
This adds an argument (openerror) to img_open() that specifies whether to print
an opening error or not.
Signed-off-by: Reda Sallahi
The patch series include the previously submitted patch:
[PATCH v5] qemu-img: change opening method for the output in dd
Changes from v5:
* Replace access() with a modified version of img_open() in img_dd()
Depends on:
[PATCH v3] qemu-img: add conv=notrunc option to dd
Reda Sallahi (2):
qemu
block_count is not used in img_dd() and the C_SKIP check is unecessary so
this patch removes both of them.
Signed-off-by: Reda Sallahi
Reviewed-by: Stefan Hajnoczi
---
qemu-img.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/qemu-img.c b/qemu-img.c
index a4d0556
This patch adds the seek option which allows qemu-img dd to skip a number of
blocks on the output before copying the input.
A test case was added to test the seek option.
Signed-off-by: Reda Sallahi
Reviewed-by: Stefan Hajnoczi
---
qemu-img-cmds.hx | 4 +--
qemu-img.c
counterparts on GNU dd(1).
Two tests were added to test iflag and oflag.
Signed-off-by: Reda Sallahi
---
qemu-img-cmds.hx | 4 +-
qemu-img.c | 172 +++--
qemu-img.texi | 32 +++--
tests/qemu-iotests/163
The dd section on qemu-img --help was a bit hard to read since it was not
well aligned. This patch fixes the display problem and also makes the
sentences on the .texi file more consistent with one another (uppercase and
conjugasion).
Signed-off-by: Reda Sallahi
Reviewed-by: Stefan Hajnoczi
common part in img_dd_iflag(), img_dd_oflag() and img_dd_conv()
into a new function img_dd_flag().
Reda Sallahi (7):
qemu-img: add seek option to dd
qemu-img: add iflag and oflag options to dd
qemu-img: add more conv= conversions to dd
qemu-img: delete not used variable and an unecessary
respectively.
A test case was added to test the status option.
Signed-off-by: Reda Sallahi
---
qemu-img-cmds.hx | 4 +--
qemu-img.c | 87 ++
qemu-img.texi | 9 -
tests/qemu-iotests/159 | 2 +-
tests/qemu
This patch adds excl, nocreat, noerror, sync, fsync, fdatasync and sparse to
the conversion list. They have the same meaning as the ones on GNU dd(1).
Two tests were added to test the conv= option.
Signed-off-by: Reda Sallahi
---
qemu-img-cmds.hx | 4 +-
qemu-img.c
The count option for dd lacked a test suite so this adds one with four test
cases.
Signed-off-by: Reda Sallahi
Reviewed-by: Stefan Hajnoczi
---
tests/qemu-iotests/168 | 75 ++
tests/qemu-iotests/168.out | 51 +++
tests
The subcommand dd was creating an output image regardless of whether there
was one already created. With this patch we try to check first if the output
image exists and resize it if necessary.
We also make it mandatory to specify conv=notrunc when the file already
exists.
Signed-off-by: Reda
On Mon, Aug 22, 2016 at 09:35:26AM -0400, Stefan Hajnoczi wrote:
> On Mon, Aug 22, 2016 at 09:55:13AM +0200, Reda Sallahi wrote:
> > @@ -4325,20 +4388,43 @@ static int img_dd(int argc, char **argv)
> >
> > for (out_pos = out.offset * obsz; in_pos < size; block_cou
I should have checked the previous test suites because :
Mon, Aug 22, 2016 at 09:55:15AM +0200, Reda Sallahi wrote:
>
> if (in.offset > INT64_MAX / ibsz || size < in.offset * ibsz) {
> -/* We give a warning if the skip option is bigger than the input
> -
block_count is not used in img_dd() and the C_SKIP check is unecessary so
this patch removes both of them.
Signed-off-by: Reda Sallahi
---
qemu-img.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/qemu-img.c b/qemu-img.c
index ae3828e..cf78dfe 100644
--- a/qemu-img.c
The dd section on qemu-img --help was a bit hard to read since it was not
well aligned. This patch fixes the display problem and also makes the
sentences on the .texi file more consistent with one another (uppercase and
conjugasion).
Signed-off-by: Reda Sallahi
---
qemu-img.c| 48
counterparts on GNU dd(1).
Two tests were added to test iflag and oflag.
Signed-off-by: Reda Sallahi
---
qemu-img-cmds.hx | 4 +-
qemu-img.c | 185 -
qemu-img.texi | 32 +++-
tests/qemu-iotests/163
The count option for dd lacked a test suite so this adds one with four test
cases.
Signed-off-by: Reda Sallahi
---
tests/qemu-iotests/168 | 75 ++
tests/qemu-iotests/168.out | 51 +++
tests/qemu-iotests/group | 1
This patch adds the seek option which allows qemu-img dd to skip a number of
blocks on the output before copying the input.
A test case was added to test the seek option.
Signed-off-by: Reda Sallahi
---
qemu-img-cmds.hx | 4 +--
qemu-img.c | 45
This patch adds excl, nocreat, noerror, sync, fsync, fdatasync and sparse to
the conversion list. They have the same meaning as the ones on GNU dd(1).
Two tests were added to test the conv= option.
Signed-off-by: Reda Sallahi
---
qemu-img-cmds.hx | 4 +-
qemu-img.c
respectively.
A test case was added to test the status option.
Signed-off-by: Reda Sallahi
---
qemu-img-cmds.hx | 4 +--
qemu-img.c | 90 ++
qemu-img.texi | 9 -
tests/qemu-iotests/159 | 2 +-
tests/qemu
Hi everyone,
This patchset adds additional options to qemu-img dd.
Depends on:
[PATCH v4] qemu-img: change opening method for the output in dd
Reda Sallahi (7):
qemu-img: add seek option to dd
qemu-img: add iflag and oflag options to dd
qemu-img: add more conv= conversions to dd
qemu
The subcommand dd was creating an output image regardless of whether there
was one already created. With this patch we try to open first the output
image and resize it if necessary.
We also make it mandatory to specify conv=notrunc when the file already
exists.
Signed-off-by: Reda Sallahi
On Tue, Aug 16, 2016 at 12:09:06PM +0100, Stefan Hajnoczi wrote:
> On Mon, Aug 15, 2016 at 02:11:49PM +0200, Reda Sallahi wrote:
> > +blk2 = blk_new_open(image_opts ? NULL : out.filename,
> > +NULL, qoptions, BDRV_O_RDWR, NULL);
>
> This code d
dd was creating an output image regardless of whether there was one already
created. With this patch we try to open first the output image and resize it
if necessary.
We also make it mandatory to specify conv=notrunc when the file already
exists.
Signed-off-by: Reda Sallahi
---
Depends on
dd was creating an output image regardless of whether there was one already
created. With this patch we try to open first the output image and resize it
if necessary.
We also make it mandatory to specify conv=notrunc when the file already
exists.
Signed-off-by: Reda Sallahi
---
Depends on
This adds the conv=notrunc option to dd which tells dd to not truncate the
output.
Signed-off-by: Reda Sallahi
---
Depends on:
[PATCH v5] qemu-img: add skip option to dd
Changes from v2:
* Delete the mandatory conv=notrunc
Changes from v1:
* Added comment
qemu-img-cmds.hx | 4
dd was creating an output image regardless of whether there was one already
created. With this patch we try to open first the output image and resize it
if necessary.
Signed-off-by: Reda Sallahi
---
Depends on:
[PATCH v2] qemu-img: add conv=notrunc option to dd
qemu-img.c | 91
This adds the conv=notrunc option to dd which tells dd to not truncate the
output.
For the time being we make it mandatory to specify conv=notrunc.
Signed-off-by: Reda Sallahi
---
Depends on:
[PATCH v5] qemu-img: add skip option to dd
Changes from v1:
* Added comment
qemu-img-cmds.hx
This adds the conv=notrunc option to dd which tells dd to not truncate the
output.
For the time being we make it mandatory to specify conv=notrunc.
Signed-off-by: Reda Sallahi
---
qemu-img-cmds.hx | 4 ++--
qemu-img.c | 31 ---
qemu-img.texi
This patch adds the seek option which allows qemu-img dd to skip a number of
blocks on the output before copying the input.
A test case was added to test the seek option.
Signed-off-by: Reda Sallahi
---
Depends on:
[PATCH v5] qemu-img: add skip option to dd
qemu-img-cmds.hx | 4
This adds the skip option which allows qemu-img dd to skip a number of blocks
before copying the input.
A test case was added to test the skip option.
Signed-off-by: Reda Sallahi
---
Depends on:
[PATCH v9] qemu-img: add the 'dd' subcommand
Changes from v4:
* Rebase.
Changes from v3
On 8/10/16, Stefan Hajnoczi wrote:
> On Mon, Aug 08, 2016 at 01:34:21PM +0200, Reda Sallahi wrote:
>> @@ -4111,6 +4139,10 @@ static int img_dd(int argc, char **argv)
>>
>> in.buf = g_new(uint8_t, in.bsz);
>>
>> +if (dd.flags & C_SKIP) {
>
O for the output if the raw format
is not the intended one.
Two tests are added to test qemu-img dd.
Signed-off-by: Reda Sallahi
---
Changes from v8:
* Add an overflow check.
Changes from v7:
* Remove a C99-style for loop.
Changes from v6:
* Remove get_size() to use qemu_strtosz_suffix() in
O for the output if the raw format
is not the intended one.
Two tests are added to test qemu-img dd.
Signed-off-by: Reda Sallahi
---
Changes from v7:
* Remove a C99-style for loop.
Changes from v6:
* Remove get_size() to use qemu_strtosz_suffix() instead.
* Type changes for some fields in DdI
O for the output if the raw format
is not the intended one.
Two tests are added to test qemu-img dd.
Signed-off-by: Reda Sallahi
---
Changes from v6:
* Remove get_size() to use qemu_strtosz_suffix() instead.
* Type changes for some fields in DdIo and DdInfo.
Changes from v5:
* Add dd sections on
Hi Max,
Thanks for the review!
On 8/8/16, Max Reitz wrote:
> On 25.07.2016 07:58, Reda Sallahi wrote:
>> +if (in->bsz == 0) {
>> +error_report("invalid number: '%s'", arg);
>
> It's not an invalid number, it's just an invalid bloc
This adds the skip option which allows qemu-img dd to skip a number of blocks
before copying the input.
A test case was added to test the skip option.
Signed-off-by: Reda Sallahi
---
Depends on:
[PATCH v6] qemu-img: add the 'dd' subcommand
Changes from v3:
* Change write command t
On 7/28/16, Stefan Hajnoczi wrote:
> On Wed, Jul 27, 2016 at 3:51 PM, Reda Sallahi wrote:
>> -qemu_opt_set_number(opts, BLOCK_OPT_SIZE, size, &error_abort);
>> +if (dd.flags & C_SKIP && size < in.bsz * in.offset) {
>> +error_rep
This adds the skip option which allows qemu-img dd to skip a number of blocks
before copying the input.
A test case was added to test the skip option.
Signed-off-by: Reda Sallahi
---
Depends on:
[PATCH v6] qemu-img: add the 'dd' subcommand
Changes from v2:
* Delete a tab that sneake
This adds the skip option which allows qemu-img dd to skip a number of blocks
before copying the input.
A test case was added to test the skip option.
Signed-off-by: Reda Sallahi
---
Depends on:
[PATCH v6] qemu-img: add the 'dd' subcommand
Changes from v1:
* Change test case output.
This adds the skip option which allows qemu-img dd to skip a number of blocks
before copying the input.
A test case was added to test the skip option.
Signed-off-by: Reda Sallahi
---
Depends on:
[PATCH v6] qemu-img: add the 'dd' subcommand
qemu-img-cmds.hx | 4 +--
O for the output if the raw format
is not the intended one.
Two tests are added to test qemu-img dd.
Signed-off-by: Reda Sallahi
---
Changes from v5:
* Add dd sections on qemu-img.texi.
Changes from v4:
* Fix the exit status.
Changes from v3:
* Delete an unused (so far) field in DdIo.
Changes fr
e the duplicate part.
Signed-off-by: Reda Sallahi
---
qemu-img.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/qemu-img.c b/qemu-img.c
index 2e40e1f..dc6652d 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -268,7 +268,7 @@ static BlockBackend *img_open_opts(const char *
O for the output if the raw format
is not the intended one.
Two tests are added to test qemu-img dd.
Signed-off-by: Reda Sallahi
---
Changes from v4:
* Fix the exit status.
Changes from v3:
* Delete an unused (so far) field in DdIo.
Changes from v2:
* Add copyright headers to new files.
Ch
O for the output if the raw format
is not the intended one.
Two tests are added to test qemu-img dd.
Signed-off-by: Reda Sallahi
---
Changes from v3:
* Delete an unused (so far) field in DdIo.
Changes from v2:
* Add copyright headers to new files.
Changes from v1:
* Removal of dead code.
*
O for the output if the raw format
is not the intended one.
Two tests are added to test qemu-img dd.
Signed-off-by: Reda Sallahi
---
Changes from v2:
* Added copyright headers to new files.
Changes from v1:
* Removal of dead code.
* Fix a memory leak.
* Complete the cleanup function in the test
O for the output if the raw format
is not the intended one.
Two tests are added to test qemu-img dd.
Signed-off-by: Reda Sallahi
---
Changes from v1:
* Removal of dead code.
* Fix a memory leak.
* Complete the cleanup function in the test cases.
qemu-img-cmds.hx | 6 +
qemu-
O for the output if the raw format
is not the intended one.
get_size() was needed for the size syntax dd(1) supports which is different
from qemu_strtosz_suffix().
Two tests are added to test qemu-img dd.
Signed-off-by: Reda Sallahi
---
qemu-img-cmds.hx | 6 +
qemu-
ew cluster which hasn't been
allocated before or a zero grain.
Signed-off-by: Reda Sallahi
---
v2: Corrected the commit id referenced in the commit message.
block/vmdk.c | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/block/vmdk.c b/block/vmdk.c
index d73f431.
ew cluster which hasn't been
allocated before or a zero grain.
Signed-off-by: Reda Sallahi
---
block/vmdk.c | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/block/vmdk.c b/block/vmdk.c
index d73f431..1cbd487 100644
--- a/block/vmdk.c
+++ b/block/vmdk.c
@@ -
O for the output if the raw format
is not the intended one.
get_size() and get_offset() were needed for the size syntax dd(1) supports
which is different from qemu_strtosz_suffix.
Signed-off-by: Reda Sallahi
---
qemu-img-cmds.hx | 6 +
qemu-img.c
output with statistics for now so this acts like dd status=none.
Reda Sallahi (1):
qemu-img: add the 'dd' subcommand
qemu-img-cmds.hx | 6 +
qemu-img.c | 833 ++-
2 files changed, 838 insertions(+), 1 deletion(-)
--
2.9.0
54 matches
Mail list logo