Messages in this thread | | | From | Andrew Walrond <> | Subject | Re: kernel.bkbits.net off the air | Date | Tue, 11 Nov 2003 14:38:47 +0000 |
| |
On Tuesday 11 Nov 2003 2:14 pm, walt wrote: > Sorry to be so dumb, but it seems to me that the two methods are exactly > equivalent in every way: > > A test for file1 != file2 is exactly eqivalent to testing LOCK != NULL. > It's a simple binary TRUE/FALSE test. > > What am I missing? (BTW I'm not arguing against the two-file method. > I just don't understand why it's different.) >
So you check the lock, do rsync, and check the lock again. But the lock could have flipped several times during the rsync and you wouldn't know about it.
My preferred solution is a single sequence file as described by Adreas:
Assuming sequence starts at 0,
To modify the repository, +1 to sequence file contents, modify repo, +1 to sequence
To get a coherent copy, do seq1 = read(sequence file) rsync repo seq2 = read(sequence file) until seq1==seq2 and !(seq1&1)
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |