Re: [PATCH] Fix race condition in ext2fs when remounting

2015-07-22 Thread James Clarke
Perhaps; I was following what diskfs_remount does when inhibiting RPCs, which stay inhibited on error. James > On 23 Jul 2015, at 00:51, Diego Nieto Cid wrote: > > Hi > > This is me being picky about a corner case :-) > > 2015-07-22 19:42 GMT-03:00 James Clarke : >> +error_t >> +inhibit_ext2

Re: [PATCH] Fix race condition in ext2fs when remounting

2015-07-22 Thread Diego Nieto Cid
Hi This is me being picky about a corner case :-) 2015-07-22 19:42 GMT-03:00 James Clarke : > +error_t > +inhibit_ext2_pager (void) > +{ > + error_t err; > + > + /* The file pager can rely on the disk pager, so inhibit the file > + pager first. */ > + > + err = pager_inhibit_workers (file

[PATCH v2] Fix race condition in ext2fs when remounting

2015-07-22 Thread James Clarke
On some systems, ext2fs.static would regularly hang at startup, as a race condition meant it would process paging requests while remounting. To fix this, libpager has been altered to allow inhibiting and resuming its worker threads, and ext2fs uses this to inhibit paging while remounting. * consol

[PATCH] Fix race condition in ext2fs when remounting

2015-07-22 Thread James Clarke
On some systems, ext2fs.static would regularly hang at startup, as a race condition meant it would process paging requests while reounting. To fix this, libpager has been altered to allow inhibiting and resuming its worker threads. * console/pager.c (pager_requests): New variable. (user_pager_init

Re: [PATCH] WIP: Fix ext2fs remount race condition

2015-07-22 Thread Justus Winter
Hi James :) a few nitpicks upfront: Quoting James Clarke (2015-07-22 02:46:48) > --- a/ext2fs/ext2fs.c > +++ b/ext2fs/ext2fs.c > @@ -207,10 +207,28 @@ main (int argc, char **argv) > error_t > diskfs_reload_global_state () > { > + error_t err; > + >pokel_flush (&global_pokel); >pager_f