Re: [PATCH v3] hw/block/nvme: align with existing style

2021-04-20 Thread Klaus Jensen
On Apr 16 07:28, Klaus Jensen wrote: On Apr 16 09:22, Gollu Appalanaidu wrote: Use lower case hexadecimal format for the constants and in comments use the same format as used in Spec. ("h") Signed-off-by: Gollu Appalanaidu --- -v3: Add Suggestions (Philippe) Describe the NVMe

Re: [PATCH] hw/block/nvme: function formatting fix

2021-04-20 Thread Klaus Jensen
On Apr 21 00:52, Gollu Appalanaidu wrote: nvme_map_addr_pmr function arguments not aligned, fix that. Signed-off-by: Gollu Appalanaidu --- hw/block/nvme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 624a1431d0..63ceeb47bd 100644

[PATCH] hw/block/nvme: function formatting fix

2021-04-20 Thread Gollu Appalanaidu
nvme_map_addr_pmr function arguments not aligned, fix that. Signed-off-by: Gollu Appalanaidu --- hw/block/nvme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 624a1431d0..63ceeb47bd 100644 --- a/hw/block/nvme.c +++ b/hw/block/nvme.c

Re: [PATCH] hw/block/nvme: fix io-command set profile feature

2021-04-20 Thread Klaus Jensen
On Apr 19 16:18, Gollu Appalanaidu wrote: Currently IO Command Set Profile feaure is supported, but feature support flag not set and this feature is changable add support for that. Remove filling default value of feature in CQE CDW0 with zero, since it fallbacks to default case and it is zero

Re: [PATCH 1/2] hw/block/nvme: consider metadata read aio return value in compare

2021-04-20 Thread Klaus Jensen
On Apr 16 12:52, Gollu Appalanaidu wrote: Currently in compare command metadata aio read blk_aio_preadv return value ignored, consider it and complete the block accounting. Signed-off-by: Gollu Appalanaidu --- hw/block/nvme.c | 11 +++ 1 file changed, 11 insertions(+) diff --git

Re: [PATCH v3] hw/block/nvme: fix lbaf formats initialization

2021-04-20 Thread Klaus Jensen
On Apr 16 17:29, Gollu Appalanaidu wrote: Currently LBAF formats are being intialized based on metadata size if and only if nvme-ns "ms" parameter is non-zero value. Since FormatNVM command being supported device parameter "ms" may not be the criteria to initialize the supported LBAFs.

Re: [PATCH 00/14] hw(/block/)nvme: spring cleaning

2021-04-20 Thread Keith Busch
On Mon, Apr 19, 2021 at 09:27:47PM +0200, Klaus Jensen wrote: > From: Klaus Jensen > > This series consists of various clean up patches. > > The final patch moves nvme emulation from hw/block to hw/nvme. Series looks good to me. Reviewed-by: Keith Busch

Re: [RFC PATCH 2/2] qemu-img convert: Fix sparseness detection

2021-04-20 Thread Vladimir Sementsov-Ogievskiy
20.04.2021 18:04, Kevin Wolf wrote: Am 20.04.2021 um 16:31 hat Vladimir Sementsov-Ogievskiy geschrieben: 15.04.2021 18:22, Kevin Wolf wrote: In order to avoid RMW cycles, is_allocated_sectors() treats zeroed areas like non-zero data if the end of the checked area isn't aligned. This can

Re: [RFC PATCH 2/2] qemu-img convert: Fix sparseness detection

2021-04-20 Thread Kevin Wolf
Am 20.04.2021 um 16:31 hat Vladimir Sementsov-Ogievskiy geschrieben: > 15.04.2021 18:22, Kevin Wolf wrote: > > In order to avoid RMW cycles, is_allocated_sectors() treats zeroed areas > > like non-zero data if the end of the checked area isn't aligned. This > > can improve the efficiency of the

Re: [RFC PATCH 2/2] qemu-img convert: Fix sparseness detection

2021-04-20 Thread Vladimir Sementsov-Ogievskiy
15.04.2021 18:22, Kevin Wolf wrote: In order to avoid RMW cycles, is_allocated_sectors() treats zeroed areas like non-zero data if the end of the checked area isn't aligned. This can improve the efficiency of the conversion and was introduced in commit 8dcd3c9b91a. However, it comes with a

Re: [RFC PATCH 0/3] block-copy: lock tasks and calls list

2021-04-20 Thread Vladimir Sementsov-Ogievskiy
20.04.2021 13:04, Emanuele Giuseppe Esposito wrote: This serie of patches continues Paolo's series on making the block layer thread safe. Add a CoMutex lock for both tasks and calls list present in block/block-copy.c I think, we need more information about what kind of thread-safety we want.

Re: [RFC PATCH 1/3] block-copy: improve documentation for BlockCopyTask type and functions

2021-04-20 Thread Vladimir Sementsov-Ogievskiy
20.04.2021 15:51, Emanuele Giuseppe Esposito wrote: On 20/04/2021 14:03, Vladimir Sementsov-Ogievskiy wrote: 20.04.2021 13:04, Emanuele Giuseppe Esposito wrote: As done in BlockCopyCallState, categorize BlockCopyTask in IN, State and OUT fields. This is just to understand which field has to

Re: [RFC PATCH 1/3] block-copy: improve documentation for BlockCopyTask type and functions

2021-04-20 Thread Emanuele Giuseppe Esposito
On 20/04/2021 14:03, Vladimir Sementsov-Ogievskiy wrote: 20.04.2021 13:04, Emanuele Giuseppe Esposito wrote: As done in BlockCopyCallState, categorize BlockCopyTask in IN, State and OUT fields. This is just to understand which field has to be protected with a lock. Also add coroutine_fn

Re: [RFC PATCH 1/3] block-copy: improve documentation for BlockCopyTask type and functions

2021-04-20 Thread Vladimir Sementsov-Ogievskiy
20.04.2021 13:04, Emanuele Giuseppe Esposito wrote: As done in BlockCopyCallState, categorize BlockCopyTask in IN, State and OUT fields. This is just to understand which field has to be protected with a lock. Also add coroutine_fn attribute to block_copy_task_create, because it is only usedn

[RFC PATCH 3/3] block-copy: add CoMutex lock for BlockCopyCallState list

2021-04-20 Thread Emanuele Giuseppe Esposito
Use the same tasks_lock, since the calls list is just used for debug purposes. Signed-off-by: Emanuele Giuseppe Esposito --- block/block-copy.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/block/block-copy.c b/block/block-copy.c index e785ac57e0..555f5fb747 100644

[RFC PATCH 2/3] block-copy: add a CoMutex to the BlockCopyTask list

2021-04-20 Thread Emanuele Giuseppe Esposito
Because the list of tasks is only modified by coroutine functions, add a CoMutex in order to protect the list of tasks. Signed-off-by: Emanuele Giuseppe Esposito --- block/block-copy.c | 23 +++ 1 file changed, 19 insertions(+), 4 deletions(-) diff --git

[RFC PATCH 1/3] block-copy: improve documentation for BlockCopyTask type and functions

2021-04-20 Thread Emanuele Giuseppe Esposito
As done in BlockCopyCallState, categorize BlockCopyTask in IN, State and OUT fields. This is just to understand which field has to be protected with a lock. Also add coroutine_fn attribute to block_copy_task_create, because it is only usedn block_copy_dirty_clusters, a coroutine function itself.

[RFC PATCH 0/3] block-copy: lock tasks and calls list

2021-04-20 Thread Emanuele Giuseppe Esposito
This serie of patches continues Paolo's series on making the block layer thread safe. Add a CoMutex lock for both tasks and calls list present in block/block-copy.c Signed-off-by: Emanuele Giuseppe Esposito Emanuele Giuseppe Esposito (3): block-copy: improve documentation for BlockCopyTask

Re: [PATCH 01/14] hw/block/nvme: rename __nvme_zrm_open

2021-04-20 Thread Klaus Jensen
On Apr 20 07:53, Thomas Huth wrote: On 19/04/2021 21.27, Klaus Jensen wrote: From: Klaus Jensen Get rid of the (reserved) double underscore use. Cc: Philippe Mathieu-Daudé Cc: Thomas Huth Signed-off-by: Klaus Jensen --- hw/block/nvme.c | 16 ++-- 1 file changed, 10

Re: [RFC PATCH 0/2] qemu-img convert: Fix sparseness detection

2021-04-20 Thread Kevin Wolf
Am 19.04.2021 um 19:12 hat Peter Lieven geschrieben: > > > Von meinem iPhone gesendet > > > Am 19.04.2021 um 14:31 schrieb Kevin Wolf : > > > > Am 19.04.2021 um 11:13 hat Peter Lieven geschrieben: > >> > >> > Am 19.04.2021 um 10:36 schrieb Peter Lieven : > >>> > >>> > >>> > Am