Re: [RFC iproute2] netns: add mounting state file for each netns

2019-07-02 Thread Stephen Hemminger
On Sun, 30 Jun 2019 21:29:33 +0200 Matteo Croce wrote: > @@ -737,6 +746,14 @@ static int netns_add(int argc, char **argv, bool create) > } > close(fd); > > + fd = open(tmp_path, O_RDONLY|O_CREAT|O_EXCL, 0); > + if (fd < 0) { > + fprintf(stderr, "Cannot create nam

Re: [RFC iproute2] netns: add mounting state file for each netns

2019-07-01 Thread Alexander Aring
Hi Matteo, On Sun, Jun 30, 2019 at 09:29:33PM +0200, Matteo Croce wrote: > When ip creates a netns, there is a small time interval between the > placeholder file creation in NETNS_RUN_DIR and the bind mount from /proc. > > Add a temporary file named .mounting-$netns which gets deleted after the >

Re: [RFC iproute2] netns: add mounting state file for each netns

2019-07-01 Thread Nicolas Dichtel
Le 01/07/2019 à 15:50, Matteo Croce a écrit : > On Mon, Jul 1, 2019 at 2:38 PM Nicolas Dichtel > wrote: >> >> Le 30/06/2019 à 21:29, Matteo Croce a écrit : >>> When ip creates a netns, there is a small time interval between the >>> placeholder file creation in NETNS_RUN_DIR and the bind mount from

Re: [RFC iproute2] netns: add mounting state file for each netns

2019-07-01 Thread Matteo Croce
On Mon, Jul 1, 2019 at 2:38 PM Nicolas Dichtel wrote: > > Le 30/06/2019 à 21:29, Matteo Croce a écrit : > > When ip creates a netns, there is a small time interval between the > > placeholder file creation in NETNS_RUN_DIR and the bind mount from /proc. > > > > Add a temporary file named .mounting

Re: [RFC iproute2] netns: add mounting state file for each netns

2019-07-01 Thread Nicolas Dichtel
Le 30/06/2019 à 21:29, Matteo Croce a écrit : > When ip creates a netns, there is a small time interval between the > placeholder file creation in NETNS_RUN_DIR and the bind mount from /proc. > > Add a temporary file named .mounting-$netns which gets deleted after the > bind mount, so watching for

[RFC iproute2] netns: add mounting state file for each netns

2019-06-30 Thread Matteo Croce
When ip creates a netns, there is a small time interval between the placeholder file creation in NETNS_RUN_DIR and the bind mount from /proc. Add a temporary file named .mounting-$netns which gets deleted after the bind mount, so watching for delete event matching the .mounting-* name will notify