Re: [Qemu-devel] [RFC]QEMU disk I/O limits

2011-05-31 Thread Vivek Goyal
On Mon, May 30, 2011 at 01:09:23PM +0800, Zhi Yong Wu wrote: > Hello, all, > > I have prepared to work on a feature called "Disk I/O limits" for > qemu-kvm projeect. > This feature will enable the user to cap disk I/O amount performed by a > VM.It is important for some storage resources

Re: [Qemu-devel] [RFC]QEMU disk I/O limits

2011-05-31 Thread Vivek Goyal
On Tue, May 31, 2011 at 08:50:40AM -0500, Anthony Liguori wrote: > On 05/31/2011 08:45 AM, Vivek Goyal wrote: > >On Mon, May 30, 2011 at 01:09:23PM +0800, Zhi Yong Wu wrote: > >>Hello, all, > >> > >> I have prepared to work on a feature called "Dis

Re: [Qemu-devel] [RFC]QEMU disk I/O limits

2011-05-31 Thread Vivek Goyal
On Tue, May 31, 2011 at 02:56:46PM +0100, Daniel P. Berrange wrote: > On Tue, May 31, 2011 at 09:45:37AM -0400, Vivek Goyal wrote: > > On Mon, May 30, 2011 at 01:09:23PM +0800, Zhi Yong Wu wrote: > > > Hello, all, > > > > > > I have prepared to work on a

Re: [Qemu-devel] [RFC]QEMU disk I/O limits

2011-05-31 Thread Vivek Goyal
On Tue, May 31, 2011 at 03:19:56PM +0100, Daniel P. Berrange wrote: > On Tue, May 31, 2011 at 10:10:37AM -0400, Vivek Goyal wrote: > > On Tue, May 31, 2011 at 02:56:46PM +0100, Daniel P. Berrange wrote: > > > On Tue, May 31, 2011 at 09:45:37AM -0400, Vivek Goyal wrote: > >

Re: [Qemu-devel] [RFC]QEMU disk I/O limits

2011-05-31 Thread Vivek Goyal
On Tue, May 31, 2011 at 09:25:31AM -0500, Anthony Liguori wrote: > On 05/31/2011 09:04 AM, Vivek Goyal wrote: > >On Tue, May 31, 2011 at 08:50:40AM -0500, Anthony Liguori wrote: > >>On 05/31/2011 08:45 AM, Vivek Goyal wrote: > >>>On Mon, May 30, 2011 at 01:09

Re: [Qemu-devel] [RFC]QEMU disk I/O limits

2011-05-31 Thread Vivek Goyal
On Mon, May 30, 2011 at 01:09:23PM +0800, Zhi Yong Wu wrote: [..] > 3.) How the users enable and play with it > QEMU -drive option will be extended so that disk I/O limits can be > specified on its command line, such as -drive [iops=xxx,][throughput=xxx] or > -drive [iops_rd=xxx,][iops_w

Re: [Qemu-devel] [RFC]QEMU disk I/O limits

2011-05-31 Thread Vivek Goyal
On Tue, May 31, 2011 at 01:39:47PM -0500, Anthony Liguori wrote: > On 05/31/2011 12:59 PM, Vivek Goyal wrote: > >On Tue, May 31, 2011 at 09:25:31AM -0500, Anthony Liguori wrote: > >>On 05/31/2011 09:04 AM, Vivek Goyal wrote: > >>>On Tue, May 31, 2011 at 08:50:40A

Re: [Qemu-devel] [RFC]QEMU disk I/O limits

2011-06-01 Thread Vivek Goyal
On Wed, Jun 01, 2011 at 11:19:58AM +0800, Zhi Yong Wu wrote: > On Tue, May 31, 2011 at 03:55:49PM -0400, Vivek Goyal wrote: > >Date: Tue, 31 May 2011 15:55:49 -0400 > >From: Vivek Goyal > >To: Zhi Yong Wu > >Cc: kw...@redhat.com, aligu...@us.ibm.com, stefa...@li

Re: [Qemu-devel] [RFC]QEMU disk I/O limits

2011-06-01 Thread Vivek Goyal
On Tue, May 31, 2011 at 06:30:09PM -0500, Anthony Liguori wrote: [..] > The level of consistency will then depend on whether you overcommit > your hardware and how you have it configured. Agreed. > > Consistency is very hard because at the end of the day, you still > have shared resources. Eve

Re: [Qemu-devel] [RFC]QEMU disk I/O limits

2011-06-01 Thread Vivek Goyal
On Wed, Jun 01, 2011 at 10:15:30PM +0100, Stefan Hajnoczi wrote: > On Wed, Jun 1, 2011 at 2:20 PM, Vivek Goyal wrote: > > On Tue, May 31, 2011 at 06:30:09PM -0500, Anthony Liguori wrote: > > > > [..] > >> The level of consistency will then depend on whether you ove

Re: [Qemu-devel] CFQ I/O starvation problem triggered by RHEL6.0 KVM guests

2011-09-08 Thread Vivek Goyal
On Thu, Sep 08, 2011 at 06:13:53PM +0900, Takuya Yoshikawa wrote: > This is a report of strange cfq behaviour which seems to be triggered by > QEMU posix aio threads. > > Host environment: > OS: RHEL6.0 KVM/qemu-kvm (with no patch applied) > IO scheduler: cfq (with the default parameters) So

Re: [Qemu-devel] CFQ I/O starvation problem triggered by RHEL6.0 KVM guests

2011-09-09 Thread Vivek Goyal
On Fri, Sep 09, 2011 at 06:00:28PM +0900, Takuya Yoshikawa wrote: [..] > > > > > - Even if there are close cooperators, these queues are merged and they > > are treated as single queue from slice point of view. So cooperating > > queues should be merged and get a single slice instead of star

Re: Question about performance comparison between virtio-fs and virtio-blk

2022-07-26 Thread Vivek Goyal
ops of > > virtio-blk and virtio-fs are similar. > Hi Hao, My impression in general is that virtio-blk is much faster than virtiofs. A simple macro test is do a kernel compilation and compare time taken between the two. > I have CCed Vivek Goyal, who has done more virtiofs benchm

Re: Question about performance comparison between virtio-fs and virtio-blk

2022-07-26 Thread Vivek Goyal
On Tue, Jul 26, 2022 at 10:41:23PM +0800, Hao Xu wrote: > On 7/26/22 21:17, Vivek Goyal wrote: > > On Tue, Jul 26, 2022 at 08:55:38AM -0400, Stefan Hajnoczi wrote: > > > On Tue, 26 Jul 2022 at 08:24, Hao Xu wrote: > > > > I watched your presentation about virtiofs i

[PATCH] virtiofsd: Disable killpriv_v2 by default

2022-07-29 Thread Vivek Goyal
patch disabled killpriv_v2 by default. User can choose to enable it by passing option "-o killpriv_v2". Signed-off-by: Vivek Goyal --- tools/virtiofsd/passthrough_ll.c | 13 ++--- 1 file changed, 2 insertions(+), 11 deletions(-) Index: rhvgoyal-qemu/tools/virtiofsd/passth

Re: [Virtio-fs] [PATCH 2/2] virtiofsd: move to a new pid namespace

2019-10-17 Thread Vivek Goyal
On Wed, Oct 16, 2019 at 05:01:57PM +0100, Stefan Hajnoczi wrote: [..] > + /* > + * If the mounts have shared propagation then we want to opt out so our > + * mount changes don't affect the parent mount namespace. > + */ > + if (mount(NULL, "/", NULL, MS_REC|MS_SLAVE, NULL) <

Re: [Virtio-fs] [PATCH 0/2] virtiofsd: Two fix for xattr operation

2019-10-17 Thread Vivek Goyal
On Thu, Oct 17, 2019 at 01:23:57PM +0200, Miklos Szeredi wrote: > On Thu, Oct 17, 2019 at 12:05 PM Stefan Hajnoczi wrote: > > > > On Wed, Oct 16, 2019 at 07:37:52PM +0900, Misono Tomohiro wrote: > > > Hello, > > > > > > I test xattr operation on virtiofs using xfstest generic/062 > > > (with -o xa

Re: [Virtio-fs] [PATCH] virtiofsd: Fix data corruption with O_APPEND wirte in writeback mode

2019-10-23 Thread Vivek Goyal
On Wed, Oct 23, 2019 at 09:25:23PM +0900, Misono Tomohiro wrote: > When writeback mode is enabled (-o writeback), O_APPEND handling is > done in kernel. Therefore virtiofsd clears O_APPEND flag when open. > Otherwise O_APPEND flag takes precedence over pwrite() and write > data may corrupt. > > Cu

Re: [PATCH 1/4] virtiofsd: Release file locks using F_UNLCK

2019-11-22 Thread Vivek Goyal
On Fri, Nov 22, 2019 at 10:07:13AM +, Stefan Hajnoczi wrote: > On Fri, Nov 15, 2019 at 03:55:40PM -0500, Vivek Goyal wrote: > > diff --git a/contrib/virtiofsd/passthrough_ll.c > > b/contrib/virtiofsd/passthrough_ll.c > > index bc214df0c7..028e7da273 100644 > &

Re: [PATCH 2/4] virtiofd: Create a notification queue

2019-11-22 Thread Vivek Goyal
On Fri, Nov 22, 2019 at 10:19:03AM +, Stefan Hajnoczi wrote: > On Fri, Nov 15, 2019 at 03:55:41PM -0500, Vivek Goyal wrote: > > /* Callback from libvhost-user */ > > static void fv_set_features(VuDev *dev, uint64_t features) > > { > > +struct fv_VuDev *vud

Re: [PATCH 3/4] virtiofsd: Specify size of notification buffer using config space

2019-11-25 Thread Vivek Goyal
On Fri, Nov 22, 2019 at 10:33:00AM +, Stefan Hajnoczi wrote: > On Fri, Nov 15, 2019 at 03:55:42PM -0500, Vivek Goyal wrote: > > diff --git a/contrib/virtiofsd/fuse_virtio.c > > b/contrib/virtiofsd/fuse_virtio.c > > index 44c9b3..982b6ad0bd 100644 > > --- a/cont

Re: [Virtio-fs] [PATCH 4/4] virtiofsd: Implement blocking posix locks

2019-11-25 Thread Vivek Goyal
On Fri, Nov 22, 2019 at 10:53:24AM +, Stefan Hajnoczi wrote: > On Fri, Nov 15, 2019 at 03:55:43PM -0500, Vivek Goyal wrote: > > diff --git a/contrib/virtiofsd/fuse_lowlevel.c > > b/contrib/virtiofsd/fuse_lowlevel.c > > index d4a42d9804..f706e440bf 100644 > &

Re: [Virtio-fs] [PATCH 4/4] virtiofsd: Implement blocking posix locks

2019-11-25 Thread Vivek Goyal
On Fri, Nov 22, 2019 at 05:47:32PM +, Dr. David Alan Gilbert wrote: [..] > > +static int virtio_send_notify_msg(struct fuse_session *se, struct iovec > > *iov, > > + int count) > > +{ > > +struct fv_QueueInfo *qi; > > +VuDev *dev = &se->virtio_dev->dev; > >

Re: [Virtio-fs] [PATCH 4/4] virtiofsd: Implement blocking posix locks

2019-11-27 Thread Vivek Goyal
On Tue, Nov 26, 2019 at 01:02:29PM +, Dr. David Alan Gilbert wrote: [..] > > > > @@ -1950,21 +1948,54 @@ static void lo_setlk(fuse_req_t req, fuse_ino_t > > > > ino, > > > > > > > > if (!plock) { > > > > saverr = ret; > > > > + pthread_mutex_unlock(&ino

[PATCH v2 2/5] virtiofsd: Release file locks using F_UNLCK

2019-12-04 Thread Vivek Goyal
_UNLCK) instead and plock will be freed later. Signed-off-by: Vivek Goyal --- contrib/virtiofsd/passthrough_ll.c | 31 -- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/contrib/virtiofsd/passthrough_ll.c b/contrib/virtiofsd/passthrough_ll.c index bc21

[PATCH v2 0/5] [RFC] virtiofsd, vhost-user-fs: Add support for notification queue

2019-12-04 Thread Vivek Goyal
/blocking-locks-v2 Thanks Vivek Vivek Goyal (5): virtiofsd: Get rid of unused fields in fv_QueueInfo virtiofsd: Release file locks using F_UNLCK virtiofd: Create a notification queue virtiofsd: Specify size of notification buffer using config space virtiofsd: Implement blocking posix locks

[PATCH v2 4/5] virtiofsd: Specify size of notification buffer using config space

2019-12-04 Thread Vivek Goyal
Daemon specifies size of notification buffer needed and that should be done using config space. Only ->notify_buf_size value of config space comes from daemon. Rest of it is filled by qemu device emulation code. Signed-off-by: Vivek Goyal --- contrib/virtiofsd/fuse_virtio.c|

[PATCH v2 1/5] virtiofsd: Get rid of unused fields in fv_QueueInfo

2019-12-04 Thread Vivek Goyal
There are some unused fields in "struct fv_QueueInfo". Get rid of these fields. Signed-off-by: Vivek Goyal --- contrib/virtiofsd/fuse_virtio.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/contrib/virtiofsd/fuse_virtio.c b/contrib/virtiofsd/fuse_virtio.c index 31c8542b6c..

[PATCH v2 3/5] virtiofd: Create a notification queue

2019-12-04 Thread Vivek Goyal
Add a notification queue which will be used to send async notifications for file lock availability. Signed-off-by: Vivek Goyal --- contrib/virtiofsd/fuse_i.h | 1 + contrib/virtiofsd/fuse_virtio.c| 74 +++--- hw/virtio/vhost-user-fs-pci.c

[PATCH v2 5/5] virtiofsd: Implement blocking posix locks

2019-12-04 Thread Vivek Goyal
As of now we don't support fcntl(F_SETLKW) and if we see one, we return -EOPNOTSUPP. Change that by accepting these requests and returning a reply immediately asking caller to wait. Once lock is available, send a notification to the waiter indicating lock is available. Signed-off-by: Vivek

Re: [Qemu-devel] [Virtio-fs] [PATCH v2] virtiofsd: fix compile error if 'F_OFD_GETLK' not defined

2019-08-06 Thread Vivek Goyal
On Fri, Aug 02, 2019 at 11:53:52AM +0100, Dr. David Alan Gilbert wrote: > * piaojun (piao...@huawei.com) wrote: > > Use F_GETLK for fcntl when F_OFD_GETLK not defined, such as kernel 3.10. > > > > Signed-off-by: Jun Piao > > > > --- > > v2: > > - Use F_OFD_SETLK to replace F_OFD_GETLK in #ifdef

Re: [Qemu-devel] [Virtio-fs] [PATCH 0/4] virtiofsd: multithreading preparation part 3

2019-08-07 Thread Vivek Goyal
On Wed, Aug 07, 2019 at 07:03:55PM +0100, Stefan Hajnoczi wrote: > On Thu, Aug 01, 2019 at 05:54:05PM +0100, Stefan Hajnoczi wrote: > > Performance > > --- > > Please try these patches out and share your results. > > Here are the performance numbers: > > Threadpool | iodepth | iodepth >

Re: [Qemu-devel] [Virtio-fs] [PATCH 0/4] virtiofsd: multithreading preparation part 3

2019-08-08 Thread Vivek Goyal
On Thu, Aug 08, 2019 at 10:53:16AM +0100, Dr. David Alan Gilbert wrote: > * Stefan Hajnoczi (stefa...@redhat.com) wrote: > > On Wed, Aug 07, 2019 at 04:57:15PM -0400, Vivek Goyal wrote: > > > Kernel also serializes MAP/UNMAP on one inode. So you will need to run > > >

Re: Status of DAX for virtio-fs/virtiofsd?

2023-05-18 Thread Vivek Goyal
On Wed, May 17, 2023 at 12:26:18PM -0400, Stefan Hajnoczi wrote: > On Wed, 17 May 2023 at 11:54, Alex Bennée wrote: > Hi Alex, > There were two unresolved issues: > > 1. How to inject SIGBUS when the guest accesses a page that's beyond > the end-of-file. > 2. Implementing the vhost-user messages

Re: [PATCH 0/2] virtiofsd: Support FUSE_SYNCFS on unannounced submounts

2022-03-04 Thread Vivek Goyal
On Thu, Mar 03, 2022 at 06:13:21PM +0100, Greg Kurz wrote: > This is the current patches I have : one to track submounts > and the other to call syncfs() on them. Tested on simple > cases only. > > I won't be able to work on this anymore, so I'm posting for the > records. Anyone is welcome to pick

[PATCH 0/5] virtiofsd: Add support for file security context at creation

2021-09-24 Thread Vivek Goyal
ase review. Thanks Vivek Vivek Goyal (5): fuse: Header file changes for FUSE_SECURITY_CTX fuse_lowlevel.c: Add capability to parse security context virtiofsd: Move core file creation code in separate function virtiofsd: Create new file with fscreate set virtiofsd: Create new file using

[PATCH 4/5] virtiofsd: Create new file with fscreate set

2021-09-24 Thread Vivek Goyal
guest policies are in sync and don't conflict. Signed-off-by: Vivek Goyal --- tools/virtiofsd/passthrough_ll.c | 284 --- 1 file changed, 257 insertions(+), 27 deletions(-) diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c

[PATCH 5/5] virtiofsd: Create new file using O_TMPFILE and set security context

2021-09-24 Thread Vivek Goyal
FILE, we fallback to non-atomic behavior. Signed-off-by: Vivek Goyal --- tools/virtiofsd/passthrough_ll.c | 78 +--- 1 file changed, 71 insertions(+), 7 deletions(-) diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c index d8c14d3220..f5c

[PATCH 3/5] virtiofsd: Move core file creation code in separate function

2021-09-24 Thread Vivek Goyal
Move core file creation bits in a separate function. Soon this is going to get more complex as file creation need to set security context also. And there will be multiple modes of file creation in next patch. Signed-off-by: Vivek Goyal --- tools/virtiofsd/passthrough_ll.c | 36

[PATCH 2/5] fuse_lowlevel.c: Add capability to parse security context

2021-09-24 Thread Vivek Goyal
Add capability to enable and parse security context as sent by client and put into fuse_req. Filesystems now can get security context from request and set it on files during creation. Signed-off-by: Vivek Goyal --- tools/virtiofsd/fuse_common.h | 5 +++ tools/virtiofsd/fuse_i.h| 7

[PATCH 1/5] fuse: Header file changes for FUSE_SECURITY_CTX

2021-09-24 Thread Vivek Goyal
These are just header file changes which should show up in qemu if corresponding kernel changes get merged. Signed-off-by: Vivek Goyal --- include/standard-headers/linux/fuse.h | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/include/standard-headers/linux

[PATCH 03/13] virtiofsd: Remove unused virtio_fs_config definition

2021-09-30 Thread Vivek Goyal
"struct virtio_fs_config" definition seems to be unused in fuse_virtio.c. Remove it. Signed-off-by: Vivek Goyal --- tools/virtiofsd/fuse_virtio.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/tools/virtiofsd/fuse_virtio.c b/tools/virtiofsd/fuse_virtio.c index 8f4fd165b9..

[PATCH 06/13] vhost-user-fs: Use helpers to create/cleanup virtqueue

2021-09-30 Thread Vivek Goyal
Add helpers to create/cleanup virtuqueues and use those helpers. I will need to reconfigure queues in later patches and using helpers will allow reusing the code. Signed-off-by: Vivek Goyal --- hw/virtio/vhost-user-fs.c | 87 +++ 1 file changed, 52 insertions

[PATCH 01/13] virtio_fs.h: Add notification queue feature bit

2021-09-30 Thread Vivek Goyal
This change will ultimately come from kernel as kernel header file update when kernel patches get merged. Signed-off-by: Vivek Goyal --- include/standard-headers/linux/virtio_fs.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/standard-headers/linux/virtio_fs.h b/include

[PATCH 00/13] virtiofsd: Support notification queue and

2021-09-30 Thread Vivek Goyal
changes here. https://lore.kernel.org/linux-fsdevel/20210930143850.1188628-1-vgo...@redhat.com/T/#mb2d0fbfdb580ef33b6e812d0acbd16333b11f2cf Any feedback is welcome. Thanks Vivek Vivek Goyal (13): virtio_fs.h: Add notification queue feature bit virtiofsd: fuse.h header file changes for lock

[PATCH 09/13] virtiofsd: Specify size of notification buffer using config space

2021-09-30 Thread Vivek Goyal
Daemon specifies size of notification buffer needed and that should be done using config space. Only ->notify_buf_size value of config space comes from daemon. Rest of it is filled by qemu device emulation code. Signed-off-by: Vivek Goyal Signed-off-by: Ioannis Angelakopoulos --- hw/vir

[PATCH 12/13] virtiofsd: Implement blocking posix locks

2021-09-30 Thread Vivek Goyal
lock request, we are returning error value as "1", which signals to client to queue the lock request internally and later client will get a notification which will signal lock is taken (or error). And then fuse client should wake up the guest process. Signed-off-by: Vivek Goyal Signed-

[PATCH 13/13] virtiofsd, seccomp: Add clock_nanosleep() to allow list

2021-09-30 Thread Vivek Goyal
g_usleep() calls nanosleep() and that now seems to call clock_nanosleep() syscall. Now these patches are making use of g_usleep(). So add clock_nanosleep() to list of allowed syscalls. Signed-off-by: Vivek Goyal --- tools/virtiofsd/passthrough_seccomp.c | 1 + 1 file changed, 1 insertion

[PATCH 11/13] virtiofsd: Shutdown notification queue in the end

2021-09-30 Thread Vivek Goyal
ff-by: Vivek Goyal --- tools/virtiofsd/fuse_virtio.c | 27 ++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/tools/virtiofsd/fuse_virtio.c b/tools/virtiofsd/fuse_virtio.c index c67c2e0e7a..a87e88e286 100644 --- a/tools/virtiofsd/fuse_virtio.c +++ b/tools/virt

[PATCH 10/13] virtiofsd: Custom threadpool for remote blocking posix locks requests

2021-09-30 Thread Vivek Goyal
thread to avoid a deadlock, when all the threads in the custom threadpool are blocked. Then virtiofsd proceeds to cleanup the state of the threads, release them back to the system and re-initialize. Signed-off-by: Ioannis Angelakopoulos Signed-off-by: Vivek Goyal --- tools/virtiofsd/fuse_virtio.c

[PATCH 02/13] virtiofsd: fuse.h header file changes for lock notification

2021-09-30 Thread Vivek Goyal
This change comes from fuse.h kernel header file udpate. Hence keeping it in a separate patch. Signed-off-by: Vivek Goyal --- include/standard-headers/linux/fuse.h | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/include/standard-headers/linux/fuse.h b/include

[PATCH 04/13] virtiofsd: Add a helper to send element on virtqueue

2021-09-30 Thread Vivek Goyal
We have open coded logic to take locks and push element on virtqueue at three places. Add a helper and use it everywhere. Code is easier to read and less number of lines of code. Signed-off-by: Vivek Goyal --- tools/virtiofsd/fuse_virtio.c | 45 ++- 1 file

[PATCH 05/13] virtiofsd: Add a helper to stop all queues

2021-09-30 Thread Vivek Goyal
Use a helper to stop all the queues. Later in the patch series I am planning to use this helper at one more place later in the patch series. Signed-off-by: Vivek Goyal --- tools/virtiofsd/fuse_virtio.c | 22 +- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a

[PATCH 08/13] virtiofsd: Create a notification queue

2021-09-30 Thread Vivek Goyal
Add a notification queue which will be used to send async notifications for file lock availability. Signed-off-by: Vivek Goyal Signed-off-by: Ioannis Angelakopoulos --- hw/virtio/vhost-user-fs-pci.c | 4 +- hw/virtio/vhost-user-fs.c | 62 +-- include/hw

[PATCH 07/13] virtiofsd: Release file locks using F_UNLCK

2021-09-30 Thread Vivek Goyal
_UNLCK) instead of closing fd and plock will be freed later when lo_inode is being freed. Signed-off-by: Vivek Goyal Signed-off-by: Ioannis Angelakopoulos --- tools/virtiofsd/passthrough_ll.c | 21 + 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/tools/vir

Re: [PATCH 02/13] virtiofsd: fuse.h header file changes for lock notification

2021-10-04 Thread Vivek Goyal
On Mon, Oct 04, 2021 at 02:16:18PM +0100, Stefan Hajnoczi wrote: > On Thu, Sep 30, 2021 at 11:30:26AM -0400, Vivek Goyal wrote: > > This change comes from fuse.h kernel header file udpate. Hence keeping > > it in a separate patch. > > QEMU syncs include/standard-headers/

Re: [PATCH 06/13] vhost-user-fs: Use helpers to create/cleanup virtqueue

2021-10-04 Thread Vivek Goyal
On Mon, Oct 04, 2021 at 02:54:17PM +0100, Stefan Hajnoczi wrote: > On Thu, Sep 30, 2021 at 11:30:30AM -0400, Vivek Goyal wrote: > > Add helpers to create/cleanup virtuqueues and use those helpers. I will > > s/virtuqueues/virtqueues/ > > > need to reconfigure queues in

Re: [PATCH 08/13] virtiofsd: Create a notification queue

2021-10-04 Thread Vivek Goyal
On Mon, Oct 04, 2021 at 03:30:38PM +0100, Stefan Hajnoczi wrote: > On Thu, Sep 30, 2021 at 11:30:32AM -0400, Vivek Goyal wrote: > > Add a notification queue which will be used to send async notifications > > for file lock availability. > > > > Signed-off-by: Viv

Re: [PATCH 09/13] virtiofsd: Specify size of notification buffer using config space

2021-10-04 Thread Vivek Goyal
On Mon, Oct 04, 2021 at 03:33:47PM +0100, Stefan Hajnoczi wrote: > On Thu, Sep 30, 2021 at 11:30:33AM -0400, Vivek Goyal wrote: > > Daemon specifies size of notification buffer needed and that should be > > done using config space. > > > > Only ->notify_buf_size va

Re: [PATCH 08/13] virtiofsd: Create a notification queue

2021-10-05 Thread Vivek Goyal
On Tue, Oct 05, 2021 at 09:14:14AM +0100, Stefan Hajnoczi wrote: > On Mon, Oct 04, 2021 at 05:01:07PM -0400, Vivek Goyal wrote: > > On Mon, Oct 04, 2021 at 03:30:38PM +0100, Stefan Hajnoczi wrote: > > > On Thu, Sep 30, 2021 at 11:30:32AM -0400, Vivek Goyal wrote: > > >

Re: [PATCH 10/13] virtiofsd: Custom threadpool for remote blocking posix locks requests

2021-10-05 Thread Vivek Goyal
On Mon, Oct 04, 2021 at 03:54:31PM +0100, Stefan Hajnoczi wrote: > On Thu, Sep 30, 2021 at 11:30:34AM -0400, Vivek Goyal wrote: > > Add a new custom threadpool using posix threads that specifically > > service locking requests. > > > > In the case of a fcntl(SETLK

Re: [PATCH 12/13] virtiofsd: Implement blocking posix locks

2021-10-05 Thread Vivek Goyal
On Mon, Oct 04, 2021 at 04:07:04PM +0100, Stefan Hajnoczi wrote: > On Thu, Sep 30, 2021 at 11:30:36AM -0400, Vivek Goyal wrote: > > As of now we don't support fcntl(F_SETLKW) and if we see one, we return > > -EOPNOTSUPP. > > > > Change that by accepting thes

Re: [PATCH 11/13] virtiofsd: Shutdown notification queue in the end

2021-10-05 Thread Vivek Goyal
On Mon, Oct 04, 2021 at 04:01:02PM +0100, Stefan Hajnoczi wrote: > On Thu, Sep 30, 2021 at 11:30:35AM -0400, Vivek Goyal wrote: > > So far we did not have the notion of cross queue traffic. That is, we > > get request on a queue and send back response on same queue. So if a >

Re: [Virtio-fs] [PATCH 13/13] virtiofsd, seccomp: Add clock_nanosleep() to allow list

2021-10-05 Thread Vivek Goyal
On Tue, Oct 05, 2021 at 01:22:58PM +0100, Stefan Hajnoczi wrote: > On Thu, Sep 30, 2021 at 11:30:37AM -0400, Vivek Goyal wrote: > > g_usleep() calls nanosleep() and that now seems to call clock_nanosleep() > > syscall. Now these patches are making use of g_usleep(). So add > >

Re: [PATCH 12/13] virtiofsd: Implement blocking posix locks

2021-10-05 Thread Vivek Goyal
On Tue, Oct 05, 2021 at 01:22:21PM +0100, Stefan Hajnoczi wrote: > On Thu, Sep 30, 2021 at 11:30:36AM -0400, Vivek Goyal wrote: > > As of now we don't support fcntl(F_SETLKW) and if we see one, we return > > -EOPNOTSUPP. > > > > Change that by accepting thes

Re: [Virtio-fs] [PATCH 07/13] virtiofsd: Release file locks using F_UNLCK

2021-10-05 Thread Vivek Goyal
On Tue, Oct 05, 2021 at 03:37:17PM +0200, Christophe de Dinechin wrote: > > On 2021-09-30 at 11:30 -04, Vivek Goyal wrote... > > We are emulating posix locks for guest using open file description locks > > in virtiofsd. When any of the fd is closed in guest, we find associat

Re: [Virtio-fs] [PATCH 13/13] virtiofsd, seccomp: Add clock_nanosleep() to allow list

2021-10-05 Thread Vivek Goyal
On Tue, Oct 05, 2021 at 04:50:43PM +0100, Stefan Hajnoczi wrote: > On Tue, Oct 05, 2021 at 11:16:18AM -0400, Vivek Goyal wrote: > > On Tue, Oct 05, 2021 at 01:22:58PM +0100, Stefan Hajnoczi wrote: > > > On Thu, Sep 30, 2021 at 11:30:37AM -0400, Vivek Goyal wrote: > > > &

Re: [PATCH 10/13] virtiofsd: Custom threadpool for remote blocking posix locks requests

2021-10-05 Thread Vivek Goyal
On Mon, Oct 04, 2021 at 03:54:31PM +0100, Stefan Hajnoczi wrote: > On Thu, Sep 30, 2021 at 11:30:34AM -0400, Vivek Goyal wrote: > > Add a new custom threadpool using posix threads that specifically > > service locking requests. > > > > In the case of a fcntl(SETLK

Re: [Virtio-fs] [PATCH 06/13] vhost-user-fs: Use helpers to create/cleanup virtqueue

2021-10-06 Thread Vivek Goyal
On Wed, Oct 06, 2021 at 03:35:30PM +0200, Christophe de Dinechin wrote: > > On 2021-09-30 at 11:30 -04, Vivek Goyal wrote... > > Add helpers to create/cleanup virtuqueues and use those helpers. I will > > Typo, virtuqueues -> virtqueues > > Also, while I'm nitpi

Re: [Virtio-fs] [PATCH 11/13] virtiofsd: Shutdown notification queue in the end

2021-10-06 Thread Vivek Goyal
On Wed, Oct 06, 2021 at 05:15:57PM +0200, Christophe de Dinechin wrote: > > On 2021-09-30 at 11:30 -04, Vivek Goyal wrote... > > So far we did not have the notion of cross queue traffic. That is, we > > get request on a queue and send back response on same queue. So if a &g

Re: [Virtio-fs] [PATCH 12/13] virtiofsd: Implement blocking posix locks

2021-10-06 Thread Vivek Goyal
On Wed, Oct 06, 2021 at 05:34:59PM +0200, Christophe de Dinechin wrote: > > On 2021-09-30 at 11:30 -04, Vivek Goyal wrote... > > As of now we don't support fcntl(F_SETLKW) and if we see one, we return > > -EOPNOTSUPP. > > > > Change that by accepting t

[PATCH v5 1/9] virtiofsd: Fix breakage due to fuse_init_in size change

2022-02-02 Thread Vivek Goyal
ed which will parse rest of the bytes and enable new functionality. Right now we don't support any of the new functionality, so we don't lose anything by not parsing bytes beyond 16. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Vivek Goyal --- tools/virtiofsd/fuse_lowlevel.c | 3

[PATCH v5 8/9] virtiofsd: Create new file using O_TMPFILE and set security context

2022-02-02 Thread Vivek Goyal
FILE, we fallback to non-atomic behavior. Signed-off-by: Vivek Goyal --- tools/virtiofsd/passthrough_ll.c | 80 1 file changed, 72 insertions(+), 8 deletions(-) diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c index acb99aa2fc..43c

[PATCH v5 9/9] virtiofsd: Add an option to enable/disable security label

2022-02-02 Thread Vivek Goyal
a SELinux label. File server will set this label on the file. It will try to set it atomically wherever possible. But its not possible in all the cases. Signed-off-by: Vivek Goyal --- docs/tools/virtiofsd.rst | 7 +++ tools/virtiofsd/helper.c | 1 + tools/virtiofsd/passthrough

[PATCH v5 6/9] virtiofsd: Move core file creation code in separate function

2022-02-02 Thread Vivek Goyal
Move core file creation bits in a separate function. Soon this is going to get more complex as file creation need to set security context also. And there will be multiple modes of file creation in next patch. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Vivek Goyal --- tools/virtiofsd

[PATCH v5 3/9] virtiofsd: Parse extended "struct fuse_init_in"

2022-02-02 Thread Vivek Goyal
Add some code to parse extended "struct fuse_init_in". And use a local variable "flag" to represent 64 bit flags. This will make it easier to add more features without having to worry about two 32bit flags (->flags and ->flags2) in "fuse_struct_in". Si

[PATCH v5 7/9] virtiofsd: Create new file with fscreate set

2022-02-02 Thread Vivek Goyal
guest policies are in sync and don't conflict. Signed-off-by: Vivek Goyal --- tools/virtiofsd/passthrough_ll.c | 317 --- 1 file changed, 290 insertions(+), 27 deletions(-) diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c

[PATCH v5 2/9] linux-headers: Update headers to v5.17-rc1

2022-02-02 Thread Vivek Goyal
Update headers to 5.17-rc1. I need latest fuse changes. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Vivek Goyal --- include/standard-headers/asm-x86/kvm_para.h | 1 + include/standard-headers/drm/drm_fourcc.h | 11 ++ include/standard-headers/linux/ethtool.h | 1

[PATCH v5 0/9] virtiofsd: Add support for file security context at file creation

2022-02-02 Thread Vivek Goyal
code remains git bisectable. (David Gilbert) - Changed %lx to %llx at one place. (David Gilbert). Thanks Vivek Vivek Goyal (9): virtiofsd: Fix breakage due to fuse_init_in size change linux-headers: Update headers to v5.17-rc1 virtiofsd: Parse extended "struct fuse_init_in"

[PATCH v5 4/9] virtiofsd: Extend size of fuse_conn_info->capable and ->want fields

2022-02-02 Thread Vivek Goyal
re not suffcient anymore. Increase size to 64 bit so that we can add newer capabilities and still be able to use existing code to check and set the capabilities. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Vivek Goyal --- tools/virtiofsd/fuse_common.h | 4 ++-- tools/virtiofsd/fuse_lowl

[PATCH v5 5/9] virtiofsd, fuse_lowlevel.c: Add capability to parse security context

2022-02-02 Thread Vivek Goyal
Add capability to enable and parse security context as sent by client and put into fuse_req. Filesystems now can get security context from request and set it on files during creation. Signed-off-by: Vivek Goyal --- tools/virtiofsd/fuse_common.h | 5 ++ tools/virtiofsd/fuse_i.h| 7

Re: [PATCH v5 3/9] virtiofsd: Parse extended "struct fuse_init_in"

2022-02-07 Thread Vivek Goyal
On Thu, Feb 03, 2022 at 06:56:58PM +, Dr. David Alan Gilbert wrote: > * Vivek Goyal (vgo...@redhat.com) wrote: > > Add some code to parse extended "struct fuse_init_in". And use a local > > variable "flag" to represent 64 bit flags. This will make it easi

Re: [PATCH v5 0/9] virtiofsd: Add support for file security context at file creation

2022-02-07 Thread Vivek Goyal
On Mon, Feb 07, 2022 at 01:05:16PM +, Daniel P. Berrangé wrote: > On Wed, Feb 02, 2022 at 02:39:26PM -0500, Vivek Goyal wrote: > > Hi, > > > > This is V5 of the patches. I posted V4 here. > > > > https://listman.redhat.com/archives/virtio-fs/2022-January/

Re: [PATCH v5 5/9] virtiofsd, fuse_lowlevel.c: Add capability to parse security context

2022-02-07 Thread Vivek Goyal
On Thu, Feb 03, 2022 at 07:41:27PM +, Dr. David Alan Gilbert wrote: > * Vivek Goyal (vgo...@redhat.com) wrote: > > Add capability to enable and parse security context as sent by client > > and put into fuse_req. Filesystems now can get security context from > > reques

Re: [PATCH v5 7/9] virtiofsd: Create new file with fscreate set

2022-02-07 Thread Vivek Goyal
On Mon, Feb 07, 2022 at 11:38:12AM +, Dr. David Alan Gilbert wrote: > * Vivek Goyal (vgo...@redhat.com) wrote: > > This patch adds support to set /proc/thread-self/attr/fscreate before > > file creation. It is set to a value as sent by client. This will allow > > f

Re: [PATCH v5 9/9] virtiofsd: Add an option to enable/disable security label

2022-02-07 Thread Vivek Goyal
On Mon, Feb 07, 2022 at 12:40:21PM +, Dr. David Alan Gilbert wrote: > * Vivek Goyal (vgo...@redhat.com) wrote: > > Provide an option "-o security_label/no_security_label" to enable/disable > > security label functionality. By default these are turned off. > &g

Re: [PATCH v5 0/9] virtiofsd: Add support for file security context at file creation

2022-02-07 Thread Vivek Goyal
On Mon, Feb 07, 2022 at 12:49:24PM +, Dr. David Alan Gilbert wrote: > * Vivek Goyal (vgo...@redhat.com) wrote: > > Hi, > > > > This is V5 of the patches. I posted V4 here. > > > > https://listman.redhat.com/archives/virtio-fs/2022-January/msg00041.html > &

Re: [PATCH v5 0/9] virtiofsd: Add support for file security context at file creation

2022-02-07 Thread Vivek Goyal
On Mon, Feb 07, 2022 at 01:30:16PM +, Daniel P. Berrangé wrote: > On Mon, Feb 07, 2022 at 08:24:08AM -0500, Vivek Goyal wrote: > > On Mon, Feb 07, 2022 at 01:05:16PM +, Daniel P. Berrangé wrote: > > > On Wed, Feb 02, 2022 at 02:39:26PM -0500, Vivek Goyal

Re: [PATCH v4 09/11] 9p: darwin: Implement compatibility for mknodat

2022-02-07 Thread Vivek Goyal
On Mon, Feb 07, 2022 at 11:49:12AM +0100, Greg Kurz wrote: > On Mon, 7 Feb 2022 11:30:18 +0100 > Philippe Mathieu-Daudé wrote: > > > On 7/2/22 09:47, Greg Kurz wrote: > > > On Sun, 6 Feb 2022 20:10:23 -0500 > > > Will Cohen wrote: > > > > > >> This patch set currently places it in 9p-util only

Re: [PATCH v5 0/9] virtiofsd: Add support for file security context at file creation

2022-02-07 Thread Vivek Goyal
On Mon, Feb 07, 2022 at 01:05:16PM +, Daniel P. Berrangé wrote: > On Wed, Feb 02, 2022 at 02:39:26PM -0500, Vivek Goyal wrote: > > Hi, > > > > This is V5 of the patches. I posted V4 here. > > > > https://listman.redhat.com/archives/virtio-fs/2022-January/

[PATCH v6 05/10] virtiofsd, fuse_lowlevel.c: Add capability to parse security context

2022-02-08 Thread Vivek Goyal
Add capability to enable and parse security context as sent by client and put into fuse_req. Filesystems now can get security context from request and set it on files during creation. Signed-off-by: Vivek Goyal --- tools/virtiofsd/fuse_common.h | 5 ++ tools/virtiofsd/fuse_i.h| 7

[PATCH v6 08/10] virtiofsd: Create new file with security context

2022-02-08 Thread Vivek Goyal
olicies. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Vivek Goyal --- tools/virtiofsd/passthrough_ll.c | 229 +++ 1 file changed, 200 insertions(+), 29 deletions(-) diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c index 7762bf0d2c

[PATCH v6 01/10] virtiofsd: Fix breakage due to fuse_init_in size change

2022-02-08 Thread Vivek Goyal
ed which will parse rest of the bytes and enable new functionality. Right now we don't support any of the new functionality, so we don't lose anything by not parsing bytes beyond 16. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Vivek Goyal --- tools/virtiofsd/fuse_lowlevel.c | 3

[PATCH v6 03/10] virtiofsd: Parse extended "struct fuse_init_in"

2022-02-08 Thread Vivek Goyal
Add some code to parse extended "struct fuse_init_in". And use a local variable "flag" to represent 64 bit flags. This will make it easier to add more features without having to worry about two 32bit flags (->flags and ->flags2) in "fuse_struct_in". Si

[PATCH v6 07/10] virtiofsd: Add helpers to work with /proc/self/task/tid/attr/fscreate

2022-02-08 Thread Vivek Goyal
works basically for SELinux and its per thread. This patch just introduces the helper functions. Subsequent patches will make use of these helpers. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Vivek Goyal --- tools/virtiofsd/passthrough_ll.c | 92 1 file

[PATCH v6 04/10] virtiofsd: Extend size of fuse_conn_info->capable and ->want fields

2022-02-08 Thread Vivek Goyal
re not suffcient anymore. Increase size to 64 bit so that we can add newer capabilities and still be able to use existing code to check and set the capabilities. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Vivek Goyal --- tools/virtiofsd/fuse_common.h | 4 ++-- tools/virtiofsd/fuse_lowl

[PATCH v6 10/10] virtiofsd: Add an option to enable/disable security label

2022-02-08 Thread Vivek Goyal
a SELinux label. File server will set this label on the file. It will try to set it atomically wherever possible. But its not possible in all the cases. Signed-off-by: Vivek Goyal --- docs/tools/virtiofsd.rst | 32 tools/virtiofsd/helper.c |

[PATCH v6 09/10] virtiofsd: Create new file using O_TMPFILE and set security context

2022-02-08 Thread Vivek Goyal
FILE, we fallback to non-atomic behavior. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Vivek Goyal --- tools/virtiofsd/passthrough_ll.c | 80 1 file changed, 72 insertions(+), 8 deletions(-) diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/pa

[PATCH v6 02/10] linux-headers: Update headers to v5.17-rc1

2022-02-08 Thread Vivek Goyal
Update headers to 5.17-rc1. I need latest fuse changes. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Vivek Goyal --- include/standard-headers/asm-x86/kvm_para.h | 1 + include/standard-headers/drm/drm_fourcc.h | 11 ++ include/standard-headers/linux/ethtool.h | 1

[PATCH v6 00/10] virtiofsd: Add support for file security context at file creation

2022-02-08 Thread Vivek Goyal
ert) - Split patch 7 in the series. Some of the handling of setting and clearing fscreate knob has been moved into a separate patch. Found it hard to break it down further. So it helps a bit but not too much. (David Gilbert). Thanks Vivek Vivek Goyal (10): virtiofsd: Fix breakage due to f

  1   2   3   4   5   >