Use fchmodat(AT_SYMLINK_NOFOLLOW_ANY) instead of chmod().
[patch 2]
Christian Schoenebeck (6):
9pfs: fix qemu_mknodat(S_IFREG) on macOS
9pfs: fix qemu_mknodat(S_IFSOCK) on macOS
9pfs: fix wrong encoding of rdev field in Rgetattr on macOS
9pfs: fix wrong errno being sent to Linux client on ma
On Mittwoch, 27. April 2022 19:37:39 CEST Greg Kurz wrote:
> 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
> > >
> > > Christi
On Mittwoch, 27. April 2022 19:12:15 CEST Will Cohen wrote:
> On Wed, Apr 27, 2022 at 12:18 PM Christian Schoenebeck <
>
> qemu_...@crudebyte.com> wrote:
> > On Mittwoch, 27. April 2022 15:31:42 CEST Greg Kurz wrote:
> > > On Wed, 27 Apr 2022 14:32:53 +0200
>
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 wrote:
> > > On Wed, 27 Apr 2022 11:27:28 +0900
> > >
> > > Akihiko
In general, if you care about a higher degree of security, I'd always
recommend to use security_model=mapped in the first place.
> This brings up a new problem I hadn't realized before : the
> fchmodat_nofollow() implementation in 9p-local.c is really
> a linux only thing to cope with AT_SYMLINK_NOFOLLOW not being
> supported with fchmodat(). It looks that this should move to
> 9p-util-linux.c and a proper version should be added for macOS
> in 9p-util-darwin.c
Like already agreed on the other thread, yes, that makes sense. But I think
this can be handled with a follow-up, separate from this series.
Best regards,
Christian Schoenebeck
On Mittwoch, 27. April 2022 12:21:51 CEST Greg Kurz wrote:
> 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
> > > ---
> > >
>
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 b/hw/9pfs/9p-local.c
> index d42ce6d8b82..def8afdb4d6 100644
> --- a/hw/9pfs/9p-loc
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: https://lore.kernel.org/qemu-devel/17933734.zYzKuhC07K@silver/
Signed-off-by: Christian Schoenebeck
Reviewed-by: Will Cohen
ned ENOATTR==93
when client tried to retrieve POSIX ACL xattrs, because errno 93
is defined as EPROTONOSUPPORT==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/202
qemu_mknodat() is expected to behave according to its POSIX API, and
therefore should always return exactly -1 on any error, and errno
should be set for the actual error code.
Signed-off-by: Christian Schoenebeck
---
hw/9pfs/9p-util-darwin.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion
least by qemu/xattr.h), it is safe to fix this issue by
simply comparing against ENOATTR instead of ENODATA.
This patch fixes e.g. a command on Linux guest like:
cp --preserve=mode old new
Signed-off-by: Christian Schoenebeck
Link: https://lore.kernel.org/qemu-devel/2866993.yOYK24bMf6@silver
hC07K@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 --git a/hw/9pfs/9p-util-darwin.c b/hw/9pfs/9p-util-darwin.c
index bec0253474..e24d09763a 100644
--- a/hw/9pfs/9p-ut
7;Tgettattr' is exclusive to protocol version 9p2000.L, it should
be fair to assume that 'rdev' field is assumed to be in Linux dev_t
format by client as well.
Signed-off-by: Christian Schoenebeck
Link: https://lore.kernel.org/qemu-devel/20220421093056.5ab1e7e
cit check whether filename fits into addr.sun_path. [patch 2]
* s/close/close_preserve_errno/ [patch 2]
* Fix qemu_mknodat() from having returned a negative result != -1
on error and not having set errno. [NEW patch 6]
Christian Schoenebeck (6):
9pfs: fix qemu_mknodat(S_IFREG) on ma
On Samstag, 23. April 2022 06:33:50 CEST Akihiko Odaki wrote:
> On 2022/04/22 23:06, Christian Schoenebeck wrote:
> > On Freitag, 22. April 2022 04:43:40 CEST Akihiko Odaki wrote:
> >> On 2022/04/22 0:07, Christian Schoenebeck wrote:
> >>> mknod() on macOS does no
Now that 9p support for macOS hosts just landed in QEMU 7.0 and with support
for Windows hosts on the horizon [1], the question is how to deal with case-
insensitive host filesystems, which are very common on those two systems?
I made some tests, e.g. trying to setup a 9p root fs Linux installati
On Freitag, 22. April 2022 04:43:40 CEST Akihiko Odaki wrote:
> On 2022/04/22 0:07, 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 pass
On Donnerstag, 21. April 2022 18:36:31 CEST Greg Kurz wrote:
> On Thu, 21 Apr 2022 17:07:43 +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
>
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: https://lore.kernel.org/qemu-devel/17933734.zYzKuhC07K@silver/
Signed-off-by: Christian Schoenebeck
Reviewed-by: Will Cohen
least by qemu/xattr.h), it is safe to fix this issue by
simply comparing against ENOATTR instead of ENODATA.
This patch fixes e.g. a command on Linux guest like:
cp --preserve=mode old new
Signed-off-by: Christian Schoenebeck
Link: https://lore.kernel.org/qemu-devel/2866993.yOYK24bMf6@silver
ned ENOATTR==93
when client tried to retrieve POSIX ACL xattrs, because errno 93
is defined as EPROTONOSUPPORT==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/202
7;Tgettattr' is exclusive to protocol version 9p2000.L, it should
be fair to assume that 'rdev' field is assumed to be in Linux dev_t
format by client as well.
Signed-off-by: Christian Schoenebeck
Link: https://lore.kernel.org/qemu-devel/20220421093056.5ab1e7e
ke it clear from the commit log that not having translated errnos
before actually violated 9p2000.L protocol. [patch 4]
* Simply compare against ENOATTR only, instead of comparing against both
ENOATTR and ENODATA and describe in commit log and in-code comment why
that is fine. [patch 5]
hC07K@silver/
Signed-off-by: Christian Schoenebeck
Reviewed-by: Will Cohen
---
hw/9pfs/9p-util-darwin.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/hw/9pfs/9p-util-darwin.c b/hw/9pfs/9p-util-darwin.c
index bec0253474..e24d09763a 100644
--- a/hw/9pfs/9p-util-darwin.c
+++ b/hw/9
On Donnerstag, 21. April 2022 14:26:37 CEST Greg Kurz wrote:
> 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
> > >
> > >
On Donnerstag, 21. April 2022 13:46:26 CEST Greg Kurz wrote:
> 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
> > >
> > > C
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 definitions with equal macro
> > name and value. In fact most mappings for errno are completely
>
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 errors when trying
> > to remove a POSIX ACL xattr that does not exist. On Linux hosts we
>
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 dev_t,
> > which is actually a system dependant type and therefor
On Mittwoch, 20. April 2022 14:10:44 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 divert to
> > call sequence socket(), bind() and chmod() respectively if S_IFSOCK
>
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 divert to
> > call sequence socket(), bind() and chmod() respectively if S_IFSOCK
>
On Mittwoch, 20. April 2022 10:40:05 CEST Greg Kurz wrote:
> 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 o
That file is the controller portion of 9p server and must remain fs-agnostic.
Such kind of issue should rather be addressed on fs driver level
(e.g. 9p-local.c, 9p-util-windows.c).
I.e. don't do it like this:
[1]
https://lore.kernel.org/all/20211122004913.20052-1-wwco...@gmail.com/T/#m734f405973768e43ce3ed7550bd21809abb25813
Best regards,
Christian Schoenebeck
like:
cp --preserve=mode old new
Signed-off-by: Christian Schoenebeck
---
hw/9pfs/9p-posix-acl.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/hw/9pfs/9p-posix-acl.c b/hw/9pfs/9p-posix-acl.c
index eadae270dd..2bf155f941 100644
--- a/hw/9pfs/9p-posix-acl.c
+++ b/hw
successfully, because macOS returned ENOATTR==93
when client tried to retrieve POSIX ACL xattrs, because errno 93
is defined as EPROTONOSUPPORT==93 on Linux, so Linux client believed
that xattrs were not supported by filesystem on host in general.
Signed-off-by: Christian Schoenebeck
---
hw/9pfs/9p.c
A bunch of fixes for recently added (QEMU 7.0) 9p support on macOS hosts.
Note: there are still issues to address with case-insensitive file systems
on macOS hosts. But I'll send a separate RFC on that issue.
Christian Schoenebeck (5):
9pfs: fix qemu_mknodat(S_IFREG) on macOS
9pfs
7;Tgettattr' is exclusive to protocol version 9p2000.L, it should
be fair to assume that 'rdev' field is assumed to be in Linux dev_t
format by client as well.
Signed-off-by: Christian Schoenebeck
---
hw/9pfs/9p.c | 37 -
1 file changed, 36 inser
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: https://lore.kernel.org/qemu-devel/17933734.zYzKuhC07K@silver/
Signed-off-by: Christian Schoenebeck
---
hw/9pfs/9p-util
hC07K@silver/
Signed-off-by: Christian Schoenebeck
---
hw/9pfs/9p-util-darwin.c | 4
1 file changed, 4 insertions(+)
diff --git a/hw/9pfs/9p-util-darwin.c b/hw/9pfs/9p-util-darwin.c
index bec0253474..53e0625501 100644
--- a/hw/9pfs/9p-util-darwin.c
+++ b/hw/9pfs/9p-util-darwin.c
@@
On Montag, 18. April 2022 11:07:33 CEST Mark Cave-Ayland wrote:
> On 17/04/2022 13:55, Christian Schoenebeck wrote:
> > On Donnerstag, 14. April 2022 19:25:04 CEST Shi, Guohuai wrote:
> >>> -Original Message-
> >>> From: Christian Schoenebeck
> >&
On Freitag, 15. April 2022 15:18:58 CEST Paolo Bonzini wrote:
> From: Marc-André Lureau
>
> Signed-off-by: Marc-André Lureau
> Acked-by: Greg Kurz
> Signed-off-by: Paolo Bonzini
> ---
I would have expected more been missing, anyway ...
Reviewed-by: Christian Schoeneb
On Donnerstag, 14. April 2022 19:25:04 CEST Shi, Guohuai wrote:
> > -Original Message-
> > From: Christian Schoenebeck
> > Sent: 2022年4月14日 19:24
> > To: qemu-devel@nongnu.org; Shi, Guohuai
> > Cc: Bin Meng ; Greg Kurz
> > Subject: Re: [RFC PATCH 0/4
s a fileystem on Windows that supports
ADS.
[4] https://en.wikipedia.org/wiki/NTFS#Alternate_data_stream_(ADS)
Best regards,
Christian Schoenebeck
On Freitag, 8. April 2022 19:10:09 CEST Bin Meng wrote:
> At present there is no Windows support for 9p file system.
> This series adds initial Windows support for 9p file system.
Nice!
> Only 'local' file system driver backend is supported. security_model
> should be 'none' due to limitations on
On Freitag, 8. April 2022 17:00:59 CEST Greg Kurz wrote:
> 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 n
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
> the full path instead. We could try to fchdir, but that would cause
> probl
st always be the first include line in any .c file.
> >
> > Understood, apologies -- if there's other changes for a v3 I can resubmit
> > accordingly, but if this otherwise looks okay then I would be fine with a
> > QEMU maintainer adjusting the header placement as needed when preparing
> > for
> > submission to the main tree.
>
> Makes sense. I'm currently assembling a pull req with some misc fixes for
> 7.0 ... if Christian & Greg do not have any other patches pending right now,
> I could throw this in, with the osdep.h location fixed.
>
> Thomas
That would be appreciated, nothing else for 7.0 at this point. Thanks Thomas!
Best regards,
Christian Schoenebeck
On Donnerstag, 31. März 2022 15:19:24 CEST Will Cohen wrote:
> On Thu, Mar 31, 2022 at 7:07 AM Christian Schoenebeck <
>
> qemu_...@crudebyte.com> wrote:
> > On Donnerstag, 31. März 2022 10:03:35 CEST Peter Maydell wrote:
> > > On Wed, 30 Mar 2022 at 22:55, Will Coh
his host system
#endif
was to ensure that whoever adds support for another 9p host system in future,
to check what's the limit on that host system, i.e. it might even be <64k. So
I wouldn't just blindly use a default value here for all systems.
Best regards,
Christian Schoenebeck
On Mittwoch, 30. März 2022 23:17:02 CEST Will Cohen wrote:
> On Wed, Mar 30, 2022 at 4:24 PM Philippe Mathieu-Daudé <
>
> philippe.mathieu.da...@gmail.com> wrote:
> > Hi,
> >
> > On 30/3/22 20:19, Will Cohen wrote:
> > > As noted by https://gitlab.com/qemu-project/qemu/-/issues/950, within
> > >
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
> description of that patch for details of what this ove
On Donnerstag, 17. März 2022 14:03:26 CET Philippe Mathieu-Daudé wrote:
> From: Philippe Mathieu-Daudé
>
> See comments in commit 29cf16db23 ("buildsys: Help git-diff
> adding .gitattributes config file") for details.
>
> Signed-off-by: Philippe Mathieu-Daudé
&
On Mittwoch, 16. März 2022 12:10:43 CET Greg Kurz wrote:
> On Mon, 14 Mar 2022 19:58:11 +0100
>
> Christian Schoenebeck wrote:
> > The 'synth' driver's root node and the 'synth' driver's first
> > subdirectory node falsely share the same inode
' request should
return an 'Rlerror' response by 9p server with error code ENOENT as
that fid is basically invalid.
And as we are at it, also check that the QID returned by 'Twalk' is
not identical to the root node's QID.
Signed-off-by: Christian Schoenebeck
---
tests/qtest
he 1st path component
is valid, whereas the 2nd path component transmitted to server does not
exist. The expected behaviour is that 9p server would respond by sending
a 'Rwalk' response with exactly 1 QID (instead of 'Rlerror' response).
Signed-off-by: Christian Schoenebeck
Reviewe
The local variable 'name_idx' is used in two loops in function v9fs_walk().
Let the first loop use its own variable 'nwalked' instead, which we will
use in subsequent patch as the number of (requested) path components
successfully walked by background I/O thread.
Sign
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
---
tests/qtest/virtio-9p-test.c | 87
1 file changed, 87 insertions(+)
diff --git a
already existing variable 'err' only reflects
the last error.
Despite QIDs being delivered to client in a more relaxed way now, it is
important to note though that fid still must remain unaffected if any error
occurred.
Signed-off-by: Christian Schoenebeck
---
hw/9pfs/9p.c | 43
Send Twalk request with nwname=0. In this case no QIDs should
be returned by 9p server; this is equivalent to walking to dot.
Signed-off-by: Christian Schoenebeck
Reviewed-by: Greg Kurz
---
tests/qtest/virtio-9p-test.c | 22 ++
1 file changed, 22 insertions(+)
diff --git a
Expect ENOENT Rlerror response when trying to walk to a
non-existent directory.
Signed-off-by: Christian Schoenebeck
Reviewed-by: Greg Kurz
Based-on:
---
tests/qtest/virtio-9p-test.c | 30 ++
1 file changed, 30 insertions(+)
diff --git a/tests/qtest/virtio-9p
t by
sending a subsequent 'Tgetattr' request. [patch 7]
Christian Schoenebeck (7):
tests/9pfs: walk to non-existent dir
tests/9pfs: Twalk with nwname=0
tests/9pfs: compare QIDs in fs_walk_none() test
9pfs: refactor 'name_idx' -> 'nwalked' in v9fs_walk()
+++ b/MAINTAINERS
> @@ -548,6 +548,12 @@ F: include/*/*win32*
> X: qga/*win32*
> F: qemu.nsi
>
> +Darwin (macOS, iOS)
Right now that's macOS only, so it should be:
Darwin (macOS)
Except of that:
Reviewed-by: Christian Schoenebeck
Thanks!
Best regards,
Christian Schoen
floats? I guess I leave that
> to the JACK experts...
That's correct. JACK does not use interleaved audio format, it uses separate
buffers for each audio channel. For the audio stuff of this patch:
Reviewed-by: Christian Schoenebeck
Best regards,
Christian Schoenebeck
On Montag, 14. März 2022 19:46:59 CET Philippe Mathieu-Daudé wrote:
> Hi Christian,
Hi Philippe,
> On 14/3/22 17:42, Christian Schoenebeck wrote:
> > On Montag, 14. März 2022 17:01:07 CET Markus Armbruster wrote:
> >> g_new(T, n) is neater than g_malloc(sizeof(T) * n). It
QIDs
(which are derived by 9p server from driver's inode numbers).
Fix this issue by using prefix-increment instead of postfix-increment
operator while generating new inode numbers for subdirectories and files.
Link: https://lore.kernel.org/qemu-devel/3859307.hTDP4D0zbi@silver/
Signed-off
> 1 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: Christian Schoenebeck
>
On Sonntag, 13. März 2022 11:27:56 CET Christian Schoenebeck wrote:
> On Sonntag, 13. März 2022 10:28:32 CET Christian Schoenebeck wrote:
> > Extend previously added test case by checking that fid is unaffected
> > by 'Twalk' request (i.e. when 2nd path component of reque
On Sonntag, 13. März 2022 10:28:32 CET Christian Schoenebeck wrote:
> Extend previously added test case by checking that fid is unaffected
> by 'Twalk' request (i.e. when 2nd path component of request being
> invalid). Do that by comparing the QID of root fid with QID of walked
he 1st path component
is valid, whereas the 2nd path component transmitted to server does not
exist. The expected behaviour is that 9p server would respond by sending
a 'Rwalk' response with exactly 1 QID (instead of 'Rlerror' response).
Signed-off-by: Christian Schoenebeck
Reviewe
The local variable 'name_idx' is used in two loops in function v9fs_walk().
Let the first loop use its own variable 'nwalked' instead, which we will
use in subsequent patch as the number of (requested) path components
successfully walked by background I/O thread.
Sign
Extend previously added test case by checking that fid is unaffected
by 'Twalk' request (i.e. when 2nd path component of request being
invalid). Do that by comparing the QID of root fid with QID of walked
fid; they should be identical.
Signed-off-by: Christian Schoenebeck
---
tests/qt
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 ++
1 file changed, 30 insertions(+)
diff --git a/tests/qtest/virtio-9p-test.c b/tests
already existing variable 'err' only reflects
the last error.
Despite QIDs being delivered to client in a more relaxed way now, it is
important to note though that fid still must remain unaffected if any error
occurred.
Signed-off-by: Christian Schoenebeck
---
hw/9pfs/9p.c | 43
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
---
tests/qtest/virtio-9p-test.c | 87
1 file changed, 87 insertions(+)
diff --git a
Send Twalk request with nwname=0. In this case no QIDs should
be returned by 9p server; this is equivalent to walking to dot.
Signed-off-by: Christian Schoenebeck
Reviewed-by: Greg Kurz
---
tests/qtest/virtio-9p-test.c | 22 ++
1 file changed, 22 insertions(+)
diff --git a
ke patch 5 better
readable.
All the other patches are just additional test cases for guarding 'Twalk'
behaviour.
v2 -> v3:
* Use 'any_err |= err = ...' at all occurrences to make v9fs_walk() function
less error prone, which also reduces lines of code. [patch 5]
Christ
On Samstag, 12. März 2022 12:06:47 CET Christian Schoenebeck wrote:
> Current implementation of 'Twalk' request handling always sends an 'Rerror'
> response if any error occured. The 9p2000 protocol spec says though:
>
> "
> If the first element ca
On Freitag, 11. März 2022 10:26:47 CET Daniel P. Berrangé wrote:
> On Fri, Mar 11, 2022 at 10:13:24AM +0100, Christian Schoenebeck wrote:
> > On Donnerstag, 10. März 2022 12:40:06 CET Philippe Mathieu-Daudé wrote:
> > > +Stefan for overall project resources.
> > >
>
Send Twalk request with nwname=0. In this case no QIDs should
be returned by 9p server; this is equivalent to walking to dot.
Signed-off-by: Christian Schoenebeck
Reviewed-by: Greg Kurz
---
tests/qtest/virtio-9p-test.c | 22 ++
1 file changed, 22 insertions(+)
diff --git a
he 1st path component
is valid, whereas the 2nd path component transmitted to server does not
exist. The expected behaviour is that 9p server would respond by sending
a 'Rwalk' response with exactly 1 QID (instead of 'Rlerror' response).
Signed-off-by: Christian Schoenebeck
Reviewe
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
---
tests/qtest/virtio-9p-test.c | 87
1 file changed, 87 insertions(+)
diff --git a
The local variable 'name_idx' is used in two loops in function v9fs_walk().
Let the first loop use its own variable 'nwalked' instead, which we will
use in subsequent patch as the number of (requested) path components
successfully walked by background I/O thread.
Sign
already existing variable 'err' only reflects
the last error.
Despite QIDs being delivered to client in a more relaxed way now, it is
important to note though that fid still must remain unaffected if any error
occurred.
Signed-off-by: Christian Schoenebeck
---
hw/9pfs/9p.c | 29 ++
English wording 'says' in commit log. [patch 6]
* Ensure fid unaffected in fs_walk_2nd_nonexistent(). [NEW patch 7]
Christian Schoenebeck (7):
tests/9pfs: walk to non-existent dir
tests/9pfs: Twalk with nwname=0
tests/9pfs: compare QIDs in fs_walk_none() test
9pfs: refactor &
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 ++
1 file changed, 30 insertions(+)
diff --git a/tests/qtest/virtio-9p-test.c b/tests
Extend previously added test case by checking that fid is unaffected
by 'Twalk' request (i.e. when 2nd path component of request being
invalid). Do that by comparing the QID of root fid with QID of walked
fid; they should be identical.
Signed-off-by: Christian Schoenebeck
---
tests/qt
On Freitag, 11. März 2022 18:08:38 CET Greg Kurz wrote:
> 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
On Freitag, 11. März 2022 18:02:36 CET Greg Kurz wrote:
> 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
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 Schoenebeck wrote:
> > > Current implementation of 'Twalk' request hand
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 Schoenebeck wrote:
> > > Extend previously added fs_walk_none() test by comparing the QID
&g
On Freitag, 11. März 2022 12:41:32 CET Greg Kurz wrote:
> On Thu, 10 Mar 2022 09:57:25 +0100
>
> Christian Schoenebeck wrote:
> > On Mittwoch, 9. März 2022 14:24:24 CET Christian Schoenebeck wrote:
> > > Send Twalk request with nwname=0. In this case no QIDs should
> &
On Mittwoch, 9. März 2022 19:21:18 CET Christian Schoenebeck wrote:
> Previous 9p patch fixed 'Twalk' request handling, which was previously not
> behaving as specified by the 9p2000 protocol spec. This patch adds a new
> test case which guards the new 'Twalk' beh
On Donnerstag, 10. März 2022 12:40:06 CET Philippe Mathieu-Daudé wrote:
> +Stefan for overall project resources.
>
> On 10/3/22 12:07, Daniel P. Berrangé wrote:
> > On Thu, Mar 10, 2022 at 12:00:35PM +0100, Christian Schoenebeck wrote:
> >> On Mittwoch, 9. März 20
On Mittwoch, 9. März 2022 12:44:16 CET Daniel P. Berrangé wrote:
> On Wed, Mar 09, 2022 at 11:40:42AM +0100, Christian Schoenebeck wrote:
> > On Mittwoch, 9. März 2022 11:05:02 CET Philippe Mathieu-Daudé wrote:
> > > Not sure what you have in mind. I'm totally new to the m
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:
>
> "
> If the first element ca
On Mittwoch, 9. März 2022 18:12:17 CET Christian Schoenebeck wrote:
> The local variable 'name_idx' is used in two loops in function v9fs_walk().
> Let the first loop use its own variable 'nvalid' instead, which we will use
> in subsequent patches as the number o
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.
>
> Signed-off-by: Christian Schoenebeck
> ---
> tests/qtest/
On Mittwoch, 9. März 2022 14:24:24 CET Christian Schoenebeck wrote:
> Send Twalk request with nwname=0. In this case no QIDs should
> be returned by 9p server; this is equivalent to walking to dot.
>
> Signed-off-by: Christian Schoenebeck
> ---
> tests/qtest/vir
read.
Signed-off-by: Christian Schoenebeck
---
hw/9pfs/9p.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c
index a6d6b3f835..6cdc566866 100644
--- a/hw/9pfs/9p.c
+++ b/hw/9pfs/9p.c
@@ -1764,7 +1764,7 @@ static bool same_stat_id(const s
already existing variable 'err' only reflects
the last error.
Despite QIDs being delivered to client in a more relaxed way now, it is
important to note though that fid still must remain uneffacted if any error
occurred.
Signed-off-by: Christian Schoenebeck
---
hw/9pfs/9p.c | 29 ++
301 - 400 of 1002 matches
Mail list logo