lkml.org 
[lkml]   [2004]   [Mar]   [29]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateMon, 29 Mar 2004 13:36:58 +0100
FromJamie Lokier <>
SubjectRe: [PATCH] cowlinks v2
Eric W. Biederman wrote:
> The file will become a cow file only after it is modified or it's
> containing directory is modified.

Eh?  The file (or directory) must be labelled as a cowlinked file the
moment you make the cowlink, not when the data is modified.  It's
_breaking_ the cowlink that happens when the data (or directory
contents) are modified.

> Thus you can have data in the
> file that was written after the snapshot operation finished, but
> before the individual file itself is marked cow.

The creation of a cowlink should be atomic w.r.t. writing.

Specifically, the operation which moves the contents of a non-cowlink
inode to a newly created shared inode, and converts the original
non-cowlink inode to a cowlink inode, should be atomic.

Is there an unavoidable race condition?  I don't see one.

-- Jamie
-
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:02    [from the cache]
©2003-2008