Re: [PATCH v3 09/10] migration: Be consistent about shutdown of source shared files

2023-08-15 Thread Peter Xu
On Tue, Aug 15, 2023 at 07:19:43PM -0300, Fabiano Rosas wrote: > Peter Xu writes: > > > On Fri, Aug 11, 2023 at 12:08:35PM -0300, Fabiano Rosas wrote: > >> When doing cleanup, we currently close() some of the shared migration > >> files and shutdown() + close() others. Be consistent by always cal

Re: [PATCH v3 09/10] migration: Be consistent about shutdown of source shared files

2023-08-15 Thread Fabiano Rosas
Peter Xu writes: > On Fri, Aug 11, 2023 at 12:08:35PM -0300, Fabiano Rosas wrote: >> When doing cleanup, we currently close() some of the shared migration >> files and shutdown() + close() others. Be consistent by always calling >> shutdown() before close(). >> >> Do this only for the source fil

Re: [PATCH v3 09/10] migration: Be consistent about shutdown of source shared files

2023-08-15 Thread Peter Xu
On Fri, Aug 11, 2023 at 12:08:35PM -0300, Fabiano Rosas wrote: > When doing cleanup, we currently close() some of the shared migration > files and shutdown() + close() others. Be consistent by always calling > shutdown() before close(). > > Do this only for the source files for now because the sou

[PATCH v3 09/10] migration: Be consistent about shutdown of source shared files

2023-08-11 Thread Fabiano Rosas
When doing cleanup, we currently close() some of the shared migration files and shutdown() + close() others. Be consistent by always calling shutdown() before close(). Do this only for the source files for now because the source runs multiple threads which could cause races between the two calls.