On Fri, 2019-09-06 at 23:10 +0200, Stefano Garzarella wrote:
> On Fri, Sep 06, 2019 at 04:17:12PM +, Dmitry Fomichev wrote:
> > On Fri, 2019-09-06 at 10:11 +0200, Stefano Garzarella wrote:
> > > On Wed, Sep 04, 2019 at 05:00:57PM -0400, Dmitry Fomichev wrote:
> > > > This commit adds Zoned Devi
On Fri, Sep 06, 2019 at 04:17:12PM +, Dmitry Fomichev wrote:
> On Fri, 2019-09-06 at 10:11 +0200, Stefano Garzarella wrote:
> > On Wed, Sep 04, 2019 at 05:00:57PM -0400, Dmitry Fomichev wrote:
> > > This commit adds Zoned Device Model (as defined in T10 ZBC and
> > > T13 ZAC standards) as a blo
Signed-off-by: Maxim Levitsky
---
tests/qemu-iotests/263 | 75 ++
tests/qemu-iotests/263.out | 19 ++
tests/qemu-iotests/group | 1 +
3 files changed, 95 insertions(+)
create mode 100755 tests/qemu-iotests/263
create mode 100644 tests/qemu-iote
This fixes subtle corruption introduced by luks threaded encryption
in commit 8ac0f15f335
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1745922
The corruption happens when we do a write that
* writes to two or more unallocated clusters at once
* doesn't fully cover the first sector
This commit tries to clarify few function arguments,
and add comments describing the encrypt/decrypt interface
Signed-off-by: Maxim Levitsky
---
block/qcow2-cluster.c | 10 +++
block/qcow2-threads.c | 61 ++-
2 files changed, 53 insertions(+), 18 delet
Commit 8ac0f15f335 accidently broke the COW of non changed areas
of newly allocated clusters, when the write spans multiple clusters,
and needs COW both prior and after the write.
This results in 'after' COW area being encrypted with wrong
sector address, which render it corrupted.
Bugzilla: https
On Fri, 2019-09-06 at 14:17 -0500, Eric Blake wrote:
> On 9/6/19 12:32 PM, Maxim Levitsky wrote:
> > This fixes subltle corruption introduced by luks threaded encryption
>
> subtle
I usually put the commit messages to a spellchecker, but this time
I forgot to do this. I will try not to in the fut
On 9/6/19 12:32 PM, Maxim Levitsky wrote:
> This fixes subltle corruption introduced by luks threaded encryption
subtle
> in commit 8ac0f15f335
>
> Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1745922
>
> The corruption happens when we do
>* write to two or more unallocated cluster
On Fri, 2019-09-06 at 14:00 -0500, Eric Blake wrote:
> On 9/6/19 1:55 PM, Maxim Levitsky wrote:
>
> > > > +/*
> > > > + * qcow2_co_encrypt()
> > > > + *
> > > > + * Encrypts a sector size aligned contiguous area
> > > > + *
> > > > + * @host_cluster_offset - on disk offset of the cluster in which
On 9/6/19 1:55 PM, Maxim Levitsky wrote:
>>> +/*
>>> + * qcow2_co_encrypt()
>>> + *
>>> + * Encrypts a sector size aligned contiguous area
>>> + *
>>> + * @host_cluster_offset - on disk offset of the cluster in which
>>> + *the buffer resides
>>> + *
>>> + * @guest_offset -
On Fri, 2019-09-06 at 13:00 -0500, Eric Blake wrote:
> On 9/6/19 12:31 PM, Maxim Levitsky wrote:
> > This commit tries to clarify few function arguments,
> > and add comments describing the encrypt/decrypt interface
> >
> > Signed-off-by: Maxim Levitsky
> > ---
> > block/qcow2-cluster.c | 8 +++
On 9/6/19 12:31 PM, Maxim Levitsky wrote:
> This commit tries to clarify few function arguments,
> and add comments describing the encrypt/decrypt interface
>
> Signed-off-by: Maxim Levitsky
> ---
> block/qcow2-cluster.c | 8 +++
> block/qcow2-threads.c | 53
On Fri, 2019-09-06 at 20:31 +0300, Maxim Levitsky wrote:
> Commit 8ac0f15f335 accidently broke the COW of non changed areas
> of newly allocated clusters, when the write spans multiple clusters,
> and needs COW both prior and after the write.
> This results in 'after' COW area beeing encrypted with
This fixes subltle corruption introduced by luks threaded encryption
in commit 8ac0f15f335
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1745922
The corruption happens when we do
* write to two or more unallocated clusters at once
* write doesn't fully cover nether first nor last cl
Signed-off-by: Maxim Levitsky
---
tests/qemu-iotests/263 | 76 ++
tests/qemu-iotests/263.out | 19 ++
tests/qemu-iotests/group | 1 +
3 files changed, 96 insertions(+)
create mode 100755 tests/qemu-iotests/263
create mode 100644 tests/qemu-iote
This commit tries to clarify few function arguments,
and add comments describing the encrypt/decrypt interface
Signed-off-by: Maxim Levitsky
---
block/qcow2-cluster.c | 8 +++
block/qcow2-threads.c | 53 ++-
2 files changed, 46 insertions(+), 15 delet
Commit 8ac0f15f335 accidently broke the COW of non changed areas
of newly allocated clusters, when the write spans multiple clusters,
and needs COW both prior and after the write.
This results in 'after' COW area beeing encrypted with wrong
sector address, which render it corrupted.
Bugzilla: http
On Fri, 2019-09-06 at 10:11 +0200, Stefano Garzarella wrote:
> On Wed, Sep 04, 2019 at 05:00:57PM -0400, Dmitry Fomichev wrote:
> > This commit adds Zoned Device Model (as defined in T10 ZBC and
> > T13 ZAC standards) as a block driver property, along with some
> > useful access functions.
> >
> >
This will help to identify how many of the user-issued discard operations
(accounted on a device level) have actually suceeded down on the host file
(even though the numbers will not be exactly the same if non-raw format
driver is used (e.g. qcow2 sending metadata discards)).
Note that these numbe
Signed-off-by: Anton Nefedov
---
hw/scsi/scsi-disk.c | 12 +++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c
index a002fdabe8..68b1675fd9 100644
--- a/hw/scsi/scsi-disk.c
+++ b/hw/scsi/scsi-disk.c
@@ -1617,10 +1617,16 @@ static vo
This will help to account the operation in the following commit.
The difference is that we don't call scsi_disk_req_check_error() before
the 1st discard iteration anymore. That function also checks if
the request is cancelled, however it shouldn't get canceled until it
yields in blk_aio() function
Signed-off-by: Anton Nefedov
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
hw/ide/core.c | 12
1 file changed, 12 insertions(+)
diff --git a/hw/ide/core.c b/hw/ide/core.c
index e6e54c6c9a..754ff4dc34 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -442,6 +442,14 @@ static void id
it allows to report it in the error handler
Signed-off-by: Anton Nefedov
---
hw/scsi/scsi-disk.c | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c
index 915641a0f1..b3dd21800d 100644
--- a/hw/scsi/scsi-disk.c
+++ b/hw/scs
v9:
- fixed patch 5 so the fields are actually numbered in sectors not blocks
- fixed patch 7 accordingly
- patch 8: make stat fields unsigned
- qapi patches: "since 4.1" -> "since 4.2"
v8: https://lists.gnu.org/archive/html/qemu-devel/2019-05/msg03709.html
qmp query-blockstats provides
This adds some protection from accounting uninitialized cookie.
That is, block_acct_failed/done without previous block_acct_start;
in that case, cookie probably holds values from previous operation.
(Note: it might also be uninitialized holding garbage value and there is
still "< BLOCK_MAX_IOTYPE
A block driver can provide a callback to report driver-specific
statistics.
file-posix driver now reports discard statistics
Signed-off-by: Anton Nefedov
Reviewed-by: Vladimir Sementsov-Ogievskiy
Acked-by: Markus Armbruster
---
qapi/block-core.json | 38 ++
Make the stat fields definition slightly more readable.
Also reorder total_time_ns stats read-write-flush as done elsewhere.
Cosmetic change only.
Signed-off-by: Anton Nefedov
Reviewed-by: Alberto Garcia
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
qapi/block-core.json | 26 +++---
Signed-off-by: Anton Nefedov
Reviewed-by: Vladimir Sementsov-Ogievskiy
Reviewed-by: Alberto Garcia
Reviewed-by: Eric Blake
---
qapi/block-core.json | 29 +++--
include/block/accounting.h | 1 +
block/qapi.c | 6 ++
tests/qemu-iotests/227.out |
On Fri, Sep 06, 2019 at 05:26:09PM +0300, Maxim Levitsky wrote:
> On Fri, 2019-09-06 at 15:14 +0100, Daniel P. Berrangé wrote:
> > On Fri, Aug 30, 2019 at 11:56:08PM +0300, Maxim Levitsky wrote:
> > > Note that currently I add tests 300-302, which are
> > > placeholders to ease the rebase. In final
On Fri, 2019-09-06 at 15:14 +0100, Daniel P. Berrangé wrote:
> On Fri, Aug 30, 2019 at 11:56:08PM +0300, Maxim Levitsky wrote:
> > Note that currently I add tests 300-302, which are
> > placeholders to ease the rebase. In final version
> > of these patches I will update these.
> >
> > Signed-off-b
On Fri, Aug 30, 2019 at 11:56:07PM +0300, Maxim Levitsky wrote:
> Currently only for changing crypto parameters
>
> Signed-off-by: Maxim Levitsky
> ---
> block/qcow2.c| 71
> qapi/block-core.json | 4 +--
> 2 files changed, 73 insertions(+),
On Fri, Sep 06, 2019 at 04:57:22PM +0300, Maxim Levitsky wrote:
> On Fri, 2019-09-06 at 14:49 +0100, Daniel P. Berrangé wrote:
> > On Fri, Aug 30, 2019 at 11:56:00PM +0300, Maxim Levitsky wrote:
> > > Now you can specify which slot to put the encryption key to
> > > Plus add 'active' option which w
On Fri, Aug 30, 2019 at 11:56:08PM +0300, Maxim Levitsky wrote:
> Note that currently I add tests 300-302, which are
> placeholders to ease the rebase. In final version
> of these patches I will update these.
>
> Signed-off-by: Maxim Levitsky
> ---
> tests/qemu-iotests/087.out | 6 +-
>
On Fri, Aug 30, 2019 at 11:56:06PM +0300, Maxim Levitsky wrote:
> Signed-off-by: Maxim Levitsky
> ---
> block/crypto.c | 86 +---
> qapi/block-core.json | 4 +--
> 2 files changed, 68 insertions(+), 22 deletions(-)
Reviewed-by: Daniel P. Berrangé
On Fri, Aug 30, 2019 at 11:56:04PM +0300, Maxim Levitsky wrote:
> ---
> block/qcow2.c | 79 ---
> 1 file changed, 63 insertions(+), 16 deletions(-)
>
> @@ -4888,9 +4899,22 @@ static int qcow2_amend_options(BlockDriverState *bs,
> QemuOpts *opts,
>
On Fri, Aug 30, 2019 at 11:56:03PM +0300, Maxim Levitsky wrote:
> This implements the encryption key management
> using the generic code in qcrypto layer
> (currently only for qemu-img amend)
>
> This code adds another 'write_func' because the initialization
> write_func works directly on the unde
On Fri, Aug 30, 2019 at 11:56:02PM +0300, Maxim Levitsky wrote:
This could do with some text to explain what this will be
used for.
> Signed-off-by: Maxim Levitsky
> ---
> block.c | 4 +++-
> block/qcow2.c | 1 +
> include/block/block.h | 1 +
> include/block/b
On Fri, 2019-09-06 at 14:49 +0100, Daniel P. Berrangé wrote:
> On Fri, Aug 30, 2019 at 11:56:00PM +0300, Maxim Levitsky wrote:
> > Now you can specify which slot to put the encryption key to
> > Plus add 'active' option which will let user erase the key secret
> > instead of adding it.
> > Check t
On Fri, Aug 30, 2019 at 11:56:01PM +0300, Maxim Levitsky wrote:
> Signed-off-by: Maxim Levitsky
> ---
> crypto/block-luks.c | 366 +++-
> 1 file changed, 364 insertions(+), 2 deletions(-)
>
> diff --git a/crypto/block-luks.c b/crypto/block-luks.c
> index b
On Fri, Aug 30, 2019 at 11:56:00PM +0300, Maxim Levitsky wrote:
> Now you can specify which slot to put the encryption key to
> Plus add 'active' option which will let user erase the key secret
> instead of adding it.
> Check that it is true for creation
>
> Signed-off-by: Maxim Levitsky
> ---
>
On Fri, Aug 30, 2019 at 11:55:59PM +0300, Maxim Levitsky wrote:
> This adds the qcrypto_amend_options and corresponding
> crypto driver callbacks for the for encrypted
> key managedment
>
> Signed-off-by: Maxim Levitsky
> ---
> crypto/block.c | 31 +++
> cryp
On Mon, Aug 26, 2019 at 04:51:03PM +0300, Maxim Levitsky wrote:
> Check that keyslots don't overlap with the data,
> and check that keyslots don't overlap with each other.
> (this is done using naive O(n^2) nested loops,
> but since there are just 8 keyslots, this doesn't really matter.
>
> Signed
On Mon, Aug 26, 2019 at 04:51:01PM +0300, Maxim Levitsky wrote:
> Signed-off-by: Maxim Levitsky
> ---
> crypto/block-luks.c | 64 +
> 1 file changed, 41 insertions(+), 23 deletions(-)
>
> diff --git a/crypto/block-luks.c b/crypto/block-luks.c
> index d
On Mon, Aug 26, 2019 at 04:51:00PM +0300, Maxim Levitsky wrote:
> This function will be used later to store
> new keys to the luks metadata
>
> Signed-off-by: Maxim Levitsky
> ---
> crypto/block-luks.c | 310 ++--
> 1 file changed, 184 insertions(+), 126 d
On Mon, Aug 26, 2019 at 04:50:59PM +0300, Maxim Levitsky wrote:
> This is just to make qcrypto_block_luks_open more
> reasonable in size.
>
> Signed-off-by: Maxim Levitsky
> ---
> crypto/block-luks.c | 254 +---
> 1 file changed, 146 insertions(+), 108 del
On Mon, Aug 26, 2019 at 04:50:58PM +0300, Maxim Levitsky wrote:
> Signed-off-by: Maxim Levitsky
> ---
> crypto/block-luks.c | 166 +++-
> 1 file changed, 102 insertions(+), 64 deletions(-)
>
> diff --git a/crypto/block-luks.c b/crypto/block-luks.c
> index
Many thanks
Andrey
On 05/09/2019 21:21, Eric Blake wrote:
> From: Andrey Shinkevich
>
> Revert the commit 118f99442d 'block/io.c: fix for the allocation failure'
> and use better error handling for file systems that do not support
> fallocate() for an unaligned byte range. Allow falling back to
On Mon, Aug 26, 2019 at 04:50:57PM +0300, Maxim Levitsky wrote:
> Prior to that patch, the parsed encryptio settings
^^encryption
> were alrady stored into the QCryptoBlockLUKS but not
^^already
> used anywhere but in qcrypto_block_luks_get_info
>
> Usi
On Mon, Aug 26, 2019 at 04:50:56PM +0300, Maxim Levitsky wrote:
> Another minor refactoring
>
> Signed-off-by: Maxim Levitsky
> ---
> crypto/block-luks.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/crypto/block-luks.c b/crypto/block-luks.c
> index 331377293d..
On Mon, Aug 26, 2019 at 04:50:55PM +0300, Maxim Levitsky wrote:
> Let the caller allocate masterkey
> Always use master key len from the header
>
> Signed-off-by: Maxim Levitsky
> ---
> crypto/block-luks.c | 44 +---
> 1 file changed, 21 insertions(+), 23
On Mon, Aug 26, 2019 at 04:50:54PM +0300, Maxim Levitsky wrote:
> This way we can store the header we loaded, which
> will be used in key management code
>
> Signed-off-by: Maxim Levitsky
> ---
> crypto/block-luks.c | 9 ++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git
On Mon, Aug 26, 2019 at 04:50:53PM +0300, Maxim Levitsky wrote:
> * key_bytes -> master_key_len
> * payload_offset = payload_offset_sector (to emphasise that this isn't byte
> offset)
> * key_offset -> key_offset_sector - same as above for luks slots
>
> Signed-off-by: Maxim Levitsky
> ---
> cr
When running "make check -j8" or something similar, the iotests are
running in parallel with the other tests. So when they are printing
out "Passed all xx tests" or a similar status message at the end,
it might not be quite clear that this message belongs to the iotests,
since the output might be m
The check script is already printing out which iotest is currently
running, so printing out the name of the check-block.sh shell script
looks superfluous here.
Signed-off-by: Thomas Huth
---
tests/Makefile.include | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/Makefile
On Wed, Sep 04, 2019 at 05:00:57PM -0400, Dmitry Fomichev wrote:
> This commit adds Zoned Device Model (as defined in T10 ZBC and
> T13 ZAC standards) as a block driver property, along with some
> useful access functions.
>
> A new backend driver permission, BLK_PERM_SUPPORT_HM_ZONED, is also
> in
55 matches
Mail list logo