Re: [PATCH v5 00/11] block: file-posix queue

2021-06-25 Thread Max Reitz
On 25.06.21 10:52, Paolo Bonzini wrote: On 25/06/21 10:37, Max Reitz wrote: Thanks, looks good to me, though I’m afraid I’ll be on PTO the next two weeks so I can’t take this series through my tree... (I don’t really want to send a pull request today when I probably wouldn’t be able to deal

Re: [PATCH v5 00/11] block: file-posix queue

2021-06-25 Thread Max Reitz
On 24.06.21 20:04, Paolo Bonzini wrote: New patches: - 3/4 (for review comments), - 9 (split for ease of review), - 11 (new bugfix) v1->v2: add missing patch v2->v3: add max_hw_transfer to BlockLimits v3->v4: fix compilation after patch 1, tweak commit messages according to

Re: [PATCH 11/11] file-posix: handle EINTR during ioctl

2021-06-25 Thread Max Reitz
== -1) { return -errno; } I think the macro TFR() from qemu-common.h could be applied here, probably like `TFR(ret = ioctl(...));`. No matter: Reviewed-by: Max Reitz

Re: [PATCH 10/11] block: detect DKIOCGETBLOCKCOUNT/SIZE before use

2021-06-25 Thread Max Reitz
(+), 1 deletion(-) Reviewed-by: Max Reitz

Re: [PATCH 09/11] block: try BSD disk size ioctls one after another

2021-06-25 Thread Max Reitz
-- 1 file changed, 16 insertions(+), 18 deletions(-) Thanks, that’s much better. Reviewed-by: Max Reitz

Re: [PATCH 07/11] block: feature detection for host block support

2021-06-25 Thread Max Reitz
Paolo Bonzini --- block/file-posix.c | 33 ++--- meson.build | 6 +- qapi/block-core.json | 14 ++ 3 files changed, 37 insertions(+), 16 deletions(-) Reviewed-by: Max Reitz

Re: [PATCH 06/11] file-posix: try BLKSECTGET on block devices too, do not round to power of 2

2021-06-25 Thread Max Reitz
ged, 38 insertions(+), 29 deletions(-) Reviewed-by: Max Reitz

Re: [PATCH 05/11] block: add max_hw_transfer to BlockLimits

2021-06-25 Thread Max Reitz
/file-posix.c | 2 +- block/io.c | 2 ++ hw/scsi/scsi-generic.c | 2 +- include/block/block_int.h | 7 +++ include/sysemu/block-backend.h | 1 + 6 files changed, 25 insertions(+), 2 deletions(-) Reviewed-by: Max Reitz

Re: [PATCH 04/11] block-backend: align max_transfer to request alignment

2021-06-25 Thread Max Reitz
ntract of the function does not specify that INT_MAX means "no maximum", just align the outcome of the function (whether INT_MAX or bs->bl.max_transfer) before returning it. Signed-off-by: Paolo Bonzini --- block/block-backend.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Reviewed-by: Max Reitz

Re: [PATCH 03/11] osdep: provide ROUND_DOWN macro

2021-06-25 Thread Max Reitz
-off-by: Paolo Bonzini --- include/qemu/osdep.h | 28 ++-- 1 file changed, 22 insertions(+), 6 deletions(-) What a nice thing to have. Reviewed-by: Max Reitz

[PULL 1/1] block/snapshot: Clarify goto fallback behavior

2021-06-24 Thread Max Reitz
All of this is not immediately clear from a quick glance at the code, so add a comment to the assertion what it is for, and why it is valid. It certainly confused Coverity. Reported-by: Coverity (CID 1452774) Signed-off-by: Max Reitz Message-Id: <20210503095418.31521-1-mre...@redhat.com&

[PULL 0/1] Block patch

2021-06-24 Thread Max Reitz
Max Reitz (1): block/snapshot: Clarify goto fallback behavior block/snapshot.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) -- 2.31.1

Re: [PATCH v2 3/6] block: Clarify that @bytes is no limit on *pnum

2021-06-24 Thread Max Reitz
On 24.06.21 12:25, Vladimir Sementsov-Ogievskiy wrote: 24.06.2021 13:16, Max Reitz wrote: On 24.06.21 11:15, Vladimir Sementsov-Ogievskiy wrote: 23.06.2021 18:01, Max Reitz wrote: .bdrv_co_block_status() implementations are free to return a *pnum that exceeds @bytes, because

Re: [PATCH v2 2/6] block: block-status cache for data regions

2021-06-24 Thread Max Reitz
On 24.06.21 12:05, Vladimir Sementsov-Ogievskiy wrote: 23.06.2021 18:01, Max Reitz wrote: As we have attempted before (https://lists.gnu.org/archive/html/qemu-devel/2019-01/msg06451.html, "file-posix: Cache lseek result for data regions"; https://lists.nongnu.org/archive/html/qemu-blo

Re: [PATCH v2 3/6] block: Clarify that @bytes is no limit on *pnum

2021-06-24 Thread Max Reitz
On 24.06.21 11:15, Vladimir Sementsov-Ogievskiy wrote: 23.06.2021 18:01, Max Reitz wrote: .bdrv_co_block_status() implementations are free to return a *pnum that exceeds @bytes, because bdrv_co_block_status() in block/io.c will clamp *pnum as necessary. On the other hand, if drivers

[PATCH v2 2/2] iotests/307: Test iothread conflict for exports

2021-06-24 Thread Max Reitz
. Signed-off-by: Max Reitz --- tests/qemu-iotests/307 | 15 +++ tests/qemu-iotests/307.out | 8 2 files changed, 23 insertions(+) diff --git a/tests/qemu-iotests/307 b/tests/qemu-iotests/307 index c7685347bc..b429b5aa50 100755 --- a/tests/qemu-iotests/307 +++ b/tests

[PATCH v2 0/2] block/export: Conditionally ignore set-context error

2021-06-24 Thread Max Reitz
iothread conflict for exports' Max Reitz (2): block/export: Conditionally ignore set-context error iotests/307: Test iothread conflict for exports block/export/export.c | 5 - tests/qemu-iotests/307 | 15 +++ tests/qemu-iotests/307.out | 8 3 files changed, 27

[PATCH v2 1/2] block/export: Conditionally ignore set-context error

2021-06-24 Thread Max Reitz
othread options") Signed-off-by: Max Reitz --- block/export/export.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/block/export/export.c b/block/export/export.c index fec7d9f738..6d3b9964c8 100644 --- a/block/export/export.c +++ b/block/export/export.c @@ -111,6 +

Re: [PATCH v4 7/7] block: detect DKIOCGETBLOCKCOUNT/SIZE before use

2021-06-23 Thread Max Reitz
On 08.06.21 15:16, Paolo Bonzini wrote: From: Joelle van Dyne iOS hosts do not have these defined so we fallback to the default behaviour. Co-authored-by: Warner Losh Reviewed-by: Peter Maydell Signed-off-by: Joelle van Dyne Message-Id: <20210315180341.31638-...@getutm.app> Signed-off-by:

Re: [PATCH v4 5/7] block: feature detection for host block support

2021-06-23 Thread Max Reitz
On 08.06.21 15:16, Paolo Bonzini wrote: From: Joelle van Dyne On Darwin (iOS), there are no system level APIs for directly accessing host block devices. We detect this at configure time. Signed-off-by: Joelle van Dyne Message-Id: <20210315180341.31638-...@getutm.app> Signed-off-by: Paolo

Re: [PATCH v4 1/7] file-posix: fix max_iov for /dev/sg devices

2021-06-23 Thread Max Reitz
On 08.06.21 21:14, Vladimir Sementsov-Ogievskiy wrote: 08.06.2021 16:16, Paolo Bonzini wrote: Even though it was only called for devices that have bs->sg set (which must be character devices), sg_get_max_segments looked at /sys/dev/block which only works for block devices. On Linux the sg

[PATCH v2 2/6] block: block-status cache for data regions

2021-06-23 Thread Max Reitz
image.) We only use the cache for nodes without children (i.e. protocol nodes), because that is where the problem is: Drivers that rely on block-status implementations outside of qemu (e.g. SEEK_DATA/HOLE). Resolves: https://gitlab.com/qemu-project/qemu/-/issues/307 Signed-off-by: Max Reitz --- inclu

[PATCH v2 4/6] block/file-posix: Do not force-cap *pnum

2021-06-23 Thread Max Reitz
bdrv_co_block_status() does it for us, we do not need to do it here. The advantage of not capping *pnum is that bdrv_co_block_status() can cache larger data regions than requested by its caller. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy

[PATCH v2 6/6] block/iscsi: Do not force-cap *pnum

2021-06-23 Thread Max Reitz
bdrv_co_block_status() does it for us, we do not need to do it here. The advantage of not capping *pnum is that bdrv_co_block_status() can cache larger data regions than requested by its caller. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy

[PATCH v2 1/6] block: Drop BDS comment regarding bdrv_append()

2021-06-23 Thread Max Reitz
ago). So no such care is necessary anymore. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy --- include/block/block_int.h | 6 -- 1 file changed, 6 deletions(-) diff --git a/include/block/block_int.h b/include/block/block_int.h index 057d88b1fc..

[PATCH v2 5/6] block/gluster: Do not force-cap *pnum

2021-06-23 Thread Max Reitz
bdrv_co_block_status() does it for us, we do not need to do it here. The advantage of not capping *pnum is that bdrv_co_block_status() can cache larger data regions than requested by its caller. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy

[PATCH v2 3/6] block: Clarify that @bytes is no limit on *pnum

2021-06-23 Thread Max Reitz
-status cache will become more effective. So, make a note in block_int.h that @bytes is no upper limit for *pnum. Suggested-by: Eric Blake Signed-off-by: Max Reitz --- include/block/block_int.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/block/block_int.h b/include/block

[PATCH v2 0/6] block: block-status cache for data regions

2021-06-23 Thread Max Reitz
4/6:[] [--] 'block/file-posix: Do not force-cap *pnum' 005/6:[] [--] 'block/gluster: Do not force-cap *pnum' 006/6:[] [--] 'block/iscsi: Do not force-cap *pnum' Max Reitz (6): block: Drop BDS comment regarding bdrv_append() block: block-status cache for data regions block: Clar

Re: [PATCH 4/4] iotests/308: Test allow-other

2021-06-22 Thread Max Reitz
On 22.06.21 17:08, Kevin Wolf wrote: Am 14.06.2021 um 16:44 hat Max Reitz geschrieben: We cannot reasonably test the main point of allow-other, which is to allow users other than the current one to access the FUSE export, because that would require access to sudo, which this test most likely

Re: [PATCH 3/4] export/fuse: Let permissions be adjustable

2021-06-22 Thread Max Reitz
On 22.06.21 17:02, Kevin Wolf wrote: Am 14.06.2021 um 16:44 hat Max Reitz geschrieben: Allow changing the file mode, UID, and GID through SETATTR. This only really makes sense with allow-other, though (because without it, the effective access mode is fixed to be 0600 (u+rw) with qemu's user

[PATCH] block: BDRV_O_NO_IO for backing file on creation

2021-06-22 Thread Max Reitz
here. Fixes: https://gitlab.com/qemu-project/qemu/-/issues/441 Signed-off-by: Max Reitz --- block.c| 6 +- tests/qemu-iotests/189 | 2 +- tests/qemu-iotests/198 | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/block.c b/block.c index 3f456892d0..b459502632

Re: [Virtio-fs] [PATCH v2 7/9] virtiofsd: Add inodes_by_handle hash table

2021-06-21 Thread Max Reitz
On 21.06.21 17:51, Vivek Goyal wrote: On Mon, Jun 21, 2021 at 11:02:16AM +0200, Max Reitz wrote: On 18.06.21 20:29, Vivek Goyal wrote: [snip] What am I not able to understand is that why we can't return error if we run into a temporary issue and can't generate file handle. What's

Re: [PATCH 0/4] export/fuse: Allow other users access to the export

2021-06-21 Thread Max Reitz
On 21.06.21 18:12, Kevin Wolf wrote: Am 14.06.2021 um 16:44 hat Max Reitz geschrieben: Hi, With the default mount options, FUSE mounts are not accessible to any users but the one who did the mount, not even to root. To allow such accesses, allow_other must be passed. This is probably useful

Re: [PATCH 2/6] block: block-status cache for data regions

2021-06-21 Thread Max Reitz
On 19.06.21 12:20, Vladimir Sementsov-Ogievskiy wrote: 17.06.2021 18:52, Max Reitz wrote: As we have attempted before (https://lists.gnu.org/archive/html/qemu-devel/2019-01/msg06451.html, "file-posix: Cache lseek result for data regions"; https://lists.nongnu.org/archive/html/qemu-blo

Re: [PATCH 5/6] block/nbd: Do not force-cap *pnum

2021-06-21 Thread Max Reitz
On 19.06.21 12:53, Vladimir Sementsov-Ogievskiy wrote: 17.06.2021 18:52, Max Reitz wrote: bdrv_co_block_status() does it for us, we do not need to do it here. The advantage of not capping *pnum is that bdrv_co_block_status() can cache larger data regions than requested by its caller. Signed

Re: [PATCH 4/6] block/gluster: Do not force-cap *pnum

2021-06-21 Thread Max Reitz
On 19.06.21 12:36, Vladimir Sementsov-Ogievskiy wrote: 17.06.2021 18:52, Max Reitz wrote: bdrv_co_block_status() does it for us, we do not need to do it here. The advantage of not capping *pnum is that bdrv_co_block_status() can cache larger data regions than requested by its caller. Signed

Re: [PATCH 3/6] block/file-posix: Do not force-cap *pnum

2021-06-21 Thread Max Reitz
On 18.06.21 22:16, Eric Blake wrote: On Thu, Jun 17, 2021 at 05:52:44PM +0200, Max Reitz wrote: bdrv_co_block_status() does it for us, we do not need to do it here. The advantage of not capping *pnum is that bdrv_co_block_status() can cache larger data regions than requested by its caller. We

Re: [PATCH 2/6] block: block-status cache for data regions

2021-06-21 Thread Max Reitz
On 18.06.21 20:51, Eric Blake wrote: On Thu, Jun 17, 2021 at 05:52:43PM +0200, Max Reitz wrote: To address this, we want to cache data regions. Most of the time, when bad performance is reported, it is in places where the image is iterated over from start to end (qemu-img convert or the mirror

Re: [Virtio-fs] [PATCH v2 7/9] virtiofsd: Add inodes_by_handle hash table

2021-06-21 Thread Max Reitz
On 18.06.21 20:29, Vivek Goyal wrote: On Fri, Jun 18, 2021 at 10:28:38AM +0200, Max Reitz wrote: On 17.06.21 23:21, Vivek Goyal wrote: On Wed, Jun 16, 2021 at 03:38:13PM +0200, Max Reitz wrote: On 11.06.21 22:04, Vivek Goyal wrote: On Wed, Jun 09, 2021 at 05:55:49PM +0200, Max Reitz wrote

Re: [PATCH v2 7/9] virtiofsd: Add inodes_by_handle hash table

2021-06-18 Thread Max Reitz
On 09.06.21 17:55, Max Reitz wrote: Currently, lo_inode.fhandle is always NULL and so always keep an O_PATH FD in lo_inode.fd. Therefore, when the respective inode is unlinked, its inode ID will remain in use until we drop our lo_inode (and lo_inode_put() thus closes the FD). Therefore

Re: [Virtio-fs] [PATCH v2 7/9] virtiofsd: Add inodes_by_handle hash table

2021-06-18 Thread Max Reitz
On 17.06.21 23:21, Vivek Goyal wrote: On Wed, Jun 16, 2021 at 03:38:13PM +0200, Max Reitz wrote: On 11.06.21 22:04, Vivek Goyal wrote: On Wed, Jun 09, 2021 at 05:55:49PM +0200, Max Reitz wrote: Currently, lo_inode.fhandle is always NULL and so always keep an O_PATH FD in lo_inode.fd

[PATCH 5/6] block/nbd: Do not force-cap *pnum

2021-06-17 Thread Max Reitz
bdrv_co_block_status() does it for us, we do not need to do it here. The advantage of not capping *pnum is that bdrv_co_block_status() can cache larger data regions than requested by its caller. Signed-off-by: Max Reitz --- block/nbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH 4/6] block/gluster: Do not force-cap *pnum

2021-06-17 Thread Max Reitz
bdrv_co_block_status() does it for us, we do not need to do it here. The advantage of not capping *pnum is that bdrv_co_block_status() can cache larger data regions than requested by its caller. Signed-off-by: Max Reitz --- block/gluster.c | 7 --- 1 file changed, 4 insertions(+), 3

[PATCH 3/6] block/file-posix: Do not force-cap *pnum

2021-06-17 Thread Max Reitz
bdrv_co_block_status() does it for us, we do not need to do it here. The advantage of not capping *pnum is that bdrv_co_block_status() can cache larger data regions than requested by its caller. Signed-off-by: Max Reitz --- block/file-posix.c | 7 --- 1 file changed, 4 insertions(+), 3

[PATCH 2/6] block: block-status cache for data regions

2021-06-17 Thread Max Reitz
image.) We only use the cache for nodes without children (i.e. protocol nodes), because that is where the problem is: Drivers that rely on block-status implementations outside of qemu (e.g. SEEK_DATA/HOLE). Resolves: https://gitlab.com/qemu-project/qemu/-/issues/307 Signed-off-by: Max Reitz --- inclu

[PATCH 6/6] block/iscsi: Do not force-cap *pnum

2021-06-17 Thread Max Reitz
bdrv_co_block_status() does it for us, we do not need to do it here. The advantage of not capping *pnum is that bdrv_co_block_status() can cache larger data regions than requested by its caller. Signed-off-by: Max Reitz --- block/iscsi.c | 3 --- 1 file changed, 3 deletions(-) diff --git

[PATCH 0/6] block: block-status cache for data regions

2021-06-17 Thread Max Reitz
ock_status(), so our cache can be more effective. Max Reitz (6): block: Drop BDS comment regarding bdrv_append() block: block-status cache for data regions block/file-posix: Do not force-cap *pnum block/gluster: Do not force-cap *pnum block/nbd: Do not force-cap *pnum block/iscsi: Do

[PATCH 1/6] block: Drop BDS comment regarding bdrv_append()

2021-06-17 Thread Max Reitz
ago). So no such care is necessary anymore. Signed-off-by: Max Reitz --- include/block/block_int.h | 6 -- 1 file changed, 6 deletions(-) diff --git a/include/block/block_int.h b/include/block/block_int.h index 057d88b1fc..a8f9598102 100644 --- a/include/block/block_int.h +++ b/include/block/b

Re: [PATCH v3 3/7] block: add max_hw_transfer to BlockLimits

2021-06-16 Thread Max Reitz
On 16.06.21 15:18, Paolo Bonzini wrote: On 15/06/21 18:18, Max Reitz wrote:   } +/* Returns the maximum hardware transfer length, in bytes; guaranteed nonzero */ +uint64_t blk_get_max_hw_transfer(BlockBackend *blk) +{ +    BlockDriverState *bs = blk_bs(blk); +    uint64_t max = INT_MAX

Re: [PATCH v2 0/9] virtiofsd: Allow using file handles instead of O_PATH FDs

2021-06-16 Thread Max Reitz
On 11.06.21 21:19, Vivek Goyal wrote: On Wed, Jun 09, 2021 at 05:55:42PM +0200, Max Reitz wrote: Hi, v1 cover letter for an overview: https://listman.redhat.com/archives/virtio-fs/2021-June/msg00033.html Hi Max, What's the impact of these patches on performance? Just trying to get some idea

Re: [Virtio-fs] [PATCH v2 7/9] virtiofsd: Add inodes_by_handle hash table

2021-06-16 Thread Max Reitz
On 11.06.21 22:04, Vivek Goyal wrote: On Wed, Jun 09, 2021 at 05:55:49PM +0200, Max Reitz wrote: Currently, lo_inode.fhandle is always NULL and so always keep an O_PATH FD in lo_inode.fd. Therefore, when the respective inode is unlinked, its inode ID will remain in use until we drop our

Re: [PATCH v3 7/7] block: detect DKIOCGETBLOCKCOUNT/SIZE before use

2021-06-15 Thread Max Reitz
On 03.06.21 15:37, Paolo Bonzini wrote: From: Joelle van Dyne iOS hosts do not have these defined so we fallback to the default behaviour. Co-authored-by: Warner Losh Reviewed-by: Peter Maydell Signed-off-by: Joelle van Dyne Message-Id: <20210315180341.31638-...@getutm.app> Signed-off-by:

Re: [PATCH v3 6/7] block: check for sys/disk.h

2021-06-15 Thread Max Reitz
onzini --- block.c | 2 +- meson.build | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) Reviewed-by: Max Reitz

Re: [PATCH v3 5/7] block: feature detection for host block support

2021-06-15 Thread Max Reitz
On 03.06.21 15:37, Paolo Bonzini wrote: From: Joelle van Dyne On Darwin (iOS), there are no system level APIs for directly accessing host block devices. We detect this at configure time. Signed-off-by: Joelle van Dyne Message-Id: <20210315180341.31638-...@getutm.app> Signed-off-by: Paolo

Re: [PATCH v3 4/7] file-posix: try BLKSECTGET on block devices too, do not round to power of 2

2021-06-15 Thread Max Reitz
On 03.06.21 15:37, Paolo Bonzini wrote: bs->sg is only true for character devices, but block devices can also be used with scsi-block and scsi-generic. Unfortunately BLKSECTGET returns bytes in an int for /dev/sgN devices, and sectors in a short for block devices, so account for that in the

Re: [PATCH v3 2/7] scsi-generic: pass max_segments via max_iov field in BlockLimits

2021-06-15 Thread Max Reitz
On 03.06.21 15:37, Paolo Bonzini wrote: I/O to a disk via read/write is not limited by the number of segments allowed by the host adapter; the kernel can split requests if needed, and the limit imposed by the host adapter can be very low (256k or so) to avoid that SG_IO returns EINVAL if memory

Re: [PATCH v3 3/7] block: add max_hw_transfer to BlockLimits

2021-06-15 Thread Max Reitz
On 03.06.21 15:37, Paolo Bonzini wrote: For block host devices, I/O can happen through either the kernel file descriptor I/O system calls (preadv/pwritev, io_submit, io_uring) or the SCSI passthrough ioctl SG_IO. In the latter case, the size of each transfer can be limited by the HBA, while for

Re: [PATCH v3 2/7] scsi-generic: pass max_segments via max_iov field in BlockLimits

2021-06-15 Thread Max Reitz
-generic.c | 6 -- 2 files changed, 5 insertions(+), 4 deletions(-) Reviewed-by: Max Reitz

Re: [PATCH v3 1/7] file-posix: fix max_iov for /dev/sg devices

2021-06-15 Thread Max Reitz
-ENOTSUP; +} + With %s/->/./: Reviewed-by: Max Reitz (To answer Vladimir’s question, I don’t believe the condition should be bs->sg, because bs->sg == true is a given for this function anyway. Therefore, there’s no need to check whether the char device is an SG device.)

[PATCH 3/4] export/fuse: Let permissions be adjustable

2021-06-14 Thread Max Reitz
. Signed-off-by: Max Reitz --- block/export/fuse.c | 48 ++--- 1 file changed, 37 insertions(+), 11 deletions(-) diff --git a/block/export/fuse.c b/block/export/fuse.c index 1d54286d90..742e0af657 100644 --- a/block/export/fuse.c +++ b/block/export/fuse.c

[PATCH 1/4] export/fuse: Add allow-other option

2021-06-14 Thread Max Reitz
code performs no permission checks. With default_permissions, we can just let the kernel do it. Signed-off-by: Max Reitz --- qapi/block-export.json | 11 ++- block/export/fuse.c| 17 +++-- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/qapi/block

[PATCH 0/4] export/fuse: Allow other users access to the export

2021-06-14 Thread Max Reitz
allowing other users access to the export.) This also requires our SETATTR code to be able to handle permission changes, though, so the user can then run chmod/chown/chgrp on the export to adjust its permissions to their need. The final patch adds a test. Max Reitz (4): export/fuse: Add allow

[PATCH 4/4] iotests/308: Test allow-other

2021-06-14 Thread Max Reitz
default_permissions). Signed-off-by: Max Reitz --- tests/qemu-iotests/308 | 91 ++ tests/qemu-iotests/308.out | 47 2 files changed, 138 insertions(+) diff --git a/tests/qemu-iotests/308 b/tests/qemu-iotests/308 index f122065d0f

[PATCH 2/4] export/fuse: Give SET_ATTR_SIZE its own branch

2021-06-14 Thread Max Reitz
In order to support changing other attributes than the file size in fuse_setattr(), we have to give each its own independent branch. This also applies to the only attribute we do support right now. Signed-off-by: Max Reitz --- block/export/fuse.c | 20 +++- 1 file changed, 11

[PATCH v2 9/9] virtiofsd: Add lazy lo_do_find()

2021-06-09 Thread Max Reitz
() call. Signed-off-by: Max Reitz Reviewed-by: Connor Kuehl --- tools/virtiofsd/passthrough_ll.c | 93 ++-- 1 file changed, 76 insertions(+), 17 deletions(-) diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c index 2e56c40b2f..8990fd5bd2

[PATCH v2 4/9] virtiofsd: Let lo_fd() return a TempFd

2021-06-09 Thread Max Reitz
-off-by: Max Reitz Reviewed-by: Connor Kuehl --- tools/virtiofsd/passthrough_ll.c | 55 +--- 1 file changed, 44 insertions(+), 11 deletions(-) diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c index 46c9dfe200..8f64bcd6c5 100644

[PATCH v2 8/9] virtiofsd: Optionally fill lo_inode.fhandle

2021-06-09 Thread Max Reitz
use statx(). Therefore, using file handles requires statx() support. Signed-off-by: Max Reitz --- tools/virtiofsd/helper.c | 3 + tools/virtiofsd/passthrough_ll.c | 197 -- tools/virtiofsd/passthrough_seccomp.c | 1 + 3 files changed, 192 insertions

[PATCH v2 2/9] virtiofsd: Use lo_inode_open() instead of openat()

2021-06-09 Thread Max Reitz
this patch, lo_inode_open() is the only place to invoke openat() to reopen an existing FD with different flags. Signed-off-by: Max Reitz Reviewed-by: Connor Kuehl --- tools/virtiofsd/passthrough_ll.c | 43 1 file changed, 27 insertions(+), 16 deletions(-) diff --g

[PATCH v2 6/9] virtiofsd: Add lo_inode.fhandle

2021-06-09 Thread Max Reitz
(mapping ID to FD). get_file_handle(), which is added by a later patch, will ensure that every mount ID for which we have generated a handle has a corresponding entry in mount_fds. Signed-off-by: Max Reitz Reviewed-by: Connor Kuehl --- tools/virtiofsd/passthrough_ll.c | 116

[PATCH v2 5/9] virtiofsd: Let lo_inode_open() return a TempFd

2021-06-09 Thread Max Reitz
()). Signed-off-by: Max Reitz Reviewed-by: Connor Kuehl --- tools/virtiofsd/passthrough_ll.c | 137 +-- 1 file changed, 59 insertions(+), 78 deletions(-) diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c index 8f64bcd6c5..3014e8baf8 100644

[PATCH v2 7/9] virtiofsd: Add inodes_by_handle hash table

2021-06-09 Thread Max Reitz
in the dentry cache, basically. Signed-off-by: Max Reitz Reviewed-by: Connor Kuehl --- tools/virtiofsd/passthrough_ll.c | 80 +--- 1 file changed, 64 insertions(+), 16 deletions(-) diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c index

[PATCH v2 3/9] virtiofsd: Add lo_inode_fd() helper

2021-06-09 Thread Max Reitz
Once we let lo_inode.fd be optional, we will need its users to open the file handle stored in lo_inode instead. This function will do that. For now, it just returns lo_inode.fd, though. Signed-off-by: Max Reitz Reviewed-by: Connor Kuehl --- tools/virtiofsd/passthrough_ll.c | 138

[PATCH v2 1/9] virtiofsd: Add TempFd structure

2021-06-09 Thread Max Reitz
lo_inode.fd). By using g_auto(TempFd) to store this result, callers will not even have to care about closing a temporary FD after use. It will be done automatically once the object goes out of scope. Signed-off-by: Max Reitz Reviewed-by: Connor Kuehl --- tools/virtiofsd/passthrough_ll.c | 49

[PATCH v2 0/9] virtiofsd: Allow using file handles instead of O_PATH FDs

2021-06-09 Thread Max Reitz
:[] [--] 'virtiofsd: Let lo_inode_open() return a TempFd' 006/9:[] [--] 'virtiofsd: Add lo_inode.fhandle' 007/9:[] [--] 'virtiofsd: Add inodes_by_handle hash table' 008/9:[0045] [FC] 'virtiofsd: Optionally fill lo_inode.fhandle' 009/9:[] [--] 'virtiofsd: Add lazy lo_do_find()' Max Reitz (9

Re: [PATCH 8/9] virtiofsd: Optionally fill lo_inode.fhandle

2021-06-08 Thread Max Reitz
On 08.06.21 12:43, Dr. David Alan Gilbert wrote: * Max Reitz (mre...@redhat.com) wrote: When the inode_file_handles option is set, try to generate a file handle for new inodes instead of opening an O_PATH FD. Being able to open these again will require CAP_DAC_READ_SEARCH, so the description

[PATCH 9/9] virtiofsd: Add lazy lo_do_find()

2021-06-04 Thread Max Reitz
() call. Signed-off-by: Max Reitz --- tools/virtiofsd/passthrough_ll.c | 93 ++-- 1 file changed, 76 insertions(+), 17 deletions(-) diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c index d01f9d3a59..ef10a3ace6 100644 --- a/tools/virtiofsd

[PATCH 1/9] virtiofsd: Add TempFd structure

2021-06-04 Thread Max Reitz
lo_inode.fd). By using g_auto(TempFd) to store this result, callers will not even have to care about closing a temporary FD after use. It will be done automatically once the object goes out of scope. Signed-off-by: Max Reitz --- tools/virtiofsd/passthrough_ll.c | 49

[PATCH 0/9] virtiofsd: Allow using file handles instead of O_PATH FDs

2021-06-04 Thread Max Reitz
handles include a generation ID, so we can discern between the old and the new inode.) Patch 9 is completely optional, but I just really felt compelled to write it. Max Reitz (9): virtiofsd: Add TempFd structure virtiofsd: Use lo_inode_open() instead of openat() virtiofsd: Add lo_inode_fd

Re: [PATCH 1/3] virtiofsd: Find original inode ID of mount points

2021-06-04 Thread Max Reitz
On 02.06.21 20:59, Miklos Szeredi wrote: On Wed, 2 Jun 2021 at 20:20, Vivek Goyal wrote: On Wed, May 12, 2021 at 02:55:42PM +0200, Max Reitz wrote: Mount point directories represent two inodes: On one hand, they are a normal directory on their parent filesystem. On the other

[PATCH 8/9] virtiofsd: Optionally fill lo_inode.fhandle

2021-06-04 Thread Max Reitz
use statx(). Therefore, using file handles requires statx() support. Signed-off-by: Max Reitz --- tools/virtiofsd/helper.c | 3 + tools/virtiofsd/passthrough_ll.c | 170 -- tools/virtiofsd/passthrough_seccomp.c | 1 + 3 files changed, 165 insertions

[PATCH 4/9] virtiofsd: Let lo_fd() return a TempFd

2021-06-04 Thread Max Reitz
-off-by: Max Reitz --- tools/virtiofsd/passthrough_ll.c | 55 +--- 1 file changed, 44 insertions(+), 11 deletions(-) diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c index 46c9dfe200..8f64bcd6c5 100644 --- a/tools/virtiofsd

[PATCH 7/9] virtiofsd: Add inodes_by_handle hash table

2021-06-04 Thread Max Reitz
in the dentry cache, basically. Signed-off-by: Max Reitz --- tools/virtiofsd/passthrough_ll.c | 80 +--- 1 file changed, 64 insertions(+), 16 deletions(-) diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c index e665575401..793d2c333e 100644

[PATCH 3/9] virtiofsd: Add lo_inode_fd() helper

2021-06-04 Thread Max Reitz
Once we let lo_inode.fd be optional, we will need its users to open the file handle stored in lo_inode instead. This function will do that. For now, it just returns lo_inode.fd, though. Signed-off-by: Max Reitz --- tools/virtiofsd/passthrough_ll.c | 138 ++- 1 file

[PATCH 2/9] virtiofsd: Use lo_inode_open() instead of openat()

2021-06-04 Thread Max Reitz
this patch, lo_inode_open() is the only place to invoke openat() to reopen an existing FD with different flags. Signed-off-by: Max Reitz --- tools/virtiofsd/passthrough_ll.c | 43 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/tools/virtiofsd/passthrough_ll

[PATCH 6/9] virtiofsd: Add lo_inode.fhandle

2021-06-04 Thread Max Reitz
(mapping ID to FD). get_file_handle(), which is added by a later patch, will ensure that every mount ID for which we have generated a handle has a corresponding entry in mount_fds. Signed-off-by: Max Reitz --- tools/virtiofsd/passthrough_ll.c | 116 ++ tools/virtiofsd

Re: [PATCH] block/snapshot: Clarify goto fallback behavior

2021-06-04 Thread Max Reitz
On 03.06.21 18:02, Peter Maydell wrote: On Mon, 3 May 2021 at 10:55, Max Reitz wrote: In the bdrv_snapshot_goto() fallback code, we work with a pointer to either bs->file or bs->backing. We close that child, close the node (with .bdrv_close()), apply the snapshot on the chil

[PATCH 5/9] virtiofsd: Let lo_inode_open() return a TempFd

2021-06-04 Thread Max Reitz
()). Signed-off-by: Max Reitz --- tools/virtiofsd/passthrough_ll.c | 137 +-- 1 file changed, 59 insertions(+), 78 deletions(-) diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c index 8f64bcd6c5..3014e8baf8 100644 --- a/tools/virtiofsd

Re: [PATCH v2 33/33] iotests/image-fleecing: add test-case for copy-before-write filter

2021-06-01 Thread Max Reitz
without ** now. With them dropped: Reviewed-by: Max Reitz +'driver': 'copy-before-write', +'node-name': 'fl-cbw', +'file': src_node, +'target': tmp_node +})) + +log(vm.qmp('qom-set', path=qom_path, property='drive', value='fl-cbw

Re: [PATCH v2 32/33] iotests/image-fleecing: prepare for adding new test-case

2021-06-01 Thread Max Reitz
changed, 13 insertions(+), 6 deletions(-) Reviewed-by: Max Reitz

Re: [PATCH v2 31/33] iotests/image-fleecing: rename tgt_node

2021-06-01 Thread Max Reitz
ecing | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) Reviewed-by: Max Reitz

Re: [PATCH v2 30/33] iotests/image-fleecing: proper source device

2021-06-01 Thread Max Reitz
Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/tests/image-fleecing | 12 tests/qemu-iotests/tests/image-fleecing.out | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) Reviewed-by: Max Reitz

Re: [PATCH v2 29/33] iotests.py: hmp_qemu_io: support qdev

2021-06-01 Thread Max Reitz
On 20.05.21 16:22, Vladimir Sementsov-Ogievskiy wrote: Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/iotests.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) Reviewed-by: Max Reitz

Re: [PATCH v2 28/33] iotests: move 222 to tests/image-fleecing

2021-06-01 Thread Max Reitz
rtions(+), 0 deletions(-) rename tests/qemu-iotests/{222 => tests/image-fleecing} (100%) rename tests/qemu-iotests/{222.out => tests/image-fleecing.out} (100%) Reviewed-by: Max Reitz

Re: [PATCH v2 27/33] iotests/222: constantly use single quotes for strings

2021-06-01 Thread Max Reitz
deletions(-) Reviewed-by: Max Reitz

Re: [PATCH v2 26/33] iotests/222: fix pylint and mypy complains

2021-06-01 Thread Max Reitz
Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/222 | 20 +++- tests/qemu-iotests/297 | 2 +- 2 files changed, 12 insertions(+), 10 deletions(-) Reviewed-by: Max Reitz

Re: [PATCH v2 25/33] iotests.py: VM: add own __enter__ method

2021-06-01 Thread Max Reitz
-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/iotests.py | 4 1 file changed, 4 insertions(+) Reviewed-by: Max Reitz

Re: [PATCH v2 24/33] python/qemu/machine: QEMUMachine: improve qmp() method

2021-06-01 Thread Max Reitz
-Ogievskiy --- python/qemu/machine.py | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) Reviewed-by: Max Reitz

Re: [PATCH v2 23/33] python/qemu/machine.py: refactor _qemu_args()

2021-06-01 Thread Max Reitz
-- 1 file changed, 8 insertions(+), 10 deletions(-) Reviewed-by: Max Reitz

Re: [PATCH v2 22/33] qapi: publish copy-before-write filter

2021-06-01 Thread Max Reitz
blocks +# from its file child and copies them to @target child. After successful +# copying the write request is propagated to file child. If copying +# filed, the original write request is failed too and no data is written s/filed/failed/ With that fixed: Reviewed-by: Max Reitz +# to file child

Re: [PATCH v2 19/33] block/copy-before-write: initialize block-copy bitmap

2021-05-31 Thread Max Reitz
-before-write filter, and then backup modifies it. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/backup.c| 16 +++- block/copy-before-write.c | 4 2 files changed, 11 insertions(+), 9 deletions(-) Reviewed-by: Max Reitz

<    1   2   3   4   5   6   7   8   9   10   >