Re: Re: [PATCH] virtiofsd: support setting multiple request virtqueues

2022-12-12 Thread Jiachen Zhang
On Mon, Dec 12, 2022 at 10:48 PM Stefan Hajnoczi wrote: > > On Sun, 11 Dec 2022 at 05:49, Jiachen Zhang > wrote: > > > > Add an option '-o num_request_queues' to configure the queue number, > > currently the total number of vqs should be (1 hiprio queue +

[PATCH] virtiofsd: support setting multiple request virtqueues

2022-12-11 Thread Jiachen Zhang
m/ Suggested-by: Stefan Hajnoczi Cc: Connor Kuehl Signed-off-by: Jiachen Zhang --- tools/virtiofsd/fuse_lowlevel.c | 4 ++-- tools/virtiofsd/fuse_lowlevel.h | 2 +- tools/virtiofsd/fuse_virtio.c| 20 +++- tools/virtiofsd/fuse_virtio.h| 2 +- tools/virtiofsd/helper

[PATCH] virtiofsd: Avoid increasing nlookup when calling lookup_name

2021-06-10 Thread Jiachen Zhang
introducing crash recovery feature in the future. Signed-off-by: Jiachen Zhang --- tools/virtiofsd/passthrough_ll.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c index 49c21fd855..3e7c2f6b9d

Re: [External] Re: [Virtio-fs] host-user reconnection and crash recovery

2021-05-13 Thread Jiachen Zhang
On Thu, May 13, 2021 at 4:26 PM Dr. David Alan Gilbert wrote: > * Jiachen Zhang (zhangjiachen.jay...@bytedance.com) wrote: > > Hi Stefan and Sebastien, > > > > I think I should give some background context from my perspective. > > > > For the virtiofsd crash re

Re: [Phishing Risk] [External] Re: [Virtio-fs] vhost-user reconnection and crash recovery

2021-05-13 Thread Jiachen Zhang
Hi Stefan and Sebastien, I think I should give some background context from my perspective. For the virtiofsd crash reconnection (recovery) to QEMU, as said by Stefan, we discussed the possible implementation on the bi-weekly virtio-fs call. I had also sent an RFC patch to the virtio-fs mail-list

Re: [RFC PATCH 0/9] Support for Virtio-fs daemon crash reconnection

2021-05-10 Thread Jiachen Zhang
based on it. 3. What about dropping the dirp_map, and integrate the opened directory fds to fd_map. The virtiofsd-rs implementation only has two maps (inodes and handles). In the C version, dirp_map may also unnecessary. All the best, Jiachen On Wed, Dec 16, 2020 at 12:21 AM Jiachen

Re: [External] Re: [RFC PATCH 0/9] Support for Virtio-fs daemon crash reconnection

2021-03-17 Thread Jiachen Zhang
On Wed, Mar 17, 2021 at 7:50 PM Christian Schoenebeck < qemu_...@crudebyte.com> wrote: > On Mittwoch, 17. März 2021 11:05:32 CET Stefan Hajnoczi wrote: > > On Fri, Dec 18, 2020 at 05:39:34PM +0800, Jiachen Zhang wrote: > > > Thanks for the suggestions. Actually, we

Re: [External] Re: [RFC PATCH 0/9] Support for Virtio-fs daemon crash reconnection

2021-03-17 Thread Jiachen Zhang
On Wed, Mar 17, 2021 at 6:05 PM Stefan Hajnoczi wrote: > On Fri, Dec 18, 2020 at 05:39:34PM +0800, Jiachen Zhang wrote: > > Thanks for the suggestions. Actually, we choose to save all state > > information to QEMU because a virtiofsd has the same lifecycle as its > > QEMU ma

Re: [External] Re: [RFC PATCH 9/9] virtiofsd: (work around) Comment qsort in inflight I/O tracking

2021-02-04 Thread Jiachen Zhang
On Thu, Feb 4, 2021 at 8:16 PM Dr. David Alan Gilbert wrote: > * Jiachen Zhang (zhangjiachen.jay...@bytedance.com) wrote: > > This is a work around. The qsort function will malloc memory instead of > use > > stack memory when the resubmit_num is larger than 64 (total size larg

Re: [External] Re: [RFC PATCH 6/9] virtiofsd: Add two new options for crash reconnection

2021-02-04 Thread Jiachen Zhang
On Thu, Feb 4, 2021 at 8:09 PM Dr. David Alan Gilbert wrote: > * Jiachen Zhang (zhangjiachen.jay...@bytedance.com) wrote: > > We add two options for virtiofsd crash reconnection: reconnect | > > no_reconnect(default) and > > > > User of virtiofsd should set "-o r

Re: [External] Re: [RFC PATCH 0/9] Support for Virtio-fs daemon crash reconnection

2020-12-18 Thread Jiachen Zhang
On Wed, Dec 16, 2020 at 11:36 PM Marc-André Lureau < marcandre.lur...@gmail.com> wrote: > Hi > > On Tue, Dec 15, 2020 at 8:22 PM Jiachen Zhang < > zhangjiachen.jay...@bytedance.com> wrote: > >> Hi, all >> >> We implement virtio-fs crash reconnection i

[RFC PATCH 7/9] virtiofsd: Persist/restore lo_map and opened fds to/from QEMU

2020-12-15 Thread Jiachen Zhang
to virtiofsd with VHOST_USER_SET_FD messages. Signed-off-by: Jiachen Zhang Signed-off-by: Xie Yongji --- tools/virtiofsd/fuse_lowlevel.c | 21 ++- tools/virtiofsd/fuse_virtio.c | 16 ++ tools/virtiofsd/fuse_virtio.h | 1 + tools/virtiofsd/passthrough_helpers.h | 2

[RFC PATCH 8/9] virtiofsd: Ensure crash consistency after reconnection

2020-12-15 Thread Jiachen Zhang
EEXIST; lo_rmdir, lo_unlink and lo_rename should succeed (rather than EIO) when lookup_name returns ENOENT error. Signed-off-by: Jiachen Zhang Signed-off-by: Xie Yongji --- tools/virtiofsd/fuse_lowlevel.c | 3 + tools/virtiofsd/fuse_virtio.c| 28 +++ tools/virtiofsd

[RFC PATCH 5/9] virtiofsd: Convert the struct lo_map array to a more flatten layout

2020-12-15 Thread Jiachen Zhang
_map needs the deprecated in_use flag. Signed-off-by: Jiachen Zhang Signed-off-by: Xie Yongji --- tools/virtiofsd/passthrough_ll.c | 468 +++--- tools/virtiofsd/passthrough_seccomp.c | 1 + 2 files changed, 278 insertions(+), 191 deletions(-) diff --git a/t

[RFC PATCH 6/9] virtiofsd: Add two new options for crash reconnection

2020-12-15 Thread Jiachen Zhang
uests after reconnecting, it is hard to determine wether a attr is already removed or not. Therefore, we should also use "-o noxattr" (default) with "-o reconnect". Signed-off-by: Jiachen Zhang Signed-off-by: Xie Yongji --- tools/virtiofsd/helper.c | 9 +++ t

[RFC PATCH 2/9] vhost: Add vhost-user message types for sending shared memory and file fds

2020-12-15 Thread Jiachen Zhang
VHOST_USER_SET_FD and VHOST_USER_SLAVE_FD.) The following commits will use the 4 new message types to implement virtiofsd crash reconnection. Signed-off-by: Jiachen Zhang  Signed-off-by: Xie Yongji --- docs/interop/vhost-user.rst | 41 ++ hw/virtio/vhost-user.c| 123

[RFC PATCH 4/9] libvhost-user: Add vhost-user message types for sending shared memory and file fds

2020-12-15 Thread Jiachen Zhang
Add libvhost-user support for the 4 new vhost-user messages types: VHOST_USER_SET_SHM VHOST_USER_SET_FD VHOST_USER_SLAVE_SHM VHOST_USER_SLAVE_FD Signed-off-by: Jiachen Zhang  Signed-off-by: Xie Yongji --- contrib/libvhost-user/libvhost-user.c | 88

[RFC PATCH 9/9] virtiofsd: (work around) Comment qsort in inflight I/O tracking

2020-12-15 Thread Jiachen Zhang
tracking. Signed-off-by: Jiachen Zhang Signed-off-by: Xie Yongji --- contrib/libvhost-user/libvhost-user.c | 18 -- 1 file changed, 18 deletions(-) diff --git a/contrib/libvhost-user/libvhost-user.c b/contrib/libvhost-user/libvhost-user.c index 8c97013e59..c226d5d915 100644 --- a

[RFC PATCH 3/9] vhost-user-fs: Support virtiofsd crash reconnection

2020-12-15 Thread Jiachen Zhang
memory related status sent from virtiofsd. Signed-off-by: Jiachen Zhang  Signed-off-by: Xie Yongji --- hw/virtio/vhost-user-fs.c | 118 +- include/hw/virtio/vhost-user-fs.h | 14 +++- 2 files changed, 130 insertions(+), 2 deletions(-) diff --git a/hw/virtio/vhost

[RFC PATCH 1/9] vhost-user-fs: Add support for reconnection of vhost-user-fs backend

2020-12-15 Thread Jiachen Zhang
QEMU. Following patches of this patchset will focus on state persistence and restoring, with the help of some new vhost-user message types. Signed-off-by: Jiachen Zhang Signed-off-by: Xie Yongji --- hw/virtio/vhost-user-fs.c | 218 +++--- include/hw/virtio/vhost-user

[RFC PATCH 0/9] Support for Virtio-fs daemon crash reconnection

2020-12-15 Thread Jiachen Zhang
itional change to this patchset. Jiachen Zhang (9): vhost-user-fs: Add support for reconnection of vhost-user-fs backend vhost: Add vhost-user message types for sending shared memory and file fds vhost-user-fs: Support virtiofsd crash reconnection libvhost-user: Add vhost-user message types fo

[PATCH] virtiofsd: Fix the help message of posix lock

2020-10-27 Thread Jiachen Zhang
The commit 88fc107956a5812649e5918e0c092d3f78bb28ad disabled remote posix locks by default. But the --help message still says it is enabled by default. So fix it to output no_posix_lock. Signed-off-by: Jiachen Zhang --- tools/virtiofsd/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

Re: [Phishing Risk] [External] [RFC PATCH 04/21] contrib/gitdm: Add ByteDance to the domain map

2020-10-05 Thread Jiachen Zhang
On Mon, Oct 5, 2020 at 2:04 AM Philippe Mathieu-Daudé wrote: > There is a number of contributors from this domain, > add its own entry to the gitdm domain map. > > Cc: Guoqing Zhang > Cc: Jiachen Zhang > Cc: Xie Yongji > Cc: Zhenwei Pi > Signed-off-by: Philippe Ma

Re: [External] Re: [PULL 26/26] virtiofsd: Add -o allow_direct_io|no_allow_direct_io options

2020-09-29 Thread Jiachen Zhang
On Wed, Sep 30, 2020 at 5:53 AM Vivek Goyal wrote: > On Fri, Sep 25, 2020 at 01:06:55PM +0100, Dr. David Alan Gilbert (git) > wrote: > > From: Jiachen Zhang > > > > Due to the commit 65da4539803373ec4eec97ffc49ee90083e56efd, the O_DIRECT > > open flag of guest app

[PATCH v2] virtiofsd: Add -o allow_direct_io|no_allow_direct_io options

2020-08-24 Thread Jiachen Zhang
as before. If '-o allow_direct_io' is added to the starting command-line, 'allow_direct_io' will be set to 1, so that the O_DIRECT flags will be retained and host page cache can be bypassed. Signed-off-by: Jiachen Zhang Reviewed-by: Stefan Hajnoczi --- tools/virti

Re: [External] Re: [PATCH] virtiofsd: add -o allow_directio|no_directio option

2020-08-24 Thread Jiachen Zhang
On Mon, Aug 24, 2020 at 5:39 PM Daniel P. Berrangé wrote: > On Sat, Aug 22, 2020 at 01:51:04AM +0800, 张佳辰 wrote: > > On Fri, Aug 21, 2020 at 7:58 PM Daniel P. Berrangé > > wrote: > > > > > On Fri, Aug 21, 2020 at 11:41:26AM +0800, Jiachen Zhang wr

[PATCH] virtiofsd: add -o allow_directio|no_directio option

2020-08-20 Thread Jiachen Zhang
27;-o allow_directio' is added to the stariting command-line, 'allow_directio' will be set to 1, so that the O_DIRECT flags will be retained and host page cache can be bypassed. Signed-off-by: Jiachen Zhang --- tools/virtiofsd/helper.c | 4 tools/virtiofsd/passthroug