[PATCH] qemu-img: Allow target be aligned to sector size

2021-08-19 Thread Hanna Reitz
We cannot write to images opened with O_DIRECT unless we allow them to be resized so they are aligned to the sector size: Since 9c60a5d1978, bdrv_node_refresh_perm() ensures that for nodes whose length is not aligned to the request alignment and where someone has taken a WRITE permission, the RESIZ

Re: [PATCH v3] block/file-win32: add reopen handlers

2021-08-19 Thread Hanna Reitz
On 17.08.21 22:21, Viktor Prutyanov wrote: Make 'qemu-img commit' work on Windows. Command 'commit' requires reopening backing file in RW mode. So, add reopen prepare/commit/abort handlers and change dwShareMode for CreateFile call in order to allow further read/write reopening. Resolves: https

Re: [PATCH] block/monitor: Consolidate hmp_handle_error calls to reduce redundant code

2021-08-19 Thread Hanna Reitz
On 02.08.21 08:25, Mao Zhongyi wrote: Signed-off-by: Mao Zhongyi --- block/monitor/block-hmp-cmds.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) Thanks, applied to my block-next branch for 6.2: https://github.com/XanClic/qemu/commits/block-next Hanna

Re: [PATCH] raw-format: drop WRITE and RESIZE child perms when possible

2021-08-19 Thread Hanna Reitz
On 26.07.21 14:28, Stefan Hajnoczi wrote: The following command-line fails due to a permissions conflict: $ qemu-storage-daemon \ --blockdev driver=nvme,node-name=nvme0,device=:08:00.0,namespace=1 \ --blockdev driver=raw,node-name=l1-1,file=nvme0,offset=0,size=1073741824 \

Re: [PATCH] docs: Link to protocol security considerations in uri docs

2021-08-19 Thread Wouter Verhelst
Hi Eric, On Wed, Aug 18, 2021 at 11:02:48AM -0500, Eric Blake wrote: > Dan Berrangé and I thought about some more potential future problems: > right now, even with FORCEDTLS mode (in both client and server), we > have NO way to validate that the initial NBD_FLAG_[C_] bits advertised > between clie

[RFC PATCH v2] hw/nvme:Adding Support for namespace management

2021-08-19 Thread Naveen Nagar
From: Naveen This patch supports namespace management : create and delete operations. Since v1: - Modified and moved nvme_ns_identify_common in ns.c file - Added check for CSI field in NS management - Indentation fix in namespace create This patch has been tested with the following command and

Re: [PATCH] qemu-img: Allow target be aligned to sector size

2021-08-19 Thread Jose R. Ziviani
Hello Hanna, On Thu, Aug 19, 2021 at 12:12:00PM +0200, Hanna Reitz wrote: > We cannot write to images opened with O_DIRECT unless we allow them to > be resized so they are aligned to the sector size: Since 9c60a5d1978, > bdrv_node_refresh_perm() ensures that for nodes whose length is not > aligned

Re: [RFC PATCH v2] hw/nvme:Adding Support for namespace management

2021-08-19 Thread Klaus Jensen
On Aug 19 18:39, Naveen Nagar wrote: > From: Naveen > > This patch supports namespace management : create and delete operations. > > Since v1: > - Modified and moved nvme_ns_identify_common in ns.c file > - Added check for CSI field in NS management > - Indentation fix in namespace create > >

Re: [PATCH] qemu-img: Allow target be aligned to sector size

2021-08-19 Thread Hanna Reitz
On 19.08.21 16:31, Jose R. Ziviani wrote: Hello Hanna, On Thu, Aug 19, 2021 at 12:12:00PM +0200, Hanna Reitz wrote: We cannot write to images opened with O_DIRECT unless we allow them to be resized so they are aligned to the sector size: Since 9c60a5d1978, bdrv_node_refresh_perm() ensures that

Re: [PATCH 1/3] simplebench: add img_bench_templater.py

2021-08-19 Thread Hanna Reitz
On 24.07.21 15:38, Vladimir Sementsov-Ogievskiy wrote: Add simple grammar-parsing template benchmark. This doesn’t really say much, and FWIW, for like ten minutes I thought this would do something completely different than it did (while I was trying to parse the help text). (I thought this

Re: [PATCH 2/3] qcow2: refactor handle_dependencies() loop body

2021-08-19 Thread Eric Blake
On Sat, Jul 24, 2021 at 04:38:45PM +0300, Vladimir Sementsov-Ogievskiy wrote: > No logic change, just prepare for the following commit. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block/qcow2-cluster.c | 49 --- > 1 file changed, 28 insertions(

Re: [PATCH 3/3] qcow2: handle_dependencies(): relax conflict detection

2021-08-19 Thread Eric Blake
On Sat, Jul 24, 2021 at 04:38:46PM +0300, Vladimir Sementsov-Ogievskiy wrote: > There is no conflict and no dependency if we have parallel writes to > different subclusters of one cluster when cluster itself is already when the cluster itself > allocated. So, relax extra dependency. > > Measure

Re: [PATCH] qemu-img: Allow target be aligned to sector size

2021-08-19 Thread Jose R. Ziviani
On Thu, Aug 19, 2021 at 05:14:30PM +0200, Hanna Reitz wrote: > On 19.08.21 16:31, Jose R. Ziviani wrote: > > Hello Hanna, > > > > On Thu, Aug 19, 2021 at 12:12:00PM +0200, Hanna Reitz wrote: > > > We cannot write to images opened with O_DIRECT unless we allow them to > > > be resized so they are a

Re: [RFC PATCH: v3 1/2] add mi device in qemu

2021-08-19 Thread Padmakar Kalghatgi
On Wed, Aug 18, 2021 at 08:01:03AM +0200, Klaus Jensen wrote: On Aug 3 12:54, Padmakar Kalghatgi wrote: From: padmakar This patch contains the implementation of certain commands of nvme-mi specification.The MI commands are useful to manage/configure/monitor the device.Eventhough the MI comman