On Wed, Jul 05, 2006 at 02:40:40PM -0400, Erez Zadok wrote: > In message <[EMAIL PROTECTED]>, Josef Sipek writes: > > On Wed, Jul 05, 2006 at 02:03:34PM -0400, Erez Zadok wrote: > > > Which means that we would have to buffer the whole new file until the file > > gets closed. And _then_ proceed with parsing. AFAIK, the write syscall will > > translate into one ->write op if the size is <= PAGE_SIZE. > > Yes, but as long as we stick to <=PAGE_SIZE, which I hope we'll never go > above, then there's a much smaller chance that pdflush will kick off a > ->write page event on a partial set. > > But, we don't have to buffer anything: we can simply mark that the config > file had been modified, and on ->close of the file, do all the processing. > And we can just ignore ->writepage for the config file (lest we actually > want a persistent _backup_ of the union configuration, for restarting > purposes?) What happens if the branch config is invalid? We should continue as if nothing happened. So that means that we have to do something to temporarily until we can verify everything and proceed with the atomic switch over to the new config. > > > We have seen users of Unionfs who do a lot of branch reconfigurations in > > > rapid succession. So we need to be more careful than what people have > > > done > > > in the past in Linux. > > > > As long as the branch management code is properly locked (to prevent races) > > it shouldn't be a problem. > > No, while proper locking is needed, it's not enough. Don't think about > per-branch correctness. Think about higher-level SEMANTIC correctness from > the sysadmin's perspective. You have to effectively grab a lock before a > series of changes, which you'd release after the series is done; but you > can't do it w/ a real kernel lock b/c of deadlock risks -- you need to find > another way to convey that atomicity.
Alright. In that case we could have a per union special file "lock" (or something similar) which allows you to mark the begining & end of the "transaction." Jeff. -- NT is to UNIX what a doughnut is to a particle accelerator. _______________________________________________ unionfs mailing list [email protected] http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs
