[PATCH] virtiofsd: passthrough_ll: set FUSE_LOG_INFO as default log_level

2020-10-08 Thread Misono Tomohiro
Just noticed that although help message says default log level is INFO, it is actually 0 (EMRGE) and no mesage will be shown when error occurs. It's better to follow help message. Signed-off-by: Misono Tomohiro --- tools/virtiofsd/passthrough_ll.c | 7 +++ 1 file changed, 3 insertions(

[PATCH v2] configure: add option for virtiofsd

2020-10-08 Thread Misono Tomohiro
now includes virtiofsd entry: build virtiofs daemon: YES/NO Signed-off-by: Misono Tomohiro --- This patch is based on current master branch v1 ... https://lore.kernel.org/qemu-devel/20201007092913.1524199-1-misono.tomoh...@jp.fujitsu.com/ v1 -> v2: Update to follow the current meson build st

[PATCH] configure: add option for virtiofsd

2020-10-07 Thread Misono Tomohiro
: this patch defines CONFIG_VIRTIOFSD for config-host.mak to avoid duplicate dependency check in tools/meson.build. Signed-off-by: Misono Tomohiro --- configure | 22 ++ docs/meson.build | 2 +- meson.build | 1 + tools/meson.build | 9 + 4 files

[PATCH] virtiofsd: Cleanup norace option description

2020-08-06 Thread Misono Tomohiro
Cleanup norace option as the feature was removed by below commit: Fixes: 93bb3d8d4cda("virtiofsd: remove symlink fallbacks") Signed-off-by: Misono Tomohiro --- docs/tools/virtiofsd.rst | 3 --- tools/virtiofsd/helper.c | 2 -- 2 files changed, 5 deletions(-) diff --git a/

[PATCH v4 2/2] virtiofsd: Fix xattr operations

2020-02-26 Thread Misono Tomohiro
-fs/2019-October/msg00046.html Signed-off-by: Misono Tomohiro --- tools/virtiofsd/fuse_virtio.c| 13 tools/virtiofsd/passthrough_ll.c | 105 +-- tools/virtiofsd/seccomp.c| 6 ++ 3 files changed, 77 insertions(+), 47 deletions(-) diff --git a/tools

[PATCH v4 0/2] virtiofsd: Fix xattr operations

2020-02-26 Thread Misono Tomohiro
ome code style fix/update comments and commit log as suggested by Vivek - CC qemu-devel ML too Previous versions can be found in virtiofs ML: v3: https://www.redhat.com/archives/virtio-fs/2020-February/msg00032.html Thanks, Misono Tomohiro (2): virtiofsd: passthrough_ll: cleanup getxattr/listxa

[PATCH v4 1/2] virtiofsd: passthrough_ll: cleanup getxattr/listxattr

2020-02-26 Thread Misono Tomohiro
ignored now since @inode is already NULL) Signed-off-by: Misono Tomohiro --- tools/virtiofsd/passthrough_ll.c | 54 +--- 1 file changed, 22 insertions(+), 32 deletions(-) diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c index 9772823066

Re: [PATCH v2 015/109] virtiofsd: Add options for virtio

2020-01-21 Thread Misono Tomohiro
> From: "Dr. David Alan Gilbert" > > Add options to specify parameters for virtio-fs paths, i.e. > > ./virtiofsd -o vhost_user_socket=/tmp/vhostqemu > > Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Misono Tomohiro

Re: [PATCH v2 109/109] virtiofsd: add some options to the help message

2020-01-21 Thread Misono Tomohiro
ons from help in order not to confuse users. Signed-off-by: Misono Tomohiro --- tools/virtiofsd/fuse_lowlevel.c | 12 +++- tools/virtiofsd/fuse_lowlevel.h | 1 - tools/virtiofsd/helper.c| 2 -- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/tools/virtiofsd/fuse_lo

Re: [PATCH v2 070/109] virtiofsd: passthrough_ll: control readdirplus

2020-01-21 Thread Misono Tomohiro
default: readdirplus\n" Actually, default behavior is 1. no_readdirplus if cache=none 2. readdirplus otherwise. So help message should be fixed. other than that Reviewed-by: Misono Tomohiro >); > } > > diff --git a/tools/virtiofsd/pass

Re: [PATCH v2 080/109] virtiofsd: fix memory leak on lo.source

2020-01-21 Thread Misono Tomohiro
> From: Liu Bo > > valgrind reported that lo.source is leaked on quiting, but it was defined > as (const char*) as it may point to a const string "/". > > Signed-off-by: Liu Bo Reviewed-by: Misono Tomohiro

Re: [PATCH v2 073/109] virtiofsd: extract root inode init into setup_root()

2020-01-21 Thread Misono Tomohiro
> From: Miklos Szeredi > > Inititialize the root inode in a single place. btw, Initialize > > Signed-off-by: Miklos Szeredi > Signed-off-by: Stefan Hajnoczi > dgilbert: > with fix suggested by Misono Tomohiro Reviewed-by: Misono Tomohiro

Re: [PATCH 016/104] virtiofsd: Open vhost connection instead of mounting

2020-01-20 Thread Misono Tomohiro
qemu/blob/virtio-fs-dev/tools/virtiofsd/fuse_lowlevel.c#L2663 Reviewed-by: Misono Tomohiro

Re: [PATCH 100/104] virtiofsd: process requests in a thread pool

2020-01-20 Thread Misono Tomohiro
added to the seccomp whitelist because glib invokes > it. > > Signed-off-by: Stefan Hajnoczi Looks good to me. Reviewed-by: Misono Tomohiro

Re: [PATCH 062/104] virtiofsd: Handle hard reboot

2020-01-19 Thread Misono Tomohiro
> From: "Dr. David Alan Gilbert" > > Handle a > mount > hard reboot (without unmount) > mount > > we get another 'init' which FUSE doesn't normally expect. > > Signed-off-by: Dr. David Alan Gilbert > --- > tools/virtiofsd/fuse_lowlevel.c | 16 +++- > 1 file changed, 15 inser

Re: [PATCH 094/104] virtiofsd: do not always set FUSE_FLOCK_LOCKS

2020-01-17 Thread Misono Tomohiro
done in another patch. Reviewed-by: Misono Tomohiro > --- > tools/virtiofsd/passthrough_ll.c | 11 --- > 1 file changed, 8 insertions(+), 3 deletions(-) > > diff --git a/tools/virtiofsd/passthrough_ll.c > b/tools/virtiofsd/passthrough_ll.c > index 8f4ab8351c.

Re: [PATCH 095/104] virtiofsd: convert more fprintf and perror to use fuse log infra

2020-01-16 Thread Misono Tomohiro
fuse_log(FUSE_LOG_ERR, "fuse: cannot set signal handler: %s\n", > + strerror(errno)); I notice one perror is remaining: > perror("fuse: cannot set signal handler"); other than that, Reviewed-by: Misono Tomohiro > return -1; >

Re: [PATCH 093/104] virtiofsd: introduce inode refcount to prevent use-after-free

2020-01-16 Thread Misono Tomohiro
> From: Stefan Hajnoczi > > If thread A is using an inode it must not be deleted by thread B when > processing a FUSE_FORGET request. > > The FUSE protocol itself already has a counter called nlookup that is > used in FUSE_FORGET messages. We cannot trust this counter since the > untrusted clie

Re: [PATCH 072/104] virtiofsd: passthrough_ll: fix refcounting on remove/rename

2020-01-16 Thread Misono Tomohiro
> From: Miklos Szeredi > > Signed-off-by: Miklos Szeredi I'm not familiar with qemu convention but shouldn't we put at least one line of description like linux kernel? For code itself: Reviewed-by: Misono Tomohiro > --- > tools/virtio

Re: [PATCH 071/104] virtiofsd: extract root inode init into setup_root()

2020-01-15 Thread Misono Tomohiro
> From: Miklos Szeredi > > Inititialize the root inode in a single place. > > Signed-off-by: Miklos Szeredi > Signed-off-by: Stefan Hajnoczi > --- > tools/virtiofsd/passthrough_ll.c | 26 -- > 1 file changed, 24 insertions(+), 2 deletions(-) > > diff --git a/tools/vir

Re: [PATCH 070/104] virtiofsd: fail when parent inode isn't known in lo_do_lookup()

2020-01-15 Thread Misono Tomohiro
Looks good to me. Reviewed-by: Misono Tomohiro > --- > tools/virtiofsd/passthrough_ll.c | 14 -- > 1 file changed, 12 insertions(+), 2 deletions(-) > > diff --git a/tools/virtiofsd/passthrough_ll.c > b/tools/virtiofsd/passthrough_ll.c > index 1618db5a92..ef8b

Re: [PATCH 053/104] virtiofsd: Drop CAP_FSETID if client asked for it

2020-01-15 Thread Misono Tomohiro
dgilbert: reworked for libcap-ng Looks good to me. Reviewed-by: Misono Tomohiro > --- > tools/virtiofsd/passthrough_ll.c | 105 +++ > 1 file changed, 105 insertions(+) > > diff --git a/tools/virtiofsd/passthrough_ll.c > b/tools/virtiofsd/passth

Re: [PATCH 051/104] virtiofsd: Parse flag FUSE_WRITE_KILL_PRIV

2020-01-15 Thread Misono Tomohiro
ite_flags & FUSE_WRITE_CACHE; > +fi.writepage = !!(arg->write_flags & FUSE_WRITE_CACHE); > +fi.kill_priv = !!(arg->write_flags & FUSE_WRITE_KILL_PRIV); > > if (ibufv->count == 1) { > assert(!(tmpbufv.buf[0].flags & FUSE_BUF_IS_FD)); > -- > 2.23.0 Reviewed-by: Misono Tomohiro side-note: virtiofs uses write_buf() and therefore do_write() is never called. How about cleanup the function?

Re: [PATCH 084/104] Virtiofsd: fix memory leak on fuse queueinfo

2020-01-15 Thread Misono Tomohiro
> From: Liu Bo > > For fuse's queueinfo, both queueinfo array and queueinfos are allocated in > fv_queue_set_started() but not cleaned up when the daemon process quits. > > This fixes the leak in proper places. > > Signed-off-by: Liu Bo > Signed-off-by: Eric Ren > --- > tools/virtiofsd/fuse_

[PATCH] virtiofsd: Fix data corruption with O_APPEND wirte in writeback mode

2019-10-23 Thread Misono Tomohiro
same operation in lo_create(). So, factor out the flag update operation in lo_open() to update_open_flags() and call it in both lo_open() and lo_create(). This fixes the failure of xfstest generic/069 in writeback mode (which tests O_APPEND write data integrity). Signed-off-by: Misono Tomohiro

[PATCH 1/2] virtiofsd: Avoid process hang when doing xattr operation to FIFO

2019-10-16 Thread Misono Tomohiro
regular files, add it to open flags to fix the problem. Signed-off-by: Misono Tomohiro --- contrib/virtiofsd/passthrough_ll.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/virtiofsd/passthrough_ll.c b/contrib/virtiofsd/passthrough_ll.c index 84b60d85bd

[PATCH 0/2] virtiofsd: Two fix for xattr operation

2019-10-16 Thread Misono Tomohiro
(since open in virtiofsd fails) 2. we cannot xattr to symbolic link I don't think 1 is a big problem but can we fix 2? Misono Tomohiro (2): virtiofsd: Avoid process hang when doing xattr operation to FIFO virtiofsd: Allow setxattr operation to directry contrib/virtiofsd/passthrough_ll.

[PATCH 2/2] virtiofsd: Allow setxattr operation to directry

2019-10-16 Thread Misono Tomohiro
setxattr to directry fails because lo_setxattr (and lo_remove_xattr) tries to open any file with O_RDWR even if it is a directory. Since O_RDONLY is enough for the operation, change O_RDWR flag to O_RDONLY to fix the problem. Signed-off-by: Misono Tomohiro --- contrib/virtiofsd/passthrough_ll.c

[Virtio-fs] [PATCH] virtiofsd: Add pread64() to seccomp list for posix_fallocate()

2019-10-04 Thread Misono Tomohiro
, just add pread64() to seccomp white list to fix this problem. Signed-off-by: Misono Tomohiro --- contrib/virtiofsd/seccomp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/virtiofsd/seccomp.c b/contrib/virtiofsd/seccomp.c index 93b679271d..88b61bca42 100644 --- a/contrib/virtiofsd