Re: [Virtio-fs] [PATCH] virtiofsd: Show submounts

2020-04-29 Thread Vivek Goyal
On Wed, Apr 29, 2020 at 08:34:24AM -0400, Vivek Goyal wrote: > On Wed, Apr 29, 2020 at 11:26:49AM +0200, Miklos Szeredi wrote: > > On Wed, Apr 29, 2020 at 9:59 AM Miklos Szeredi wrote: > > > > > > On Tue, Apr 28, 2020 at 9:15 PM Dr. David Alan Gilbert > > > wrote: > > > > > > > So our current seq

Re: [Virtio-fs] [PATCH] virtiofsd: Show submounts

2020-04-29 Thread Vivek Goyal
On Wed, Apr 29, 2020 at 11:26:49AM +0200, Miklos Szeredi wrote: > On Wed, Apr 29, 2020 at 9:59 AM Miklos Szeredi wrote: > > > > On Tue, Apr 28, 2020 at 9:15 PM Dr. David Alan Gilbert > > wrote: > > > > > So our current sequence is: > > > > > >(new namespace) > > > 1)if (mount(NULL, "/",

Re: [Virtio-fs] [PATCH] virtiofsd: Show submounts

2020-04-29 Thread Max Reitz
On 29.04.20 10:52, Miklos Szeredi wrote: > On Wed, Apr 29, 2020 at 10:31 AM Max Reitz wrote: >> >> On 28.04.20 21:15, Dr. David Alan Gilbert wrote: > >>> So are you saying we need a: >>>if (mount(NULL, "/", NULL, MS_REC | MS_SHARED, NULL) < 0) { >>> >>> and can this go straight after (1

Re: [Virtio-fs] [PATCH] virtiofsd: Show submounts

2020-04-29 Thread Miklos Szeredi
On Wed, Apr 29, 2020 at 9:59 AM Miklos Szeredi wrote: > > On Tue, Apr 28, 2020 at 9:15 PM Dr. David Alan Gilbert > wrote: > > > So our current sequence is: > > > >(new namespace) > > 1)if (mount(NULL, "/", NULL, MS_REC | MS_SLAVE, NULL) < 0) { > > 2) if (mount("proc", "/proc", "proc",

Re: [Virtio-fs] [PATCH] virtiofsd: Show submounts

2020-04-29 Thread Miklos Szeredi
On Wed, Apr 29, 2020 at 10:31 AM Max Reitz wrote: > > On 28.04.20 21:15, Dr. David Alan Gilbert wrote: > > So are you saying we need a: > >if (mount(NULL, "/", NULL, MS_REC | MS_SHARED, NULL) < 0) { > > > > and can this go straight after (1) ? > > Isn’t MS_SHARED and MS_SLAVE mutually e

Re: [Virtio-fs] [PATCH] virtiofsd: Show submounts

2020-04-29 Thread Max Reitz
On 28.04.20 21:15, Dr. David Alan Gilbert wrote: > * Miklos Szeredi (mszer...@redhat.com) wrote: >> On Tue, Apr 28, 2020 at 4:52 PM Stefan Hajnoczi wrote: >>> >>> On Mon, Apr 27, 2020 at 06:59:02PM +0100, Dr. David Alan Gilbert wrote: * Max Reitz (mre...@redhat.com) wrote: > Currently, se

Re: [Virtio-fs] [PATCH] virtiofsd: Show submounts

2020-04-29 Thread Miklos Szeredi
On Tue, Apr 28, 2020 at 9:15 PM Dr. David Alan Gilbert wrote: > So our current sequence is: > >(new namespace) > 1)if (mount(NULL, "/", NULL, MS_REC | MS_SLAVE, NULL) < 0) { > 2) if (mount("proc", "/proc", "proc", > > 3) if (mount(source, source, NULL, MS_BIND | MS_

Re: [Virtio-fs] [PATCH] virtiofsd: Show submounts

2020-04-28 Thread Dr. David Alan Gilbert
* Miklos Szeredi (mszer...@redhat.com) wrote: > On Tue, Apr 28, 2020 at 4:52 PM Stefan Hajnoczi wrote: > > > > On Mon, Apr 27, 2020 at 06:59:02PM +0100, Dr. David Alan Gilbert wrote: > > > * Max Reitz (mre...@redhat.com) wrote: > > > > Currently, setup_mounts() bind-mounts the shared directory wit

Re: [Virtio-fs] [PATCH] virtiofsd: Show submounts

2020-04-28 Thread Miklos Szeredi
On Tue, Apr 28, 2020 at 4:52 PM Stefan Hajnoczi wrote: > > On Mon, Apr 27, 2020 at 06:59:02PM +0100, Dr. David Alan Gilbert wrote: > > * Max Reitz (mre...@redhat.com) wrote: > > > Currently, setup_mounts() bind-mounts the shared directory without > > > MS_REC. This makes all submounts disappear.