Re: [PATCH v11 00/13] hw/block/nvme: Support Namespace Types and Zoned Namespace Command Set

2020-12-10 Thread Klaus Jensen
On Dec 10 19:25, Dmitry Fomichev wrote: > > -Original Message- > > From: Klaus Jensen > > Sent: Wednesday, December 9, 2020 4:58 AM > > To: Dmitry Fomichev > > Cc: Keith Busch ; Klaus Jensen > > ; Kevin Wolf ; Philippe > > Mathieu-Daudé ; Max Reitz ; > > Maxim Levitsky ; Fam Zheng ; > >

[PATCH v3 2/2] hw/block: m25p80: Implement AAI-WP command support for SST flashes

2020-12-10 Thread Bin Meng
From: Xuzhou Cheng Auto Address Increment (AAI) Word-Program is a special command of SST flashes. AAI-WP allows multiple bytes of data to be programmed without re-issuing the next sequential address location. Signed-off-by: Xuzhou Cheng Signed-off-by: Bin Meng --- Changes in v3: -

[PATCH v3 1/2] hw/block: m25p80: Don't write to flash if write is disabled

2020-12-10 Thread Bin Meng
From: Bin Meng When write is disabled, the write to flash should be avoided in flash_write8(). Fixes: 82a2499011a7 ("m25p80: Initial implementation of SPI flash device") Signed-off-by: Bin Meng --- (no changes since v2) Changes in v2: - new patch: honor write enable flag in flash write

[PATCH v2 2/2] hw/block: m25p80: Implement AAI-WP command support for SST flashes

2020-12-10 Thread Bin Meng
From: Xuzhou Cheng Auto Address Increment (AAI) Word-Program is a special command of SST flashes. AAI-WP allows multiple bytes of data to be programmed without re-issuing the next sequential address location. Signed-off-by: Xuzhou Cheng Signed-off-by: Bin Meng --- Changes in v2: - add

[PATCH v2 1/2] hw/block: m25p80: Don't write to flash if write is disabled

2020-12-10 Thread Bin Meng
From: Bin Meng When write is disabled, the write to flash should be avoided in flash_write8(). Fixes: 82a2499011a7 ("m25p80: Initial implementation of SPI flash device") Signed-off-by: Bin Meng --- Changes in v2: - new patch: honor write enable flag in flash write hw/block/m25p80.c | 1 +

Re: [PATCH] hw/block: m25p80: Implement AAI-WP command support for SST flashes

2020-12-10 Thread Bin Meng
Hi Francisco, On Thu, Dec 3, 2020 at 8:54 PM Francisco Iglesias wrote: > > Hello Bin, > > On [2020 Dec 02] Wed 22:30:37, Bin Meng wrote: > > From: Xuzhou Cheng > > > > Auto Address Increment (AAI) Word-Program is a special command of > > SST flashes. AAI-WP allows multiple bytes of data to be

Re: [PATCH] hw/block: m25p80: Fix fast read for SST flashes

2020-12-10 Thread Bin Meng
Hi Francisco, On Fri, Dec 4, 2020 at 7:28 PM Francisco Iglesias wrote: > > Hello Bin, > > On [2020 Dec 04] Fri 18:52:50, Bin Meng wrote: > > Hi Francisco, > > > > On Fri, Dec 4, 2020 at 6:46 PM Francisco Iglesias > > wrote: > > > > > > Hello Bin, > > > > > > On [2020 Dec 04] Fri 15:52:12, Bin

RE: [PATCH v11 00/13] hw/block/nvme: Support Namespace Types and Zoned Namespace Command Set

2020-12-10 Thread Dmitry Fomichev
> -Original Message- > From: Klaus Jensen > Sent: Wednesday, December 9, 2020 4:58 AM > To: Dmitry Fomichev > Cc: Keith Busch ; Klaus Jensen > ; Kevin Wolf ; Philippe > Mathieu-Daudé ; Max Reitz ; > Maxim Levitsky ; Fam Zheng ; > Niklas Cassel ; Damien Le Moal > ; qemu-block@nongnu.org;

Re: [PATCH v14 05/13] qapi: create BlockdevOptionsCor structure for COR driver

2020-12-10 Thread Vladimir Sementsov-Ogievskiy
10.12.2020 20:43, Max Reitz wrote: I don’t like this patch’s subject very much, because I find the implementation of the @bottom option to be more noteworthy than the addition of the QAPI structure. On 04.12.20 23:07, Vladimir Sementsov-Ogievskiy wrote: From: Andrey Shinkevich Create the

Re: [PATCH v14 05/13] qapi: create BlockdevOptionsCor structure for COR driver

2020-12-10 Thread Max Reitz
I don’t like this patch’s subject very much, because I find the implementation of the @bottom option to be more noteworthy than the addition of the QAPI structure. On 04.12.20 23:07, Vladimir Sementsov-Ogievskiy wrote: From: Andrey Shinkevich Create the BlockdevOptionsCor structure for COR

Re: [PATCH v14 04/13] qapi: add filter-node-name to block-stream

2020-12-10 Thread Max Reitz
On 04.12.20 23:07, Vladimir Sementsov-Ogievskiy wrote: From: Andrey Shinkevich Provide the possibility to pass the 'filter-node-name' parameter to the block-stream job as it is done for the commit block job. Signed-off-by: Andrey Shinkevich Reviewed-by: Vladimir Sementsov-Ogievskiy ---

Re: [PATCH v14 03/13] copy-on-read: add filter drop function

2020-12-10 Thread Max Reitz
On 04.12.20 23:07, Vladimir Sementsov-Ogievskiy wrote: From: Andrey Shinkevich Provide API for the COR-filter removal. Also, drop the filter child permissions for an inactive state when the filter node is being removed. To insert the filter, the block generic layer function bdrv_insert_node()

Re: [PATCH v14 02/13] block: add API function to insert a node

2020-12-10 Thread Max Reitz
On 04.12.20 23:07, Vladimir Sementsov-Ogievskiy wrote: From: Andrey Shinkevich Provide API for insertion a node to backing chain. Suggested-by: Max Reitz Signed-off-by: Andrey Shinkevich Reviewed-by: Vladimir Sementsov-Ogievskiy --- include/block/block.h | 2 ++ block.c |

Re: [PATCH v3] file-posix: detect the lock using the real file

2020-12-10 Thread Daniel P . Berrangé
On Fri, Dec 11, 2020 at 12:38:19AM +0800, Li Feng wrote: > This patch addresses this issue: > When accessing a volume on an NFS filesystem without supporting the file lock, > tools, like qemu-img, will complain "Failed to lock byte 100". > > Add a new function 'qemu_has_file_lock' to detect if

[PATCH v3] file-posix: detect the lock using the real file

2020-12-10 Thread Li Feng
This patch addresses this issue: When accessing a volume on an NFS filesystem without supporting the file lock, tools, like qemu-img, will complain "Failed to lock byte 100". Add a new function 'qemu_has_file_lock' to detect if the filesystem supports locks or not. And when the drive is auto

[PULL 04/13] block: Improve some block-commit, block-stream error messages

2020-12-10 Thread Markus Armbruster
block-commit defaults @base-node to the deepest backing image. When there is none, it fails with "Base 'NULL' not found". Improve to "There is no backing image". block-commit and block-stream reject a @base argument that doesn't resolve with "Base 'BASE' not found". Commit 6b33f3ae8b

Re: [PATCH v2] file-posix: detect the lock using the real file

2020-12-10 Thread Feng Li
Ok, I see. I will split the detect lock without changing the global variable to a separate function. Don't call the qemu_has_ofd_lock. Thanks. Daniel P. Berrangé 于2020年12月10日周四 下午11:59写道: > > On Wed, Dec 09, 2020 at 12:54:48PM +0800, Li Feng wrote: > > This patch addresses this issue: > > When

Re: [PATCH v2] file-posix: detect the lock using the real file

2020-12-10 Thread Daniel P . Berrangé
On Wed, Dec 09, 2020 at 12:54:48PM +0800, Li Feng wrote: > This patch addresses this issue: > When accessing a volume on an NFS filesystem without supporting the file lock, > tools, like qemu-img, will complain "Failed to lock byte 100". > > In the original code, the qemu_has_ofd_lock will test

Re: [PATCH] file-posix: detect the lock using the real file

2020-12-10 Thread Daniel P . Berrangé
On Thu, Dec 10, 2020 at 11:53:09PM +0800, Feng Li wrote: > My mistake, you are not on the receiver list of my v2. > I use the get_maintainer.sh to generate the cc list. > I will resend it to you. No, need. I've seen 2, but didn't think you were referring to that as it still has most of the flaws

[PATCH v2] file-posix: detect the lock using the real file

2020-12-10 Thread Li Feng
This patch addresses this issue: When accessing a volume on an NFS filesystem without supporting the file lock, tools, like qemu-img, will complain "Failed to lock byte 100". In the original code, the qemu_has_ofd_lock will test the lock on the "/dev/null" pseudo-file. Actually, the file.locking

Re: [PATCH] file-posix: detect the lock using the real file

2020-12-10 Thread Feng Li
My mistake, you are not on the receiver list of my v2. I use the get_maintainer.sh to generate the cc list. I will resend it to you. Daniel P. Berrangé 于2020年12月10日周四 下午11:29写道: > > On Thu, Dec 10, 2020 at 10:56:59PM +0800, Li Feng wrote: > > Kevin Wolf 于2020年12月10日周四 上午1:43写道: > > > > > > Am

Re: [PATCH] block/nvme: Implement fake truncate() coroutine

2020-12-10 Thread Philippe Mathieu-Daudé
On 12/10/20 4:36 PM, Max Reitz wrote: > On 10.12.20 13:52, Philippe Mathieu-Daudé wrote: >> NVMe drive can not be shrunk. > > *cannot > >> Since commit c80d8b06cfa we can use the @exact parameter (set >> to false) to return success if the block device is larger than >> the requested offset (even

Re: [PATCH] block/nvme: Implement fake truncate() coroutine

2020-12-10 Thread Max Reitz
On 10.12.20 13:52, Philippe Mathieu-Daudé wrote: NVMe drive can not be shrunk. *cannot Since commit c80d8b06cfa we can use the @exact parameter (set to false) to return success if the block device is larger than the requested offset (even if we can not be shrunk). Use this parameter to

Re: [PATCH] file-posix: detect the lock using the real file

2020-12-10 Thread Daniel P . Berrangé
On Thu, Dec 10, 2020 at 10:56:59PM +0800, Li Feng wrote: > Kevin Wolf 于2020年12月10日周四 上午1:43写道: > > > > Am 09.12.2020 um 10:33 hat Daniel P. Berrangé geschrieben: > > > On Tue, Dec 08, 2020 at 03:38:22PM +0100, Kevin Wolf wrote: > > > > Am 08.12.2020 um 13:59 hat Li Feng geschrieben: > > > > >

Re: [PATCH] file-posix: detect the lock using the real file

2020-12-10 Thread Li Feng
Kevin Wolf 于2020年12月10日周四 上午1:43写道: > > Am 09.12.2020 um 10:33 hat Daniel P. Berrangé geschrieben: > > On Tue, Dec 08, 2020 at 03:38:22PM +0100, Kevin Wolf wrote: > > > Am 08.12.2020 um 13:59 hat Li Feng geschrieben: > > > > This patch addresses this issue: > > > > When accessing a volume on an

RFC: don't store backing filename in qcow2 image

2020-12-10 Thread Vladimir Sementsov-Ogievskiy
Hi all! I have an idea, that not storing backing filename in qcow2 image at all may be a good thing. I'll give some reasons and want to know what do you think about it. 1. Libvirt has to manage and keep in mind backing chains anyway. This means, that storing this information in qcow2 header

[PATCH] block/nvme: Implement fake truncate() coroutine

2020-12-10 Thread Philippe Mathieu-Daudé
NVMe drive can not be shrunk. Since commit c80d8b06cfa we can use the @exact parameter (set to false) to return success if the block device is larger than the requested offset (even if we can not be shrunk). Use this parameter to implement the NVMe truncate() coroutine, similarly how it is done

Re: [PATCH v5 2/4] block: add bdrv_co_delete_file_noerr

2020-12-10 Thread Maxim Levitsky
On Thu, 2020-12-10 at 13:54 +0300, Vladimir Sementsov-Ogievskiy wrote: > 09.12.2020 23:33, Maxim Levitsky wrote: > > This function wraps bdrv_co_delete_file for the common case of removing a > > file, > > which was just created by format driver, on an error condition. > > > > It hides the

Re: [PATCH v5 4/4] block: qcow2: remove the created file on initialization error

2020-12-10 Thread Maxim Levitsky
On Thu, 2020-12-10 at 14:00 +0300, Vladimir Sementsov-Ogievskiy wrote: > 09.12.2020 23:33, Maxim Levitsky wrote: > > If the qcow initialization fails, we should remove the file if it was > > already created, to avoid leaving stale files around. > > > > We already do this for luks raw images. > >

Re: [PATCH v5 4/4] block: qcow2: remove the created file on initialization error

2020-12-10 Thread Vladimir Sementsov-Ogievskiy
09.12.2020 23:33, Maxim Levitsky wrote: If the qcow initialization fails, we should remove the file if it was already created, to avoid leaving stale files around. We already do this for luks raw images. Signed-off-by: Maxim Levitsky Reviewed-by: Alberto Garcia --- block/qcow2.c | 6 --

Re: [PATCH v5 3/4] crypto: luks: use bdrv_co_delete_file_noerr

2020-12-10 Thread Vladimir Sementsov-Ogievskiy
09.12.2020 23:33, Maxim Levitsky wrote: This refactoring is now possible thanks to this function. Signed-off-by: Maxim Levitsky Reviewed-by: Alberto Garcia Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

Re: [PATCH v5 2/4] block: add bdrv_co_delete_file_noerr

2020-12-10 Thread Vladimir Sementsov-Ogievskiy
09.12.2020 23:33, Maxim Levitsky wrote: This function wraps bdrv_co_delete_file for the common case of removing a file, which was just created by format driver, on an error condition. It hides the -ENOTSUPP error, and reports all other errors otherwise. I've looked at original commit added

Re: [PATCH v2 1/5] file-posix: split hdev_refresh_limits from raw_refresh_limits

2020-12-10 Thread Tom Yan
On Wed, 9 Dec 2020 at 21:54, Maxim Levitsky wrote: > > From: Tom Yan > > We can and should get max transfer length and max segments for all host > devices / cdroms (on Linux). > > Also use MIN_NON_ZERO instead when we clamp max transfer length against > max segments. > > Signed-off-by: Tom Yan

Re: [PATCH v5 1/4] crypto: luks: Fix tiny memory leak

2020-12-10 Thread Vladimir Sementsov-Ogievskiy
09.12.2020 23:33, Maxim Levitsky wrote: When the underlying block device doesn't support the bdrv_co_delete_file interface, an 'Error' object was leaked. Signed-off-by: Maxim Levitsky Reviewed-by: Alberto Garcia Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/crypto.c | 2 ++ 1

Re: [PATCH v2 0/5] SCSI: fix transfer limits for SCSI passthrough

2020-12-10 Thread Maxim Levitsky
On Thu, 2020-12-10 at 01:09 +0100, Paolo Bonzini wrote: > On 09/12/20 15:03, no-re...@patchew.org wrote: > > Patchew URL: > > https://patchew.org/QEMU/20201209135355.561745-1-mlevi...@redhat.com/ > > > > > > > > Hi, > > > > This series seems to have some coding style problems. See output

Re: [PATCH] block/nfs: fix int overflow in nfs_client_open_qdict

2020-12-10 Thread Stefano Garzarella
On Wed, Dec 09, 2020 at 01:17:35PM +0100, Peter Lieven wrote: nfs_client_open returns the file size in sectors. This effectively makes it impossible to open files larger than 1TB. Fixes: a1a42af422d46812f1f0cebe6b230c20409a3731 Cc: qemu-sta...@nongnu.org Signed-off-by: Peter Lieven ---

Re: [PATCH v2 0/4] vhost-user: avoid g_return_val_if() in get/set_config()

2020-12-10 Thread Marc-André Lureau
Hi Michael, On Thu, Dec 3, 2020 at 5:41 PM Stefano Garzarella wrote: > On Wed, Dec 02, 2020 at 03:26:07PM +, Stefan Hajnoczi wrote: > >v2: > > * Print errors [Marc-André] > > > >Markus Armbruster pointed out that g_return_val_if() is meant for > programming > >errors. It must not be used