LWN.net Logo

Elektrified X.org released

Elektrified X.org released

Posted Nov 30, 2004 20:18 UTC (Tue) by tzafrir (subscriber, #11501)
In reply to: Elektrified X.org released by elanthis
Parent article: Elektrified X.org released

regarding atomic operations:

you can get nearly-atomic operations by creating a temporary file/directory copy and then mv(1) it to the right place. This does does unlink(2) and rename(2).

Anything more requires a specilized daemon,


(Log in to post comments)

Elektrified X.org released

Posted Nov 30, 2004 22:33 UTC (Tue) by Ross (subscriber, #4065) [Link]

That is atomic. The problem is if you are changing multiple files.

My question is why are you doing that?

But if you insist, you can do atomic operations with multiple files as long
as you don't have to have the same directory name for the old and new
version. Yes, it requires hard links or copying entire directories but
really, if a "solution" requires such ugly things then I'm quite happy to
live without it.

Elektrified X.org released

Posted Dec 1, 2004 8:33 UTC (Wed) by Wol (guest, #4433) [Link]

And why is changing multiple files any different to changing multiple places in one large file? The database I work with stores each "table" in a separate file, and yet it's quite happy with transactions and commits across multiple files.

And (certainly from the nix viewpoint) isn't the file system seen as just one large file? So, from that vantage point, updating multiple files IS just one change to one large file :-)

Cheers,
Wol

Elektrified X.org released

Posted Dec 1, 2004 16:27 UTC (Wed) by tzafrir (subscriber, #11501) [Link]

This is achived by having all accesses to those files going through a database daemon. That daemon should guarantee that locks/transactions etc. are maintained. It also caches currently-used values.

In the filesystem level the kernel does basically the same things.

Copyright © 2012, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds