qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 6f5690: 9pfs: add link to 9p developer docs


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 6f5690: 9pfs: add link to 9p developer docs
Date: Mon, 05 Jul 2021 09:25:30 -0700

  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 6f569084277dc7ae351141cfa6ad3649e92a1390
      
https://github.com/qemu/qemu/commit/6f569084277dc7ae351141cfa6ad3649e92a1390
  Author: Christian Schoenebeck <qemu_oss@crudebyte.com>
  Date:   2021-07-05 (Mon, 05 Jul 2021)

  Changed paths:
    M MAINTAINERS
    M hw/9pfs/9p-local.c
    M hw/9pfs/9p-posix-acl.c
    M hw/9pfs/9p-proxy.c
    M hw/9pfs/9p-synth.c
    M hw/9pfs/9p-util.c
    M hw/9pfs/9p-xattr-user.c
    M hw/9pfs/9p-xattr.c
    M hw/9pfs/9p.c
    M hw/9pfs/codir.c
    M hw/9pfs/cofile.c
    M hw/9pfs/cofs.c
    M hw/9pfs/coth.c
    M hw/9pfs/coxattr.c
    M hw/9pfs/virtio-9p-device.c
    M hw/9pfs/xen-9p-backend.c
    M tests/qtest/libqos/virtio-9p.c
    M tests/qtest/virtio-9p-test.c

  Log Message:
  -----------
  9pfs: add link to 9p developer docs

To lower the entry level for new developers, add a link to the 9p
developer docs (i.e. qemu wiki) to MAINTAINERS and to the beginning of
9p source files, that is to: https://wiki.qemu.org/Documentation/9p

Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Acked-by: Greg Kurz <groug@kaod.org>
Message-Id: <E1leeDf-0008GZ-9q@lizzy.crudebyte.com>


  Commit: 232a4d2c25c3a83e148116a15f992f728c3579e6
      
https://github.com/qemu/qemu/commit/232a4d2c25c3a83e148116a15f992f728c3579e6
  Author: Christian Schoenebeck <qemu_oss@crudebyte.com>
  Date:   2021-07-05 (Mon, 05 Jul 2021)

  Changed paths:
    M hw/9pfs/9p.c

  Log Message:
  -----------
  9pfs: simplify v9fs_walk()

There is only one comparison between nwnames and P9_MAXWELEM required.

Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Message-Id: <E1liKiz-0006BC-Ja@lizzy.crudebyte.com>


  Commit: 8bf27550effb124221100c3c6f5d513dd29ec37d
      
https://github.com/qemu/qemu/commit/8bf27550effb124221100c3c6f5d513dd29ec37d
  Author: Christian Schoenebeck <qemu_oss@crudebyte.com>
  Date:   2021-07-05 (Mon, 05 Jul 2021)

  Changed paths:
    M hw/9pfs/9p.c

  Log Message:
  -----------
  9pfs: fix not_same_qid()

There is only one user of not_same_qid() which is v9fs_walk() and the
latter is using it for comparing a client supplied path with the 9p
export root path, for the sole purpose to prevent a Twalk request
from escaping from the exported 9p tree via "..".

However for that specific purpose the implementation of not_same_qid()
is wrong; if mtime of the 9p export root path changed between Tattach
and Twalk then not_same_qid() returns true when actually comparing
against the export root path.

To fix for the actual semantic being used, only compare QID path
members, but do not compare version or type members.

Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Message-Id: 
<ca0abae4a899d81c6e87f683732d6c1f56915232.1622821729.git.qemu_oss@crudebyte.com>


  Commit: 110243750dc4389fe8715c1db87a6ce6c2b9e645
      
https://github.com/qemu/qemu/commit/110243750dc4389fe8715c1db87a6ce6c2b9e645
  Author: Christian Schoenebeck <qemu_oss@crudebyte.com>
  Date:   2021-07-05 (Mon, 05 Jul 2021)

  Changed paths:
    M hw/9pfs/9p.c
    M hw/9pfs/9p.h

  Log Message:
  -----------
  9pfs: capture root stat

We already capture the QID of the exported 9p root path, i.e. to
prevent client access outside the defined, exported filesystem's tree.
This is currently checked by comparing the root QID with another FID's
QID.

The problem with the latter is that resolving a QID of any given 9p path
can only be done on 9p server's main thread, that's because it might
mutate the server's state if inode remapping is enabled.

For that reason also capture the POSIX stat info of the root path for
being able to identify on any (e.g. worker) thread whether an
arbitrary given path is identical to the export root.

Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Message-Id: 
<eb07d6c2e9925788454cfe33d3802e4ffb23ea9a.1622821729.git.qemu_oss@crudebyte.com>


  Commit: 1d0fc0d0eef057dc02055f531907188d19a83cb2
      
https://github.com/qemu/qemu/commit/1d0fc0d0eef057dc02055f531907188d19a83cb2
  Author: Christian Schoenebeck <qemu_oss@crudebyte.com>
  Date:   2021-07-05 (Mon, 05 Jul 2021)

  Changed paths:
    M hw/9pfs/9p.c

  Log Message:
  -----------
  9pfs: drop fid_to_qid()

There is only one user of fid_to_qid() which is v9fs_walk(). Let's
open-code fid_to_qid() directly within v9fs_walk(), because
fid_to_qid() hides the POSIX stat buffer which we are going to need
in the subsequent patch.

Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Message-Id: 
<e9a4c9c7a0792ed4db6578d105a0823ea05bc324.1622821729.git.qemu_oss@crudebyte.com>


  Commit: f22cad42281621f86a0756a7cff382f90a33ec8c
      
https://github.com/qemu/qemu/commit/f22cad42281621f86a0756a7cff382f90a33ec8c
  Author: Christian Schoenebeck <qemu_oss@crudebyte.com>
  Date:   2021-07-05 (Mon, 05 Jul 2021)

  Changed paths:
    M hw/9pfs/9p.c

  Log Message:
  -----------
  9pfs: replace not_same_qid() by same_stat_id()

As we are actually only comparing the filesystem ID (i.e. device number
and inode number pair) let's use the POSIX stat buffer instead of QIDs,
because resolving QIDs requires to be done on 9p server's main thread
only as it might mutate the server state if inode remapping is enabled.

Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Message-Id: 
<26aa465ff9cc9c07e053331554a02fdae3994417.1622821729.git.qemu_oss@crudebyte.com>


  Commit: 66550339b77410212c7a99f0f80021721541b742
      
https://github.com/qemu/qemu/commit/66550339b77410212c7a99f0f80021721541b742
  Author: Christian Schoenebeck <qemu_oss@crudebyte.com>
  Date:   2021-07-05 (Mon, 05 Jul 2021)

  Changed paths:
    M hw/9pfs/9p.c
    M hw/9pfs/9p.h

  Log Message:
  -----------
  9pfs: drop root_qid

There is no longer a user of root_qid, so drop it.

Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Message-Id: 
<6896dd161d3257db6b0513842a14f87ca191fdf6.1622821729.git.qemu_oss@crudebyte.com>


  Commit: 8d6cb100731c4d28535adbf2a3c2d1f29be3fef4
      
https://github.com/qemu/qemu/commit/8d6cb100731c4d28535adbf2a3c2d1f29be3fef4
  Author: Christian Schoenebeck <qemu_oss@crudebyte.com>
  Date:   2021-07-05 (Mon, 05 Jul 2021)

  Changed paths:
    M hw/9pfs/9p.c

  Log Message:
  -----------
  9pfs: reduce latency of Twalk

As with previous performance optimization on Treaddir handling;
reduce the overall latency, i.e. overall time spent on processing
a Twalk request by reducing the amount of thread hops between the
9p server's main thread and fs worker thread(s).

In fact this patch even reduces the thread hops for Twalk handling
to its theoritical minimum of exactly 2 thread hops:

main thread -> fs worker thread -> main thread

This is achieved by doing all the required fs driver tasks altogether
in a single v9fs_co_run_in_worker({ ... }); code block.

Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Message-Id: 
<1a6701674afc4f08d40396e3aa2631e18a4dbb33.1622821729.git.qemu_oss@crudebyte.com>


  Commit: 9bef7ea9d93ee6b6297a5be6cb5a557f7d1764c9
      
https://github.com/qemu/qemu/commit/9bef7ea9d93ee6b6297a5be6cb5a557f7d1764c9
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2021-07-05 (Mon, 05 Jul 2021)

  Changed paths:
    M MAINTAINERS
    M hw/9pfs/9p-local.c
    M hw/9pfs/9p-posix-acl.c
    M hw/9pfs/9p-proxy.c
    M hw/9pfs/9p-synth.c
    M hw/9pfs/9p-util.c
    M hw/9pfs/9p-xattr-user.c
    M hw/9pfs/9p-xattr.c
    M hw/9pfs/9p.c
    M hw/9pfs/9p.h
    M hw/9pfs/codir.c
    M hw/9pfs/cofile.c
    M hw/9pfs/cofs.c
    M hw/9pfs/coth.c
    M hw/9pfs/coxattr.c
    M hw/9pfs/virtio-9p-device.c
    M hw/9pfs/xen-9p-backend.c
    M tests/qtest/libqos/virtio-9p.c
    M tests/qtest/virtio-9p-test.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/cschoenebeck/tags/pull-9p-20210705' 
into staging

9pfs: misc patches

* Add link to 9p developer docs.

* Fix runtime check whether client supplied relative path is the export
  root.

* Performance optimization of Twalk requests.

* Code cleanup.

# gpg: Signature made Mon 05 Jul 2021 12:13:34 BST
# gpg:                using RSA key 96D8D110CF7AF8084F88590134C2B58765A47395
# gpg:                issuer "qemu_oss@crudebyte.com"
# gpg: Good signature from "Christian Schoenebeck <qemu_oss@crudebyte.com>" 
[unknown]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: ECAB 1A45 4014 1413 BA38  4926 30DB 47C3 A012 D5F4
#      Subkey fingerprint: 96D8 D110 CF7A F808 4F88  5901 34C2 B587 65A4 7395

* remotes/cschoenebeck/tags/pull-9p-20210705:
  9pfs: reduce latency of Twalk
  9pfs: drop root_qid
  9pfs: replace not_same_qid() by same_stat_id()
  9pfs: drop fid_to_qid()
  9pfs: capture root stat
  9pfs: fix not_same_qid()
  9pfs: simplify v9fs_walk()
  9pfs: add link to 9p developer docs

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


Compare: https://github.com/qemu/qemu/compare/715167a36c2b...9bef7ea9d93e



reply via email to

[Prev in Thread] Current Thread [Next in Thread]