lkml.org 
[lkml]   [2003]   [Nov]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: kernel.bkbits.net off the air
Date
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/

\
 
 \ /
  Last update: 2005-03-22 13:58    [W:0.077 / U:0.708 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site