Re: [LEDE-DEV] [PATCH fstools] overlay: fix race condition when switching to jffs2

2018-01-07 Thread Roman Yeryomin
On 2018-01-03 22:54, Hauke Mehrtens wrote: On 12/15/2017 03:10 PM, Roman Yeryomin wrote: There is a race between `cp -a /tmp/root/* /rom/overlay` from libfstools/overlay.c and a process creating new file(s) before pivot(/rom, /mnt) occured. That is a process can create a file and it will not be

Re: [LEDE-DEV] [PATCH fstools] overlay: fix race condition when switching to jffs2

2018-01-03 Thread Hauke Mehrtens
On 12/15/2017 03:10 PM, Roman Yeryomin wrote: > There is a race between `cp -a /tmp/root/* /rom/overlay` from > libfstools/overlay.c and a process creating new file(s) before > pivot(/rom, /mnt) occured. > That is a process can create a file and it will not be copied. > > To workaround this, do ad

[LEDE-DEV] [PATCH fstools] overlay: fix race condition when switching to jffs2

2017-12-15 Thread Roman Yeryomin
There is a race between `cp -a /tmp/root/* /rom/overlay` from libfstools/overlay.c and a process creating new file(s) before pivot(/rom, /mnt) occured. That is a process can create a file and it will not be copied. To workaround this, do additional copy after jffs2 is ready. This doesn't completel