Re: [PATCH v3] 9pfs: use GHashTable for fid table

2022-09-08 Thread Greg Kurz
t; Signed-off-by: Linus Heckemann > Reviewed-by: Philippe Mathieu-Daudé > Reviewed-by: Greg Kurz > --- > > Greg Kurz writes: > > The comment above should be adapted to the new situation : no need > > I've removed it completely, since the logic is simple enou

Re: [PATCH] 9pfs: use GHashTable for fid table

2022-09-06 Thread Greg Kurz
19 +562,21 @@ static void coroutine_fn virtfs_reset(V9fsPDU *pdu) > { > V9fsState *s = pdu->s; > V9fsFidState *fidp; > +gpointer fid; > +GHashTableIter iter; > + > +g_hash_table_iter_init(, s->fids); > > /* Free all fids */ > -whi

Re: [PATCH] 9pfs: use GHashMap for fid table

2022-09-05 Thread Greg Kurz
Hi Linus, Thanks for this promising change ! On Mon, 05 Sep 2022 10:51:10 +0200 Linus Heckemann wrote: > Hi all, thanks for your reviews. > > > @@ -4226,7 +4232,7 @@ int v9fs_device_realize_common(V9fsState *s, const > > V9fsTransport *t, > > s->ctx.fmode = fse->fmode; > >

Re: [RFC PATCH v2] tests/9p: introduce declarative function calls

2022-08-29 Thread Greg Kurz
Hi Christian, On Thu, 18 Aug 2022 16:13:40 +0200 Christian Schoenebeck wrote: > On Montag, 18. Juli 2022 16:02:31 CEST Christian Schoenebeck wrote: > > On Montag, 18. Juli 2022 15:10:55 CEST Christian Schoenebeck wrote: > > > There are currently 4 different functions for sending a 9p 'Twalk' >

Re: [PATCH v2 1/1] hw/ppc: check if spapr_drc_index() returns NULL in spapr_nvdimm.c

2022-07-20 Thread Greg Kurz
178 > Signed-off-by: Daniel Henrique Barboza > --- > hw/ppc/spapr_nvdimm.c | 18 ++ > 1 file changed, 14 insertions(+), 4 deletions(-) > LGTM Reviewed-by: Greg Kurz > diff --git a/hw/ppc/spapr_nvdimm.c b/hw/ppc/spapr_nvdimm.c > index c4c97da5de..04a64

Re: [PATCH] target/ppc/cpu-models: Remove the "default" CPU alias

2022-07-05 Thread Greg Kurz
> Signed-off-by: Thomas Huth > --- Good riddance ! Reviewed-by: Greg Kurz > target/ppc/cpu-models.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/target/ppc/cpu-models.c b/target/ppc/cpu-models.c > index 976be5e0d1..2667440f73 100644 > ---

Re: [RFC PATCH] tests/9p: introduce declarative function calls

2022-06-29 Thread Greg Kurz
Hi Christian, On Fri, 24 Jun 2022 19:46:18 +0200 Christian Schoenebeck wrote: > There are currently 3 different functions for sending a 9p 'Twalk' > request. They are all doing the same thing, just in a slightly different > way and with slightly different function arguments. > > Merge those 3

Re: [PATCH v4 5/7] 9pfs: fix 'Twalk' to only send error if no component walked

2022-06-16 Thread Greg Kurz
On Wed, 15 Jun 2022 18:36:46 +0200 Christian Schoenebeck wrote: > On Mittwoch, 15. Juni 2022 17:52:49 CEST Greg Kurz wrote: > > On Tue, 15 Mar 2022 11:08:39 +0100 > > > > Christian Schoenebeck wrote: > > > Current implementation of 'Twalk' request handling

Re: [PATCH v4 7/7] tests/9pfs: check fid being unaffected in fs_walk_2nd_nonexistent

2022-06-15 Thread Greg Kurz
t; > Signed-off-by: Christian Schoenebeck > --- Reviewed-by: Greg Kurz > tests/qtest/virtio-9p-test.c | 26 ++ > 1 file changed, 22 insertions(+), 4 deletions(-) > > diff --git a/tests/qtest/virtio-9p-test.c b/tests/qtest/virtio-9p-test.c > index f6e78d38

Re: [PATCH v4 5/7] 9pfs: fix 'Twalk' to only send error if no component walked

2022-06-15 Thread Greg Kurz
is making an exception to the spec excerpt you're mentioning in the changelog. EINTR can only come from the v9fs_request_cancelled(pdu) == true case, since QEMU doesn't have signal handlers AFAIK. This would be the result of a TFLUSH , likely to handle ^C from the client side. I guess that in that

Re: [PATCH v4 3/7] tests/9pfs: compare QIDs in fs_walk_none() test

2022-06-15 Thread Greg Kurz
On Tue, 15 Mar 2022 11:08:35 +0100 Christian Schoenebeck wrote: > Extend previously added fs_walk_none() test by comparing the QID > of the root fid with the QID of the cloned fid. They should be > equal. > > Signed-off-by: Christian Schoenebeck > --- LGTM. Reviewed-by: Gr

Re: [PATCH] target/ppc/cpu-models: Update max alias to power10

2022-06-02 Thread Greg Kurz
On Thu, 2 Jun 2022 09:10:57 -0300 Murilo Opsfelder Araújo wrote: > Hi, Greg. > > On 6/1/22 05:38, Greg Kurz wrote: > > On Wed, 1 Jun 2022 09:27:31 +0200 > > Thomas Huth wrote: > > > >> On 31/05/2022 19.27, Murilo Opsfelder Araujo wrote: > >>&g

Re: [PATCH] target/ppc/cpu-models: Update max alias to power10

2022-06-01 Thread Greg Kurz
On Wed, 1 Jun 2022 11:25:43 +0200 Thomas Huth wrote: > On 01/06/2022 10.38, Greg Kurz wrote: > > On Wed, 1 Jun 2022 09:27:31 +0200 > > Thomas Huth wrote: > > > >> On 31/05/2022 19.27, Murilo Opsfelder Araujo wrote: > >>> Update max alias to pow

Re: [PATCH] target/ppc/cpu-models: Update max alias to power10

2022-06-01 Thread Greg Kurz
On Wed, 1 Jun 2022 09:27:31 +0200 Thomas Huth wrote: > On 31/05/2022 19.27, Murilo Opsfelder Araujo wrote: > > Update max alias to power10 so users can take advantage of a more > > recent CPU model when '-cpu max' is provided. > > > > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1038

Re: [PATCH 02/18] block: Add a 'flags' param to blk_pread()

2022-05-17 Thread Greg Kurz
; - blk_pread(blk, offset, buf, bytes) > + blk_pread(blk, offset, buf, bytes, 0) > > It had no effect on hw/block/nand.c, presumably due to the #if, so that > file was updated manually. > > Overly-long lines were then fixed by hand. > > Signed-off-by: Alberto Fari

Re: [PATCH 01/18] block: Make blk_{pread,pwrite}() return 0 on success

2022-05-17 Thread Greg Kurz
| 2 +- > hw/misc/mac_via.c| 2 +- > hw/misc/sifive_u_otp.c | 2 +- > hw/nvram/eeprom_at24c.c | 4 ++-- > hw/nvram/spapr_nvram.c | 12 ++-- > hw/ppc/pnv_pnor.c| 2 +- For PPC and sPAPR parts Reviewed-by: G

Re: [PATCH 5/9] hw/9pfs: Add a 'local' file system backend driver for Windows

2022-05-11 Thread Greg Kurz
tmost path element, paths from the client have to be broken down into a succession of *at() syscalls, one for each element. > Best Regards, > Guohuai > > > -Original Message- > > From: Greg Kurz > > Sent: 2022年5月10日 22:35 > > To: Christian Schoenebeck > &g

Re: [PATCH 5/9] hw/9pfs: Add a 'local' file system backend driver for Windows

2022-05-10 Thread Greg Kurz
On Tue, 10 May 2022 16:04:28 +0200 Christian Schoenebeck wrote: > On Dienstag, 10. Mai 2022 15:40:06 CEST Greg Kurz wrote: > > On Tue, 10 May 2022 13:54:46 +0200 > > > > Christian Schoenebeck wrote: > > > On Dienstag, 10. Mai 2022 12:18:33 CEST Christian Schoeneb

Re: [PATCH 5/9] hw/9pfs: Add a 'local' file system backend driver for Windows

2022-05-10 Thread Greg Kurz
On Tue, 10 May 2022 13:54:46 +0200 Christian Schoenebeck wrote: > On Dienstag, 10. Mai 2022 12:18:33 CEST Christian Schoenebeck wrote: > > On Dienstag, 10. Mai 2022 04:17:44 CEST Shi, Guohuai wrote: > > [...] > > > > > > > > > I tend to agree with Christian's remarks that this patch is too > >

Re: [PATCH 5/9] hw/9pfs: Add a 'local' file system backend driver for Windows

2022-05-09 Thread Greg Kurz
On Mon, 9 May 2022 15:09:46 + "Shi, Guohuai" wrote: > > > > -Original Message----- > > From: Greg Kurz > > Sent: 2022年5月9日 22:29 > > To: Bin Meng > > Cc: Christian Schoenebeck ; qemu-devel@nongnu.org; > > Shi, > > Guoh

Re: [PATCH 5/9] hw/9pfs: Add a 'local' file system backend driver for Windows

2022-05-09 Thread Greg Kurz
On Mon, 25 Apr 2022 22:27:01 +0800 Bin Meng wrote: > From: Guohuai Shi > > Add a 9p local file system backend driver to support Windows, > including open, read, write, close, rename, remove, etc. > > All security models are supported. The mapped (mapped-xattr) > security model is implemented

Re: [PATCH v5 2/6] 9pfs: fix qemu_mknodat(S_IFSOCK) on macOS

2022-05-02 Thread Greg Kurz
On Fri, 29 Apr 2022 17:20:26 +0200 Christian Schoenebeck wrote: > On Freitag, 29. April 2022 16:35:07 CEST Greg Kurz wrote: > > On Fri, 29 Apr 2022 15:50:35 +0200 > > > > Christian Schoenebeck wrote: > > > On Freitag, 29. April 2022 14:56:50 CEST Greg Kurz wrote:

Re: [PATCH v5 2/6] 9pfs: fix qemu_mknodat(S_IFSOCK) on macOS

2022-04-29 Thread Greg Kurz
On Fri, 29 Apr 2022 15:50:35 +0200 Christian Schoenebeck wrote: > On Freitag, 29. April 2022 14:56:50 CEST Greg Kurz wrote: > > On Fri, 29 Apr 2022 12:25:11 +0200 > > > > Christian Schoenebeck wrote: > > > mknod() on macOS does not support creating sockets, so

Re: [PATCH v5 4/6] 9pfs: fix wrong errno being sent to Linux client on macOS host

2022-04-29 Thread Greg Kurz
On Fri, 29 Apr 2022 21:19:51 +0800 Bin Meng wrote: > On Fri, Apr 29, 2022 at 9:08 PM Greg Kurz wrote: > > > > On Fri, 29 Apr 2022 14:46:26 +0200 > > Christian Schoenebeck wrote: > > > > > On Freitag, 29. April 2022 13:28:39 CEST Bin Meng wrote: > > >

Re: [PATCH v5 4/6] 9pfs: fix wrong errno being sent to Linux client on macOS host

2022-04-29 Thread Greg Kurz
the same issue we were trying to fix when > > supporting 9p on Windows host, > > > > What we did is like this: > > http://patchwork.ozlabs.org/project/qemu-devel/patch/20220425142705.2099270-> > > 10-bmeng...@gmail.com/ > > > > But we had some questions in

Re: [PATCH v5 2/6] 9pfs: fix qemu_mknodat(S_IFSOCK) on macOS

2022-04-29 Thread Greg Kurz
of(addr.sun_path)) { According to POSIX [1]: The snprintf() function shall fail if: [EOVERFLOW] [CX] [Option Start] The value of n is greater than {INT_MAX}. [Option End] [1] https://pubs.opengroup.org/onlinepubs/9699919799/functions/snprintf.html Since we're passing sizeof(addr.sun_path)

Re: [PATCH v5 4/6] 9pfs: fix wrong errno being sent to Linux client on macOS host

2022-04-29 Thread Greg Kurz
t in general. > > This issue looks exact the same issue we were trying to fix when > supporting 9p on Windows host, > > What we did is like this: > http://patchwork.ozlabs.org/project/qemu-devel/patch/20220425142705.2099270-10-bmeng...@gmail.com/ > > But we had some questi

Re: [PATCH v4 2/6] 9pfs: fix qemu_mknodat(S_IFSOCK) on macOS

2022-04-27 Thread Greg Kurz
+ * > + * Filed report with Apple: FB9997731 > + */ > +err = fchmodat(AT_FDCWD, filename, mode, AT_SYMLINK_NOFOLLOW_ANY); > +out: > +close_preserve_errno(fd); You could close(fd) earlier now, but you might want to keep the code as is in case FB9997731 gets proper at

Re: [PATCH v4 1/6] 9pfs: fix qemu_mknodat(S_IFREG) on macOS

2022-04-27 Thread Greg Kurz
ns/mknod.html > Link: https://lore.kernel.org/qemu-devel/17933734.zYzKuhC07K@silver/ > Signed-off-by: Christian Schoenebeck > Reviewed-by: Will Cohen > Reviewed-by: Greg Kurz > --- > hw/9pfs/9p-util-darwin.c | 9 + > 1 file changed, 9 insertions(+) > > diff --gi

Re: [PATCH v2 2/5] 9pfs: fix qemu_mknodat(S_IFSOCK) on macOS

2022-04-27 Thread Greg Kurz
On Wed, 27 Apr 2022 18:18:31 +0200 Christian Schoenebeck wrote: > On Mittwoch, 27. April 2022 15:31:42 CEST Greg Kurz wrote: > > On Wed, 27 Apr 2022 14:32:53 +0200 > > > > Christian Schoenebeck wrote: > > > On Mittwoch, 27. April 2022 12:18:10 CEST Greg Kurz wrot

Re: [PATCH v2 2/5] 9pfs: fix qemu_mknodat(S_IFSOCK) on macOS

2022-04-27 Thread Greg Kurz
On Wed, 27 Apr 2022 14:32:53 +0200 Christian Schoenebeck wrote: > On Mittwoch, 27. April 2022 12:18:10 CEST Greg Kurz wrote: > > On Wed, 27 Apr 2022 11:27:28 +0900 > > > > Akihiko Odaki wrote: > > > On 2022/04/26 21:38, Greg Kurz wrote: > > [..skip

Re: [PATCH v2 2/5] 9pfs: fix qemu_mknodat(S_IFSOCK) on macOS

2022-04-27 Thread Greg Kurz
On Wed, 27 Apr 2022 11:27:28 +0900 Akihiko Odaki wrote: > On 2022/04/26 21:38, Greg Kurz wrote: [..skip..] > > > > I think Christian's explanation is clear enough. We don't guarantee > > that v9fs_co_foo() calls run atomically. As a consequence, the client > >

Re: [PATCH] 9pfs: local: Do not follow symlink in _nofollow

2022-04-27 Thread Greg Kurz
On Wed, 27 Apr 2022 10:46:31 +0200 Christian Schoenebeck wrote: > On Mittwoch, 27. April 2022 04:45:45 CEST Akihiko Odaki wrote: > > Signed-off-by: Akihiko Odaki > > --- > > hw/9pfs/9p-local.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/hw/9pfs/9p-local.c

Re: [PATCH v3 2/6] 9pfs: fix qemu_mknodat(S_IFSOCK) on macOS

2022-04-27 Thread Greg Kurz
-devel/17933734.zYzKuhC07K@silver/ > Signed-off-by: Christian Schoenebeck > Reviewed-by: Will Cohen > Reviewed-by: Greg Kurz > --- Nack until the chmod() issue is addressed. :-\ > hw/9pfs/9p-util-darwin.c | 34 +- > 1 file changed, 33 insertions(+), 1

Re: [PATCH v2 2/5] 9pfs: fix qemu_mknodat(S_IFSOCK) on macOS

2022-04-26 Thread Greg Kurz
On Tue, 26 Apr 2022 12:57:37 +0900 Akihiko Odaki wrote: > On 2022/04/25 3:45, Christian Schoenebeck wrote: > > +} > > +err = chmod(addr.sun_path, mode); > > I'm not sure if it is fine to have a time window between bind() and > chmod(). Do you have some rationale? >

Re: [PATCH v3 6/6] 9pfs: fix qemu_mknodat() to always return -1 on error on macOS host

2022-04-25 Thread Greg Kurz
ian Schoenebeck > --- Reviewed-by: Greg Kurz > hw/9pfs/9p-util-darwin.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/hw/9pfs/9p-util-darwin.c b/hw/9pfs/9p-util-darwin.c > index 63797e60cd..7364da394c 100644 > --- a/hw/9pfs/9p-util-darwin.c > +++

Re: [PATCH v2 5/5] 9pfs: fix removing non-existent POSIX ACL xattr on macOS host

2022-04-21 Thread Greg Kurz
reserve=mode old new > > Signed-off-by: Christian Schoenebeck > Link: https://lore.kernel.org/qemu-devel/2866993.yOYK24bMf6@silver/ > --- Reviewed-by: Greg Kurz > hw/9pfs/9p-posix-acl.c | 12 ++-- > 1 file changed, 10 insertions(+), 2 deletions(-) > > diff --g

Re: [PATCH v2 2/5] 9pfs: fix qemu_mknodat(S_IFSOCK) on macOS

2022-04-21 Thread Greg Kurz
; +snprintf(addr.sun_path, sizeof(addr.sun_path), "./%s", filename); > +err = bind(fd, (struct sockaddr *) , sizeof(addr)); > +if (err == -1) { > +goto out; > +} > +err = chmod(addr.sun_path, mode); > +out: > +close(fd); You need close_pres

Re: [PATCH v2 1/5] 9pfs: fix qemu_mknodat(S_IFREG) on macOS

2022-04-21 Thread Greg Kurz
lent to type S_IFREG". > > Link: https://lore.kernel.org/qemu-devel/17933734.zYzKuhC07K@silver/ > Signed-off-by: Christian Schoenebeck > Reviewed-by: Will Cohen > --- Reviewed-by: Greg Kurz > hw/9pfs/9p-util-darwin.c | 9 + > 1 file changed, 9 insertions(+) >

Re: [PATCH v2 3/5] 9pfs: fix wrong encoding of rdev field in Rgetattr on macOS

2022-04-21 Thread Greg Kurz
beck > Link: https://lore.kernel.org/qemu-devel/20220421093056.5ab1e7ed@bahia/ > Reviewed-by: Greg Kurz > --- Reviewed-again-by: Greg Kurz > hw/9pfs/9p-util.h | 39 +++ > hw/9pfs/9p.c | 2 +- > 2 files changed, 40 insertions(+), 1 deletion(

Re: [PATCH v2 4/5] 9pfs: fix wrong errno being sent to Linux client on macOS host

2022-04-21 Thread Greg Kurz
PPORT==93 on Linux, so Linux client believed > that xattrs were not supported by filesystem on host in general. > > Signed-off-by: Christian Schoenebeck > Link: https://lore.kernel.org/qemu-devel/20220421124835.3e664669@bahia/ > --- Reviewed-by: Greg Kurz > hw/9pfs/9p-util.h |

Re: [PATCH 5/5] 9pfs: fix removing non-existent POSIX ACL xattr on macOS host

2022-04-21 Thread Greg Kurz
On Thu, 21 Apr 2022 12:55:24 +0200 Christian Schoenebeck wrote: > On Donnerstag, 21. April 2022 10:26:11 CEST Greg Kurz wrote: > > On Tue, 19 Apr 2022 13:43:30 +0200 > > > > Christian Schoenebeck wrote: > > > When mapped POSIX ACL is used, we are ignoring erro

Re: [PATCH 4/5] 9pfs: fix wrong errno being sent to Linux client on macOS host

2022-04-21 Thread Greg Kurz
On Thu, 21 Apr 2022 13:13:08 +0200 Christian Schoenebeck wrote: > On Donnerstag, 21. April 2022 12:48:35 CEST Greg Kurz wrote: > > On Tue, 19 Apr 2022 13:41:59 +0200 > > > > Christian Schoenebeck wrote: > > > Linux and macOS only share some errno definitio

Re: [PATCH 3/5] 9pfs: fix wrong encoding of rdev field in Rgetattr on macOS

2022-04-21 Thread Greg Kurz
On Thu, 21 Apr 2022 12:25:23 +0200 Christian Schoenebeck wrote: > On Donnerstag, 21. April 2022 09:30:56 CEST Greg Kurz wrote: > > On Tue, 19 Apr 2022 13:41:15 +0200 > > > > Christian Schoenebeck wrote: > > > The 'rdev' field in 9p reponse 'Rgetattr' is of type

Re: [PATCH 4/5] 9pfs: fix wrong errno being sent to Linux client on macOS host

2022-04-21 Thread Greg Kurz
On Tue, 19 Apr 2022 13:41:59 +0200 Christian Schoenebeck wrote: > Linux and macOS only share some errno definitions with equal macro > name and value. In fact most mappings for errno are completely > different on the two systems. > > This patch converts some important errno values from macOS

Re: [PATCH 5/5] 9pfs: fix removing non-existent POSIX ACL xattr on macOS host

2022-04-21 Thread Greg Kurz
On Tue, 19 Apr 2022 13:43:30 +0200 Christian Schoenebeck wrote: > When mapped POSIX ACL is used, we are ignoring errors when trying > to remove a POSIX ACL xattr that does not exist. On Linux hosts we > would get ENODATA in such cases, on macOS hosts however we get > ENOATTR instead, so ignore

Re: [PATCH 3/5] 9pfs: fix wrong encoding of rdev field in Rgetattr on macOS

2022-04-21 Thread Greg Kurz
of > + * dev_t is system dependant, we have to convert them for Linux guests if > + * host is not running Linux. > + */ > +static uint64_t host_dev_to_dotl_dev(dev_t dev) > +{ > +#ifdef CONFIG_LINUX > +return dev; > +#else > +return makedev_dotl(major(dev), minor(dev)

Re: [PATCH 2/5] 9pfs: fix qemu_mknodat(S_IFSOCK) on macOS

2022-04-20 Thread Greg Kurz
On Wed, 20 Apr 2022 12:28:01 +0200 Christian Schoenebeck wrote: > On Mittwoch, 20. April 2022 11:09:46 CEST Greg Kurz wrote: > > On Tue, 19 Apr 2022 13:41:03 +0200 > > > > Christian Schoenebeck wrote: > > > mknod() on macOS does not support creating sockets, so

Re: [PATCH 2/5] 9pfs: fix qemu_mknodat(S_IFSOCK) on macOS

2022-04-20 Thread Greg Kurz
On Tue, 19 Apr 2022 13:41:03 +0200 Christian Schoenebeck wrote: > mknod() on macOS does not support creating sockets, so divert to > call sequence socket(), bind() and chmod() respectively if S_IFSOCK > was passed with mode argument. > > Link:

Re: [PATCH 2/5] 9pfs: fix qemu_mknodat(S_IFSOCK) on macOS

2022-04-20 Thread Greg Kurz
On Tue, 19 Apr 2022 13:41:03 +0200 Christian Schoenebeck wrote: > mknod() on macOS does not support creating sockets, so divert to > call sequence socket(), bind() and chmod() respectively if S_IFSOCK > was passed with mode argument. > Hmm... thinking again about this one : QEMU on linux calls

Re: [PATCH 1/5] 9pfs: fix qemu_mknodat(S_IFREG) on macOS

2022-04-20 Thread Greg Kurz
On Wed, 20 Apr 2022 11:03:52 +0900 Akihiko Odaki wrote: > On 2022/04/19 20:40, Christian Schoenebeck wrote: > > mknod() on macOS does not support creating regular files, so > > divert to openat_file() if S_IFREG is passed with mode argument. > > > > Furthermore, 'man 2 mknodat' on Linux says:

Re: [PATCH v9 09/11] 9p: darwin: Implement compatibility for mknodat

2022-04-08 Thread Greg Kurz
On Fri, 08 Apr 2022 15:52:25 +0200 Christian Schoenebeck wrote: > On Sonntag, 27. Februar 2022 23:35:20 CEST Will Cohen wrote: > > From: Keno Fischer > > > > Darwin does not support mknodat. However, to avoid race conditions > > with later setting the permissions, we must avoid using mknod on

Re: [PATCH v4 0/7] 9pfs: fix 'Twalk' protocol violation

2022-03-29 Thread Greg Kurz
On Tue, 29 Mar 2022 12:21:13 +0200 Christian Schoenebeck wrote: > On Dienstag, 15. März 2022 11:10:25 CEST Christian Schoenebeck wrote: > > Currently the implementation of 'Twalk' does not behave exactly as specified > > by the 9p2000 protocol specification. Actual fix is patch 5; see the > >

Re: [PATCH] 9pfs: fix inode sequencing in 'synth' driver

2022-03-16 Thread Greg Kurz
Link: https://lore.kernel.org/qemu-devel/3859307.hTDP4D0zbi@silver/ > Signed-off-by: Christian Schoenebeck > --- Good catch ! Reviewed-by: Greg Kurz > hw/9pfs/9p-synth.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/hw/9pfs/9p-synth.c b/h

Re: [PATCH 2/3] 9pfs: Use g_new() & friends where that makes obvious sense

2022-03-15 Thread Greg Kurz
warning generated. > > Harmless, because QppEntry is larger than QpfEntry. Fix to allocate a > QpfEntry instead. > > Cc: Greg Kurz > Cc: Christian Schoenebeck > Signed-off-by: Markus Armbruster > --- Reviewed-by: Greg Kurz > hw/9pfs/9p-proxy.c

Re: [PATCH 5/6] 9pfs: fix 'Twalk' to only send error if no component walked

2022-03-11 Thread Greg Kurz
On Fri, 11 Mar 2022 17:44:54 +0100 Christian Schoenebeck wrote: > On Freitag, 11. März 2022 17:35:41 CET Greg Kurz wrote: > > On Thu, 10 Mar 2022 10:13:33 +0100 > > > > Christian Schoenebeck wrote: > > > On Mittwoch, 9. März 2022 18:57:39 CET Christian Scho

Re: [PATCH 3/6] tests/9pfs: compare QIDs in fs_walk_none() test

2022-03-11 Thread Greg Kurz
On Fri, 11 Mar 2022 17:39:56 +0100 Christian Schoenebeck wrote: > On Freitag, 11. März 2022 17:11:24 CET Greg Kurz wrote: > > On Thu, 10 Mar 2022 10:04:50 +0100 > > > > Christian Schoenebeck wrote: > > > On Mittwoch, 9. März 2022 15:49:04 CET Christian Sch

Re: [PATCH 6/6] tests/9pfs: guard recent 'Twalk' behaviour fix

2022-03-11 Thread Greg Kurz
err) > { > @@ -1048,9 +1058,33 @@ static void fs_walk_nonexistent(void *obj, void *data, > QGuestAllocator *t_alloc) > alloc = t_alloc; > > do_attach(v9p); > +/* > + * The 9p2000 protocol spec sais: "If the first element cannot be walked s/

Re: [PATCH 5/6] 9pfs: fix 'Twalk' to only send error if no component walked

2022-03-11 Thread Greg Kurz
On Thu, 10 Mar 2022 10:13:33 +0100 Christian Schoenebeck wrote: > On Mittwoch, 9. März 2022 18:57:39 CET Christian Schoenebeck wrote: > > Current implementation of 'Twalk' request handling always sends an 'Rerror' > > response if any error occured. The 9p2000 protocol spec sais though: > > > >

Re: [PATCH 4/6] 9pfs: refactor 'name_idx' -> 'nvalid' in v9fs_walk()

2022-03-11 Thread Greg Kurz
t struct stat *a, const > > struct stat *b) > > > > static void coroutine_fn v9fs_walk(void *opaque) > > { > > -int name_idx; > > + int name_idx, nvalid; > > Or rather renaming this nvalid -> nfetched? > or simply nwalked ? Anyway, Review

Re: [PATCH 3/6] tests/9pfs: compare QIDs in fs_walk_none() test

2022-03-11 Thread Greg Kurz
On Thu, 10 Mar 2022 10:04:50 +0100 Christian Schoenebeck wrote: > On Mittwoch, 9. März 2022 15:49:04 CET Christian Schoenebeck wrote: > > Extend previously added fs_walk_none() test by comparing the QID > > of the root fid with the QID of the cloned fid. They should be > > equal. > > Ha, I

Re: [PATCH 2/6] tests/9pfs: Twalk with nwname=0

2022-03-11 Thread Greg Kurz
=0 does clone the fid in practice but the test doesn't explicitly check that. In its present form, I'd suggest a "no_names" wording but it is already fine as is, so: Reviewed-by: Greg Kurz > > +QVirtio9P *v9p = obj; > > +alloc = t_alloc;

Re: [PATCH 1/6] tests/9pfs: walk to non-existent dir

2022-03-11 Thread Greg Kurz
On Wed, 9 Mar 2022 13:18:50 +0100 Christian Schoenebeck wrote: > Expect ENOENT Rlerror response when trying to walk to a > non-existent directory. > > Signed-off-by: Christian Schoenebeck > --- Reviewed-by: Greg Kurz > tests/qtest/virtio-9p-test.c | 30 +

Re: [PULL 00/19] 9p queue 2022-03-04

2022-03-07 Thread Greg Kurz
On Fri, 4 Mar 2022 16:31:07 -0500 Will Cohen wrote: > On Fri, Mar 4, 2022 at 3:16 PM Christian Schoenebeck > wrote: > > > On Freitag, 4. März 2022 19:42:18 CET Peter Maydell wrote: > > > On Fri, 4 Mar 2022 at 12:32, Christian Schoenebeck > > > > > > wrote: > > > > The following changes since

Re: [PATCH 0/2] virtiofsd: Support FUSE_SYNCFS on unannounced submounts

2022-03-04 Thread Greg Kurz
On Fri, 4 Mar 2022 07:11:29 -0500 Vivek Goyal wrote: > On Thu, Mar 03, 2022 at 06:13:21PM +0100, Greg Kurz wrote: > > This is the current patches I have : one to track submounts > > and the other to call syncfs() on them. Tested on simple > > cases only. > >

Re: [PATCH 0/6] 9pfs: convert Doxygen -> kerneldoc format

2022-03-03 Thread Greg Kurz
w/9pfs/coth.h| 4 +-- > 6 files changed, 84 insertions(+), 72 deletions(-) > LGTM. Reviewed-by: Greg Kurz

[PATCH 2/2] virtiofsd: Support FUSE_SYNCFS on unannounced submounts

2022-03-03 Thread Greg Kurz
client so that it knows that the flush didn't fully succeed. Signed-off-by: Greg Kurz --- tools/virtiofsd/passthrough_ll.c | 37 ++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c index 177

[PATCH 1/2] virtiofsd: Track submounts

2022-03-03 Thread Greg Kurz
into a dedicated hash : this will allow to iterate on them in lo_syncfs(). Signed-off-by: Greg Kurz --- tools/virtiofsd/passthrough_ll.c | 24 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c index

[PATCH 0/2] virtiofsd: Support FUSE_SYNCFS on unannounced submounts

2022-03-03 Thread Greg Kurz
This is the current patches I have : one to track submounts and the other to call syncfs() on them. Tested on simple cases only. I won't be able to work on this anymore, so I'm posting for the records. Anyone is welcome to pick it up as there won't be a v2 from my side. Cheers, -- Greg Greg

Re: [PATCH] 9pfs: drop Doxygen format from qemu_dirent_dup() API comment

2022-03-03 Thread Greg Kurz
On Thu, 03 Mar 2022 11:55:36 +0100 Christian Schoenebeck wrote: > On Donnerstag, 3. März 2022 10:53:32 CET Greg Kurz wrote: > > On Wed, 2 Mar 2022 19:30:39 +0100 > > > > Christian Schoenebeck wrote: > > > API doc comments in QEMU are supposed to b

Re: [SPAM] [PATCH] 9pfs: drop Doxygen format from qemu_dirent_dup() API comment

2022-03-03 Thread Greg Kurz
.org/qemu-devel/cafeaca89+enom6x19oef53kd2dwkhn5sn21va0d7yepjsa3...@mail.gmail.com/ > Based-on: > Signed-off-by: Christian Schoenebeck > --- Sorry for not catching these during previous reviews :-\ Reviewed-by: Greg Kurz FWIW it seems some more de-doxygenation is needed : fsdev/p9array.h: * Consider the follow

Re: [PATCH v9 09/11] 9p: darwin: Implement compatibility for mknodat

2022-02-28 Thread Greg Kurz
On Mon, 28 Feb 2022 08:37:10 -0500 Will Cohen wrote: > On Mon, Feb 28, 2022 at 8:20 AM Christian Schoenebeck < > qemu_...@crudebyte.com> wrote: > > > On Sonntag, 27. Februar 2022 23:35:20 CET Will Cohen wrote: > > > From: Keno Fischer > > > > > > Darwin does not support mknodat. However, to

Re: [Virtio-fs] [PATCH] virtiofsd: Let meson check for statx.stx_mnt_id

2022-02-23 Thread Greg Kurz
> Closes: https://gitlab.com/qemu-project/qemu/-/issues/882 > Signed-off-by: Hanna Reitz > --- Reviewed-by: Greg Kurz > meson.build | 13 + > tools/virtiofsd/passthrough_ll.c | 2 +- > 2 files changed, 14 insertions(+), 1 deletion(-) >

Re: [PULL v2 5/5] 9pfs: Fix segfault in do_readdir_many caused by struct dirent overread

2022-02-22 Thread Greg Kurz
On Tue, 22 Feb 2022 14:54:17 +0100 Christian Schoenebeck wrote: > On Dienstag, 22. Februar 2022 14:21:52 CET Peter Maydell wrote: > > On Thu, 17 Feb 2022 at 16:43, Christian Schoenebeck > > > > wrote: > > > diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h > > > index

Re: [PATCH v5] 9pfs: Fix segfault in do_readdir_many caused by struct dirent overread

2022-02-17 Thread Greg Kurz
ff-by: Vitaly Chikunov > --- > Tested on x68-64 Linux with btrfs-progs tests and qos-test -m slow. > Changes since v4: > - Zero clear V9fsSynthOpenState on allocation. Uninitialised use of > d_reclen bug found by fuzzing. Use g_new0 instead of g_malloc0 as > Greg Kurz suggested. >

Re: [PULL 0/5] 9p queue 2022-02-10

2022-02-16 Thread Greg Kurz
On Wed, 16 Feb 2022 11:30:12 +0100 Christian Schoenebeck wrote: > On Dienstag, 15. Februar 2022 08:01:37 CET Greg Kurz wrote: > > On Mon, 14 Feb 2022 17:43:51 +0300 > > > > Vitaly Chikunov wrote: > > > Why g_new0 and not just g_malloc0? This is smallest

[PATCH v6 0/1] virtiofsd: Add support for FUSE_SYNCFS request

2022-02-15 Thread Greg Kurz
ill not upstream) https://listman.redhat.com/archives/virtio-fs/2021-May/msg00025.html v2: - based on new version of FUSE_SYNCFS https://listman.redhat.com/archives/virtio-fs/2021-April/msg00166.html - propagate syncfs() errors to client (Vivek) Greg Kurz (1): virtiofsd: Add ba

[PATCH v6 1/1] virtiofsd: Add basic support for FUSE_SYNCFS request

2022-02-15 Thread Greg Kurz
are being hammered by some unrelated workload on the host. The only solution to prevent that is to avoid shared mounts. Signed-off-by: Greg Kurz --- tools/virtiofsd/fuse_lowlevel.c | 11 +++ tools/virtiofsd/fuse_lowlevel.h | 13 tools/virtiofsd/passthrough_ll.c | 44

Re: [PATCH v5 3/3] virtiofsd: Add support for FUSE_SYNCFS request without announce_submounts

2022-02-15 Thread Greg Kurz
On Mon, 14 Feb 2022 14:09:47 -0500 Vivek Goyal wrote: > On Mon, Feb 14, 2022 at 01:56:08PM -0500, Vivek Goyal wrote: > > On Mon, Feb 14, 2022 at 01:27:22PM -0500, Vivek Goyal wrote: > > > On Mon, Feb 14, 2022 at 02:58:20PM +0100, Greg Kurz wrote: > > > > This ad

Re: [PATCH v5 3/3] virtiofsd: Add support for FUSE_SYNCFS request without announce_submounts

2022-02-15 Thread Greg Kurz
On Mon, 14 Feb 2022 13:27:22 -0500 Vivek Goyal wrote: > On Mon, Feb 14, 2022 at 02:58:20PM +0100, Greg Kurz wrote: > > This adds the missing bits to support FUSE_SYNCFS in the case submounts > > aren't announced to the client. > > > > Iterate over all inodes and call

Re: [PULL 0/5] 9p queue 2022-02-10

2022-02-14 Thread Greg Kurz
On Mon, 14 Feb 2022 17:43:51 +0300 Vitaly Chikunov wrote: > Christian, > > On Mon, Feb 14, 2022 at 12:44:48PM +0100, Christian Schoenebeck wrote: > > On Montag, 14. Februar 2022 11:36:53 CET Greg Kurz wrote: > > > The synth backend should be fixed to honor d_r

Re: [PATCH v5 2/3] virtiofsd: Track submounts

2022-02-14 Thread Greg Kurz
On Mon, 14 Feb 2022 14:58:19 +0100 Greg Kurz wrote: > If > Support for FUSE_SYNCFS requires the server to track submounts > > that may exist under the shared directory. lo_do_lookup() already knows > how to detect them : it is a directory with a different device ID or > mount

Re: [Virtio-fs] [PATCH v5 1/3] virtiofsd: Add support for FUSE_SYNCFS request with announce_submounts

2022-02-14 Thread Greg Kurz
On Mon, 14 Feb 2022 16:43:15 +0100 German Maglione wrote: > On Mon, Feb 14, 2022 at 3:00 PM Greg Kurz wrote: > > > Honor the expected behavior of syncfs() to synchronously flush all data > > and metadata to disk on linux systems. > > > > If virtiofsd is start

[PATCH v5 3/3] virtiofsd: Add support for FUSE_SYNCFS request without announce_submounts

2022-02-14 Thread Greg Kurz
ver to process other requests. This is thus broken down in two steps. First build a list of submounts with lo->mutex held, drop the mutex and finally process the list. A reference is taken on the inodes to ensure they don't go away when lo->mutex is dropped. Signed-off-by: Greg Kurz -

[PATCH v5 2/3] virtiofsd: Track submounts

2022-02-14 Thread Greg Kurz
structure. Signed-off-by: Greg Kurz --- tools/virtiofsd/passthrough_ll.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c index 2bf5d40df531..e94c4e6f8635 100644 --- a/tools/virtiofsd

[PATCH v5 1/3] virtiofsd: Add support for FUSE_SYNCFS request with announce_submounts

2022-02-14 Thread Greg Kurz
are being hammered by some unrelated workload on the host. The only solution to prevent that is to avoid shared mounts. Signed-off-by: Greg Kurz --- tools/virtiofsd/fuse_lowlevel.c | 11 +++ tools/virtiofsd/fuse_lowlevel.h | 13 tools/virtiofsd/passthrough_ll.c | 45

[PATCH v5 0/3] virtiofsd: Add support for FUSE_SYNCFS request

2022-02-14 Thread Greg Kurz
v2: - based on new version of FUSE_SYNCFS https://listman.redhat.com/archives/virtio-fs/2021-April/msg00166.html - propagate syncfs() errors to client (Vivek) Greg Kurz (3): virtiofsd: Add support for FUSE_SYNCFS request with announce_submounts virtiofsd: Track submounts virtiofsd:

Re: [PULL 0/5] 9p queue 2022-02-10

2022-02-14 Thread Greg Kurz
On Mon, 14 Feb 2022 10:47:43 +0100 Christian Schoenebeck wrote: > On Sonntag, 13. Februar 2022 21:33:10 CET Peter Maydell wrote: > > On Thu, 10 Feb 2022 at 11:33, Christian Schoenebeck > > > > wrote: > > > The following changes since commit > > > 0a301624c2f4ced3331ffd5bce85b4274fe132af: > >

Re: [PATCH v2] Use long endian options for ppc64

2022-02-09 Thread Greg Kurz
On Tue, 8 Feb 2022 14:47:19 +0100 Greg Kurz wrote: > On Mon, 31 Jan 2022 10:17:14 +0100 > Miroslav Rezanina wrote: > > > GCC options pairs -mlittle/-mlittle-endian and -mbig/-mbig-endian are > > equivalent on ppc64 architecture. However, Clang supports only long >

Re: [PATCH v2] Use long endian options for ppc64

2022-02-08 Thread Greg Kurz
upport both GCC and Clang > compiler. In addition, fix this issue in tcg test configure. > > Signed-off-by: Miroslav Rezanina > > --- Reviewed-by: Greg Kurz > This is v2 of configure: Use -mlittle-endian instead of -mlittle for ppc64. > > v2: > - handle both -

Re: [PATCH v5 11/11] 9p: darwin: Adjust assumption on virtio-9p-test

2022-02-08 Thread Greg Kurz
omas Huth > --- LGTM but this patch should go before patch 10 that enables Darwin host support to avoid qtest breakage while bisecting. Reviewed-by: Greg Kurz > tests/qtest/virtio-9p-test.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tests/qtest/virtio-

Re: [PATCH v4 10/11] 9p: darwin: meson: Allow VirtFS on Darwin

2022-02-07 Thread Greg Kurz
On Mon, 07 Feb 2022 15:15:46 +0100 Christian Schoenebeck wrote: > On Montag, 7. Februar 2022 02:05:32 CET Will Cohen wrote: > > On Sun, Feb 6, 2022 at 4:22 PM Philippe Mathieu-Daudé > > > > wrote: > > > On 6/2/22 21:07, Will Cohen wrote: > > > > From: Keno Fischer > > > > > > > >

Re: [PATCH v4 09/11] 9p: darwin: Implement compatibility for mknodat

2022-02-07 Thread Greg Kurz
On Mon, 7 Feb 2022 11:30:18 +0100 Philippe Mathieu-Daudé wrote: > On 7/2/22 09:47, Greg Kurz wrote: > > On Sun, 6 Feb 2022 20:10:23 -0500 > > Will Cohen wrote: > > > >> This patch set currently places it in 9p-util only because 9p is the only > >> place

Re: [PATCH v4 09/11] 9p: darwin: Implement compatibility for mknodat

2022-02-07 Thread Greg Kurz
On Sun, 6 Feb 2022 20:10:23 -0500 Will Cohen wrote: > This patch set currently places it in 9p-util only because 9p is the only > place where this issue seems to have come up so far and we were wary of > editing files too far afield, but I have no attachment to its specific > location! >

Re: [PATCH v4] 9pfs: Fix segfault in do_readdir_many caused by struct dirent overread

2022-02-07 Thread Greg Kurz
ly Chikunov > --- > Tested on x68-64 Linux with btrfs-progs tests and slow qos-test. > Changes since v3: > - Update commentary on qemu_dirent_dup logic. > - Use g_memdup as suggested by Greg Kurz. > The synth driver should really be made compliant with the _DIRENT_HAVE_D_* macros at

Re: [PATCH v4 01/11] 9p: linux: Fix a couple Linux assumptions

2022-02-07 Thread Greg Kurz
- Remove superfluous header guards from file-opt-9p > - Add note about virtfs-proxy-helper being disabled >on non-Linux for this patch series] > Signed-off-by: Will Cohen > --- Reviewed-by: Greg Kurz > fsdev/file-op-9p.h | 9 - > hw/

Re: [PATCH v3] 9pfs: Fix segfault in do_readdir_many caused by struct dirent overread

2022-02-04 Thread Greg Kurz
On Fri, 4 Feb 2022 19:19:39 +0300 "Dmitry V. Levin" wrote: > On Fri, Feb 04, 2022 at 02:55:45PM +0100, Philippe Mathieu-Daudé wrote: > > On 4/2/22 06:06, Vitaly Chikunov wrote: > > > `struct dirent' returned from readdir(3) could be shorter (or longer) > > > than `sizeof(struct dirent)', thus

Re: [PATCH v3] 9pfs: Fix segfault in do_readdir_many caused by struct dirent overread

2022-02-04 Thread Greg Kurz
On Fri, 04 Feb 2022 15:12:18 +0100 Christian Schoenebeck wrote: > On Freitag, 4. Februar 2022 14:55:45 CET Philippe Mathieu-Daudé via wrote: > > On 4/2/22 06:06, Vitaly Chikunov wrote: > > > `struct dirent' returned from readdir(3) could be shorter (or longer) > > > than `sizeof(struct dirent)',

Re: [PATCH] target/ppc: Fix radix logging

2022-02-03 Thread Greg Kurz
42 > Signed-off-by: Cédric Le Goater > --- LGTM apart from that. Reviewed-by: Greg Kurz > target/ppc/mmu-radix64.c | 8 ++-- > 1 file changed, 2 insertions(+), 6 deletions(-) > > diff --git a/target/ppc/mmu-radix64.c b/target/ppc/mmu-radix64.c > index 040c055bff65..d4

[PATCH v3 2/2] tests/9pfs: Use g_autofree and g_autoptr where possible

2022-02-01 Thread Greg Kurz
It is recommended to use g_autofree or g_autoptr as it reduces the odds of introducing memory leaks in future changes. Signed-off-by: Greg Kurz --- tests/qtest/libqos/virtio-9p.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/tests/qtest/libqos/virtio-9p.c b

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