qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] d22b85: monitor:open brace '{' following stru


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] d22b85: monitor:open brace '{' following struct go on the ...
Date: Thu, 31 Dec 2020 11:17:47 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: d22b854dc5a859eb6d1fa27616308d633bc584e3
      
https://github.com/qemu/qemu/commit/d22b854dc5a859eb6d1fa27616308d633bc584e3
  Author: Yutao Ai <aiyutao@huawei.com>
  Date:   2020-12-18 (Fri, 18 Dec 2020)

  Changed paths:
    M monitor/hmp-cmds.c

  Log Message:
  -----------
  monitor:open brace '{' following struct go on the same line

Move the open brace '{' following struct go on the same line

Signed-off-by: Yutao Ai <aiyutao@huawei.com>
Message-Id: <20201125014514.55562-2-aiyutao@huawei.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>


  Commit: 89854b95581159a3572aa02cd97b5dc050239f53
      
https://github.com/qemu/qemu/commit/89854b95581159a3572aa02cd97b5dc050239f53
  Author: Yutao Ai <aiyutao@huawei.com>
  Date:   2020-12-18 (Fri, 18 Dec 2020)

  Changed paths:
    M monitor/misc.c

  Log Message:
  -----------
  monitor:braces {} are necessary for all arms of this statement

Fix the errors by add {}

Signed-off-by: Yutao Ai <aiyutao@huawei.com>
Message-Id: <20201125014514.55562-3-aiyutao@huawei.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>


  Commit: 33b1fa9485fc01d4a0f4b71987aa211797ddf770
      
https://github.com/qemu/qemu/commit/33b1fa9485fc01d4a0f4b71987aa211797ddf770
  Author: Yutao Ai <aiyutao@huawei.com>
  Date:   2020-12-18 (Fri, 18 Dec 2020)

  Changed paths:
    M monitor/misc.c

  Log Message:
  -----------
  monitor:Don't use '#' flag of printf format ('%#') in format strings

Delete '#' and use '0x' prefix instead

Signed-off-by: Yutao Ai <aiyutao@huawei.com>
Message-Id: <20201125014514.55562-4-aiyutao@huawei.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>


  Commit: ff688cd2c7c3a677b71e4ea194a2fa49d07996c8
      
https://github.com/qemu/qemu/commit/ff688cd2c7c3a677b71e4ea194a2fa49d07996c8
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2020-12-18 (Fri, 18 Dec 2020)

  Changed paths:
    M hmp-commands.hx

  Log Message:
  -----------
  hmp-commands.hx: List abbreviation after command for cont, quit, print

We have four HMP commands which have a single-character abbreviated
version: cont ('c'), quit ('q'), print ('p') and help ('h').  For
cont, quit and print, we list the abbreviation first in the help
documentation and the command name.  This has the odd effect that in
the full 'help' command list these commands end up sorted out of
alphabetical order (they end up after all the other commands that
start with the same letter).  As it happens, the only place this
currently changes the order is for 'cont'.

Abbreviation first is also not a very logical order, and it doesn't
match what we use for 'help' (which is 'help|?').  Put the full
command name first in both the help text and the .name field for
cont, quit and print.

Fixes: https://bugs.launchpad.net/qemu/+bug/1614609
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20201121151711.20783-1-peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>


  Commit: e49393a349925567cb83cfe810bc595e42a17883
      
https://github.com/qemu/qemu/commit/e49393a349925567cb83cfe810bc595e42a17883
  Author: Vivek Goyal <vgoyal@redhat.com>
  Date:   2020-12-18 (Fri, 18 Dec 2020)

  Changed paths:
    M tools/virtiofsd/fuse_virtio.c

  Log Message:
  -----------
  virtiofsd: Use --thread-pool-size=0 to mean no thread pool

Right now we create a thread pool and main thread hands over the request
to thread in thread pool to process. Number of threads in thread pool
can be managed by option --thread-pool-size.

In tests we have noted that many of the workloads are getting better
performance if we don't use a thread pool at all and process all
the requests in the context of a thread receiving the request.

Hence give user an option to be able to run virtiofsd without using
a thread pool.

To implement this, I have used existing option --thread-pool-size. This
option defines how many maximum threads can be in the thread pool.
Thread pool size zero freezes thead pool. I can't see why will one
start virtiofsd with a frozen thread pool (hence frozen file system).
So I am redefining --thread-pool-size=0 to mean, don't use a thread pool.
Instead process the request in the context of thread receiving request
from the queue.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Message-Id: <20201109143548.GA1479853@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>


  Commit: bebc3c24aa54b747b19112f9199181a49614f44c
      
https://github.com/qemu/qemu/commit/bebc3c24aa54b747b19112f9199181a49614f44c
  Author: Laszlo Ersek <lersek@redhat.com>
  Date:   2020-12-18 (Fri, 18 Dec 2020)

  Changed paths:
    M tools/virtiofsd/passthrough_ll.c

  Log Message:
  -----------
  virtiofsd: make the debug log timestamp on stderr more human-readable

The current timestamp format doesn't help me visually notice small jumps
in time ("small" as defined on human scale, such as a few seconds or a few
ten seconds). Replace it with a local time format where such differences
stand out.

Before:

> [13316826770337] [ID: 00000004] unique: 62, opcode: RELEASEDIR (29), nodeid: 
> 1, insize: 64, pid: 1
> [13316826778175] [ID: 00000004]    unique: 62, success, outsize: 16
> [13316826781156] [ID: 00000004] virtio_send_msg: elem 0: with 1 in desc of 
> length 16
> [15138279317927] [ID: 00000001] virtio_loop: Got VU event
> [15138279504884] [ID: 00000001] fv_queue_set_started: qidx=1 started=0
> [15138279519034] [ID: 00000003] fv_queue_thread: kill event on queue 1 - 
> quitting
> [15138280876463] [ID: 00000001] fv_remove_watch: TODO! fd=9
> [15138280897381] [ID: 00000001] virtio_loop: Waiting for VU event
> [15138280946834] [ID: 00000001] virtio_loop: Got VU event
> [15138281175421] [ID: 00000001] virtio_loop: Waiting for VU event
> [15138281182387] [ID: 00000001] virtio_loop: Got VU event
> [15138281189474] [ID: 00000001] virtio_loop: Waiting for VU event
> [15138309321936] [ID: 00000001] virtio_loop: Unexpected poll revents 11
> [15138309434150] [ID: 00000001] virtio_loop: Exit

(Notice how you don't (easily) notice the gap in time after
"virtio_send_msg", and especially the amount of time passed is hard to
estimate.)

After:

> [2020-12-08 06:43:22.58+0100] [ID: 00000004] unique: 51, opcode: RELEASEDIR 
> (29), nodeid: 1, insize: 64, pid: 1
> [2020-12-08 06:43:22.58+0100] [ID: 00000004]    unique: 51, success, outsize: 
> 16
> [2020-12-08 06:43:22.58+0100] [ID: 00000004] virtio_send_msg: elem 0: with 1 
> in desc of length 16
> [2020-12-08 06:43:29.34+0100] [ID: 00000001] virtio_loop: Got VU event
> [2020-12-08 06:43:29.34+0100] [ID: 00000001] fv_queue_set_started: qidx=1 
> started=0
> [2020-12-08 06:43:29.34+0100] [ID: 00000003] fv_queue_thread: kill event on 
> queue 1 - quitting
> [2020-12-08 06:43:29.34+0100] [ID: 00000001] fv_remove_watch: TODO! fd=9
> [2020-12-08 06:43:29.34+0100] [ID: 00000001] virtio_loop: Waiting for VU event
> [2020-12-08 06:43:29.34+0100] [ID: 00000001] virtio_loop: Got VU event
> [2020-12-08 06:43:29.34+0100] [ID: 00000001] virtio_loop: Waiting for VU event
> [2020-12-08 06:43:29.34+0100] [ID: 00000001] virtio_loop: Got VU event
> [2020-12-08 06:43:29.34+0100] [ID: 00000001] virtio_loop: Waiting for VU event
> [2020-12-08 06:43:29.37+0100] [ID: 00000001] virtio_loop: Unexpected poll 
> revents 11
> [2020-12-08 06:43:29.37+0100] [ID: 00000001] virtio_loop: Exit

Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20201208055043.31548-1-lersek@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>


  Commit: ad3bfe1bd6d07b086738f0e537a8f3c9b1ab65a6
      
https://github.com/qemu/qemu/commit/ad3bfe1bd6d07b086738f0e537a8f3c9b1ab65a6
  Author: Vivek Goyal <vgoyal@redhat.com>
  Date:   2020-12-18 (Fri, 18 Dec 2020)

  Changed paths:
    M tools/virtiofsd/passthrough_ll.c

  Log Message:
  -----------
  virtiofsd: Set up posix_lock hash table for root inode

We setup per inode hash table ->posix_lock to support remote posix locks.
But we forgot to initialize this table for root inode.

Laszlo managed to trigger an issue where he sent a FUSE_FLUSH request for
root inode and lo_flush() found inode with inode->posix_lock NULL and
accessing this table crashed virtiofsd.

May be we can get rid of initializing this hash table for directory
objects completely. But that optimization is for another day.

Reported-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Message-Id: <20201207195539.GB3107@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>


  Commit: e7e8aa8aead2874f789a5d4a84cddb9b099fbd1c
      
https://github.com/qemu/qemu/commit/e7e8aa8aead2874f789a5d4a84cddb9b099fbd1c
  Author: Vivek Goyal <vgoyal@redhat.com>
  Date:   2020-12-18 (Fri, 18 Dec 2020)

  Changed paths:
    M tools/virtiofsd/passthrough_ll.c

  Log Message:
  -----------
  virtiofsd: Disable posix_lock hash table if remote locks are not enabled

If remote posix locks are not enabled (lo->posix_lock == false), then disable
code paths taken to initialize inode->posix_lock hash table and corresponding
destruction and search etc.

lo_getlk() and lo_setlk() have been modified to return ENOSYS if daemon
does not support posix lock but client still sends a lock/unlock request.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Message-Id: <20201207183021.22752-3-vgoyal@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>


  Commit: 31a4990f8df0be78b4310b18c6b16612ca03cf04
      
https://github.com/qemu/qemu/commit/31a4990f8df0be78b4310b18c6b16612ca03cf04
  Author: Vivek Goyal <vgoyal@redhat.com>
  Date:   2020-12-18 (Fri, 18 Dec 2020)

  Changed paths:
    M tools/virtiofsd/passthrough_ll.c

  Log Message:
  -----------
  virtiofsd: Check file type in lo_flush()

Currently lo_flush() is written in such a way that it expects to receive
a FLUSH requests on a regular file (and not directories). For example,
we call lo_fi_fd() which searches lo->fd_map. If we open directories
using opendir(), we keep don't keep track of these in lo->fd_map instead
we keep them in lo->dir_map. So we expect lo_flush() to be called on
regular files only.

Even linux fuse client calls FLUSH only for regular files and not
directories. So put a check for filetype and return EBADF if
lo_flush() is called on a non-regular file.

Reported-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Message-Id: <20201211142544.GB3285@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>


  Commit: d6211148f6509a4ece59cf8840b3198f96f7a3e9
      
https://github.com/qemu/qemu/commit/d6211148f6509a4ece59cf8840b3198f96f7a3e9
  Author: Laszlo Ersek <lersek@redhat.com>
  Date:   2020-12-18 (Fri, 18 Dec 2020)

  Changed paths:
    M tools/virtiofsd/passthrough_ll.c

  Log Message:
  -----------
  virtiofsd: update FUSE_FORGET comment on "lo_inode.nlookup"

Miklos confirms it's *only* the FUSE_FORGET request that the client can
use for decrementing "lo_inode.nlookup".

Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
Cc: Miklos Szeredi <mszeredi@redhat.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Fixes: 1222f015558fc34cea02aa3a5a92de608c82cec8
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20201208073936.8629-1-lersek@redhat.com>
Reviewed-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>


  Commit: 03350a1e8d88196eaa98d0cce4e24e730f09ad5b
      
https://github.com/qemu/qemu/commit/03350a1e8d88196eaa98d0cce4e24e730f09ad5b
  Author: Alex Chen <alex.chen@huawei.com>
  Date:   2020-12-18 (Fri, 18 Dec 2020)

  Changed paths:
    M tools/virtiofsd/fuse_lowlevel.c

  Log Message:
  -----------
  virtiofsd: Remove useless code about send_notify_iov

The 'ch' will be NULL in the following stack:
send_notify_iov()->fuse_send_msg()->virtio_send_msg(), and
this may lead to NULL pointer dereferenced in virtio_send_msg().
But send_notify_iov() was never called, so remove the useless code
about send_notify_iov() to fix this problem.

Signed-off-by: Alex Chen <alex.chen@huawei.com>
Message-Id: <20201214121615.29967-1-alex.chen@huawei.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>


  Commit: 243e7480d5bc769cffa2df7f17f91c16deb511b6
      
https://github.com/qemu/qemu/commit/243e7480d5bc769cffa2df7f17f91c16deb511b6
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2020-12-18 (Fri, 18 Dec 2020)

  Changed paths:
    M docs/devel/migration.rst

  Log Message:
  -----------
  docs/devel/migration: Improve debugging section a bit

Fix typos, and make the example work out of the box.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20201217071450.701909-1-armbru@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>


  Commit: 80ef0586d36a49ada917ac4e775a3c3574c9713e
      
https://github.com/qemu/qemu/commit/80ef0586d36a49ada917ac4e775a3c3574c9713e
  Author: Tuguoyi <tu.guoyi@h3c.com>
  Date:   2020-12-18 (Fri, 18 Dec 2020)

  Changed paths:
    M migration/savevm.c

  Log Message:
  -----------
  savevm: Remove dead code in save_snapshot()

The snapshot in each bs is deleted at the beginning, so there is no need
to find the snapshot again.

Signed-off-by: Tuguoyi <tu.guoyi@h3c.com>
Message-Id: <1607410416-13563-2-git-send-email-tu.guoyi@h3c.com>
Reviewed-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>


  Commit: 2a909dc4301145489cb873a676cb60cbc5ca9c68
      
https://github.com/qemu/qemu/commit/2a909dc4301145489cb873a676cb60cbc5ca9c68
  Author: Tuguoyi <tu.guoyi@h3c.com>
  Date:   2020-12-18 (Fri, 18 Dec 2020)

  Changed paths:
    M migration/savevm.c

  Log Message:
  -----------
  savevm: Delete snapshots just created in case of error

bdrv_all_create_snapshot() can fails with some snapshots created,
so it's better to delete those snapshots before returns to the caller

Signed-off-by: Tuguoyi <tu.guoyi@h3c.com>
Message-Id: <1607410416-13563-3-git-send-email-tu.guoyi@h3c.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>


  Commit: 36d0fe65160d83cb065de9b6fe60114ee127d9f0
      
https://github.com/qemu/qemu/commit/36d0fe65160d83cb065de9b6fe60114ee127d9f0
  Author: Tuguoyi <tu.guoyi@h3c.com>
  Date:   2020-12-18 (Fri, 18 Dec 2020)

  Changed paths:
    M migration/migration.c

  Log Message:
  -----------
  migration: Don't allow migration if vm is in POSTMIGRATE

The following steps will cause qemu assertion failure:
- pause vm by executing 'virsh suspend'
- create external snapshot of memory and disk using 'virsh snapshot-create-as'
- doing the above operation again will cause qemu crash

The backtrace looks like:
    at /build/qemu-5.0/migration/savevm.c:1401
    at /build/qemu-5.0/migration/savevm.c:1453

When the first migration completes, bs->open_flags will set BDRV_O_INACTIVE
flag by bdrv_inactivate_all(), and during the second migration the
bdrv_inactivate_recurse assert that the bs->open_flags is already
BDRV_O_INACTIVE enabled which cause crash.

As Vladimir suggested, this patch makes migrate_prepare check the state of vm 
and
return error if it is in RUN_STATE_POSTMIGRATE state.

Signed-off-by: Tuguoyi <tu.guoyi@h3c.com>
Message-Id: <6b704294ad2e405781c38fb38d68c744@h3c.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reported-by: Li Zhang <li.zhang@cloud.ionos.com>
Reviewed-by: Pankaj Gupta <pankaj.gupta@cloud.ionos.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>


  Commit: 3fb340ccf5f8385088a3d3b0e07763a8f5b85f4a
      
https://github.com/qemu/qemu/commit/3fb340ccf5f8385088a3d3b0e07763a8f5b85f4a
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2020-12-31 (Thu, 31 Dec 2020)

  Changed paths:
    M docs/devel/migration.rst
    M hmp-commands.hx
    M migration/migration.c
    M migration/savevm.c
    M monitor/hmp-cmds.c
    M monitor/misc.c
    M tools/virtiofsd/fuse_lowlevel.c
    M tools/virtiofsd/fuse_virtio.c
    M tools/virtiofsd/passthrough_ll.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/dgilbert/tags/pull-migration-20201218a' 
into staging

Monitor, virtiofsd and migration pull

HMP cleanups
Migration fixes
  Note the change in behaviour of not allowing a postmigrate migrtion
  rather than crashing

Virtiofsd cleanups and fixes
  --thread-pool-size=0 for no thread pool (faster for some workloads)

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

# gpg: Signature made Fri 18 Dec 2020 10:39:37 GMT
# gpg:                using RSA key 45F5C71B4A0CB7FB977A9FA90516331EBC5BFDE7
# gpg: Good signature from "Dr. David Alan Gilbert (RH2) <dgilbert@redhat.com>" 
[full]
# Primary key fingerprint: 45F5 C71B 4A0C B7FB 977A  9FA9 0516 331E BC5B FDE7

* remotes/dgilbert/tags/pull-migration-20201218a:
  migration: Don't allow migration if vm is in POSTMIGRATE
  savevm: Delete snapshots just created in case of error
  savevm: Remove dead code in save_snapshot()
  docs/devel/migration: Improve debugging section a bit
  virtiofsd: Remove useless code about send_notify_iov
  virtiofsd: update FUSE_FORGET comment on "lo_inode.nlookup"
  virtiofsd: Check file type in lo_flush()
  virtiofsd: Disable posix_lock hash table if remote locks are not enabled
  virtiofsd: Set up posix_lock hash table for root inode
  virtiofsd: make the debug log timestamp on stderr more human-readable
  virtiofsd: Use --thread-pool-size=0 to mean no thread pool
  hmp-commands.hx: List abbreviation after command for cont, quit, print
  monitor:Don't use '#' flag of printf format ('%#') in format strings
  monitor:braces {} are necessary for all arms of this statement
  monitor:open brace '{' following struct go on the same line

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


Compare: https://github.com/qemu/qemu/compare/091774bfdee2...3fb340ccf5f8



reply via email to

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