gnu-arch-users
[Top][All Lists]
Advanced

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

[Gnu-arch-users] [Question] how to preserve multiple file's atomicity ?


From: Tez Kamihira
Subject: [Gnu-arch-users] [Question] how to preserve multiple file's atomicity ?
Date: Mon, 22 Nov 2004 14:45:39 +0900 (JST)

Folks,

I have a question.

Suppose there is a directory named d, which has two regular files
named X and Y, just like:

  $ find . -print
  .
  ./d
  ./d/X
  ./d/Y
  $

The contents of X is x, and Y's is y. So I call them as X(x) and Y(y),
respectively.

Now I'd like to change the contents of each file to x' and y'
atomicly preserving each file names, that is, at any time only:

   There are two files X(x) and Y(y)

 or

   There are two files X(x') and Y(y')

are allowed, and any other states, e.g. X(x) and Y(y'), aren't
allowed, even if any kind of abormal termination occurs, just like
Ctrl-C.

In ViewARCH's transaction, I meet this situation and I convince that I
resolved this problem in my own way with some strictly defined
intermidiate state. But the implement is very complex and not so easy
to understand.

What is the best way to solve this problem ? Are there any
orthodoxical way to do it ?


      - Tez





reply via email to

[Prev in Thread] Current Thread [Next in Thread]