All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Mason <chris.mason@oracle.com>
To: Sage Weil <sage@newdream.net>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: snapshot creation
Date: Tue, 12 Jan 2010 15:25:50 -0500	[thread overview]
Message-ID: <20100112202550.GF14979@think> (raw)
In-Reply-To: <Pine.LNX.4.64.1001121116250.2394@cobra.newdream.net>

On Tue, Jan 12, 2010 at 11:24:39AM -0800, Sage Weil wrote:
> Hi Chris,
> 
> What is the motivation behind the two phases of snapshot creation 
> (create_pending_snapshot, finish_pending_snapshot)?  Is it just to avoid 
> putting a reference to the snap subvol inside the snapped version of the 
> subvol (forming a loop)?
> 
> If that's the case, I think the problem can be solved in other ways (by 
> not following the subvol link if it loops to self, or by also delaying the 
> root creation to avoid leaking an unreferenced root).  And the rest of the 
> time (when the link is outside the linked-to subvol) committing the root 
> and it's reference in one commit.
> 
> Unless I'm missing something else?

Part of the problem is that we want to make sure we have a consistent
view of a given root.  So if we tell snapshot abc to point to a specific
root block, the reference that gets taken and all the cow rules get
complex in a hurry.

I'm guessing that you want to do snapshot creation without forcing a
commit?

-chris


  reply	other threads:[~2010-01-12 20:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-12 19:24 snapshot creation Sage Weil
2010-01-12 20:25 ` Chris Mason [this message]
2010-01-12 20:47   ` Sage Weil
2010-01-13 14:44     ` Chris Mason

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100112202550.GF14979@think \
    --to=chris.mason@oracle.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=sage@newdream.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.