Re: [Qemu-block] [PATCH] dmg: fix binary search

2019-01-02 Thread Julio Faracco
Hi Stefan, I created a simple DMG file from MacOS to reproduce the problem: https://bugs.launchpad.net/qemu/+bug/1809304 Em qua, 2 de jan de 2019 às 08:47, Stefan Hajnoczi escreveu: > On Fri, Dec 21, 2018 at 09:58:03PM +0800, yuchenlin wrote: > > There is a possible hang in original binary

[Qemu-block] [PATCH] dmg: Fixing wrong dmg block type value for block terminator.

2018-12-28 Thread Julio Faracco
This is a trivial patch to fix a wrong value for block terminator. The old value was 0x7fff which is wrong. It was not affecting the code because QEMU dmg block is not handling block terminator right now. Neverthless, it should be fixed. Signed-off-by: Julio Faracco --- block/dmg.c | 2

Re: [Qemu-block] [Qemu-devel] [PATCH v2 2/3] dmg: use enumeration type instead of hard coding number

2018-12-24 Thread Julio Faracco
Looks good to me. Reviewed-by: Julio Faracco Em dom, 23 de dez de 2018 às 01:03, yuchenlin escreveu: > Signed-off-by: yuchenlin > --- > block/dmg.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/block/dmg.c b/block/dmg.c > index 0e05702f

Re: [Qemu-block] [Qemu-devel] [PATCH v2 3/3] dmg: don't skip zero chunk

2018-12-24 Thread Julio Faracco
Looks good to me. Reviewed-by: Julio Faracco Em dom, 23 de dez de 2018 às 01:03, yuchenlin escreveu: > The dmg file has many tables which describe: "start from sector XXX to > sector XXX, the compression method is XXX and where the compressed data > resides on&quo

Re: [Qemu-block] [Qemu-devel] [PATCH v2 1/3] dmg: fix binary search

2018-12-24 Thread Julio Faracco
Looks good to me. Reviewed-by: Julio Faracco Em dom, 23 de dez de 2018 às 01:04, yuchenlin escreveu: > There is a possible hang in original binary search implementation. That is > if chunk1 = 4, chunk2 = 5, chunk3 = 4, and we go else case. > > The chunk1 will be still 4, and so on

Re: [Qemu-block] [PATCH v2 0/3] dmg: fixing reading in dmg

2018-12-24 Thread Julio Faracco
The series looks good to me. I tested with existing DMGs and DMGs that I created by myself. Both are working fine now. Reviewed-by: Julio Faracco Em dom, 23 de dez de 2018 às 01:01, yuchenlin escreveu: > There are two bugs in dmg reading. > > First, it may hang in binary search. thi

[Qemu-block] [PATCH v3 1/4] block: adding lzfse decompressing support as a module.

2018-11-05 Thread Julio Faracco
QEMU dmg support includes zlib and bzip2, but it does not contains lzfse support. This commit adds the source file to extend compression support for new DMGs. Signed-off-by: Julio Faracco --- block/dmg-lzfse.c | 49 +++ 1 file changed, 49 insertions

[Qemu-block] [PATCH v3 0/4] Adding LZFSE compression support for DMG block driver.

2018-11-05 Thread Julio Faracco
repo), can be found at: https://github.com/lzfse/lzfse v1-v2: Fixing some error handlings from dmg-lzfse.c v2-v3: Master rebasing suggestion from Stefan. Julio Faracco (4): block: adding lzfse decompressing support as a module. configure: adding support to lzfse library. dmg: including dmg

[Qemu-block] [PATCH v3 4/4] dmg: exchanging hardcoded dmg UDIF block types to enum.

2018-11-05 Thread Julio Faracco
This change is better to understand what kind of block type is being handled by the code. Using a syntax similar to the DMG documentation is easier than tracking all hex values assigned to a block type. Signed-off-by: Julio Faracco --- block/dmg.c | 43

[Qemu-block] [PATCH v3 3/4] dmg: including dmg-lzfse module inside dmg block driver.

2018-11-05 Thread Julio Faracco
This commit includes the support to new module dmg-lzfse into dmg block driver. It includes the support for block type ULFO (0x8007). Signed-off-by: Julio Faracco --- block/dmg.c | 28 block/dmg.h | 3 +++ 2 files changed, 31 insertions(+) diff --git a/block

[Qemu-block] [PATCH v3 2/4] configure: adding support to lzfse library.

2018-11-05 Thread Julio Faracco
This commit includes the support to lzfse opensource library. With this library dmg block driver can decompress images with this type of compression inside. Signed-off-by: Julio Faracco --- block/Makefile.objs | 2 ++ configure | 31 +++ 2 files changed

[Qemu-block] [PATCH v2 4/4] dmg: exchanging hardcoded dmg UDIF block types to enum.

2018-08-16 Thread Julio Faracco
This change is better to understand what kind of block type is being handled by the code. Using a syntax similar to the DMG documentation is easier than tracking all hex values assigned to a block type. Signed-off-by: Julio Faracco --- block/dmg.c | 43

[Qemu-block] [PATCH v2 0/4] Adding LZFSE compression support for DMG block driver.

2018-08-16 Thread Julio Faracco
repo), can be found at: https://github.com/lzfse/lzfse Julio Faracco (4): block: adding lzfse decompressing support as a module. configure: adding support to lzfse library. dmg: including dmg-lzfse module inside dmg block driver. dmg: exchanging hardcoded dmg UDIF block types to enum

[Qemu-block] [PATCH v2 2/4] configure: adding support to lzfse library.

2018-08-16 Thread Julio Faracco
This commit includes the support to lzfse opensource library. With this library dmg block driver can decompress images with this type of compression inside. Signed-off-by: Julio Faracco --- block/Makefile.objs | 2 ++ configure | 31 +++ 2 files changed

[Qemu-block] [PATCH v2 3/4] dmg: including dmg-lzfse module inside dmg block driver.

2018-08-16 Thread Julio Faracco
This commit includes the support to new module dmg-lzfse into dmg block driver. It includes the support for block type ULFO (0x8007). Signed-off-by: Julio Faracco --- block/dmg.c | 28 block/dmg.h | 3 +++ 2 files changed, 31 insertions(+) diff --git a/block

[Qemu-block] [PATCH v2 1/4] block: adding lzfse decompressing support as a module.

2018-08-16 Thread Julio Faracco
QEMU dmg support includes zlib and bzip2, but it does not contains lzfse support. This commit adds the source file to extend compression support for new DMGs. Signed-off-by: Julio Faracco --- block/dmg-lzfse.c | 49 +++ 1 file changed, 49 insertions

Re: [Qemu-block] [PATCH 2/4] configure: adding support to lzfse library.

2018-08-14 Thread Julio Faracco
Em seg, 13 de ago de 2018 às 11:10, Kevin Wolf escreveu: > > Am 10.08.2018 um 06:07 hat Julio Faracco geschrieben: > > This commit includes the support to lzfse opensource library. With this > > library dmg block driver can decompress images with this type of >

[Qemu-block] [PATCH 2/4] configure: adding support to lzfse library.

2018-08-09 Thread Julio Faracco
This commit includes the support to lzfse opensource library. With this library dmg block driver can decompress images with this type of compression inside. Signed-off-by: Julio Faracco --- block/Makefile.objs | 2 ++ configure | 32 2 files changed

[Qemu-block] [PATCH 4/4] dmg: exchanging hardcoded dmg UDIF block types to enum.

2018-08-09 Thread Julio Faracco
This change is better to understand what kind of block type is being handled by the code. Using a syntax similar to the DMG documentation is easier than tracking all hex values assigned to a block type. Signed-off-by: Julio Faracco --- block/dmg.c | 43

[Qemu-block] [PATCH 3/4] dmg: including dmg-lzfse module inside dmg block driver.

2018-08-09 Thread Julio Faracco
This commit includes the support to new module dmg-lzfse into dmg block driver. It includes the support for block type ULFO (0x8007). Signed-off-by: Julio Faracco --- block/dmg.c | 28 block/dmg.h | 3 +++ 2 files changed, 31 insertions(+) diff --git a/block

[Qemu-block] [PATCH 1/4] block: adding lzfse decompressing support as a module.

2018-08-09 Thread Julio Faracco
QEMU dmg support includes zlib and bzip2, but it does not contains lzfse support. This commit adds the source file to extend compression support for new DMGs. Signed-off-by: Julio Faracco --- block/dmg-lzfse.c | 54 +++ 1 file changed, 54 insertions

[Qemu-block] [PATCH 0/4] Adding LZFSE compression support for DMG block driver.

2018-08-09 Thread Julio Faracco
repo), can be found at: https://github.com/lzfse/lzfse Julio Faracco (4): block: adding lzfse decompressing support as a module. configure: adding support to lzfse library. dmg: including dmg-lzfse module inside dmg block driver. dmg: exchanging hardcoded dmg UDIF block types to enum