Hi James :) Quoting James Clarke (2015-07-23 19:33:42) > 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.
I believe this is the correct solution. It's nicely written, and well documented. Good work :) I'm merely wondering... > diff --git a/ext2fs/ext2fs.c b/ext2fs/ext2fs.c > index d0fdfe7..03c9eed 100644 > --- a/ext2fs/ext2fs.c > +++ b/ext2fs/ext2fs.c > @@ -207,10 +207,20 @@ main (int argc, char **argv) > error_t > diskfs_reload_global_state () > { ... whether we shouldn't protect this function with a lock. I'm not sure if concurrent remounts are a problem, but they could very well be. Justus > + error_t err; > + > pokel_flush (&global_pokel); > pager_flush (diskfs_disk_pager, 1); > - sblock = NULL; > + > + /* libdiskfs is not responsible for inhibiting paging. */ > + err = inhibit_ext2_pager (); > + if (err) > + return err; > + > get_hypermetadata (); > map_hypermetadata (); > + > + resume_ext2_pager (); > + > return 0; > }