[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Safe File Update (atomic)



* Olaf van der Spek <olafvdspek@gmail.com> schrieb:

> A transaction to update multiple files in one atomic go?

Yes. The application first starts an transaction, creates/writes/
removes a bunch of files and then sends a commit. The changes
should become visible atomically and the call returns when the
commit() is completed (and written out to disk). If there're
conflics, the transaction is aborted w/ proper a error code.
So, in case of a package manager, the update will run completely
in one shot (from userland view) or not at all.

I could live with:

a) relatively slow performance (commit taking a second or so)
b) abort as soon as an conflict arises
c) files changed within the transaction are actually new ones
   (sane package managers will have to unlink text files instead
   simply overwriting nevertheless)


cu
-- 
----------------------------------------------------------------------
 Enrico Weigelt, metux IT service -- http://www.metux.de/

 phone:  +49 36207 519931  email: weigelt@metux.de
 mobile: +49 151 27565287  icq:   210169427         skype: nekrad666
----------------------------------------------------------------------
 Embedded-Linux / Portierung / Opensource-QM / Verteilte Systeme
----------------------------------------------------------------------


Reply to: