Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Josef Bacik <josef@redhat.com>
To: Sage Weil <sage@newdream.net>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: committing new snapshots
Date: Tue, 8 Dec 2009 11:05:07 -0500	[thread overview]
Message-ID: <20091208160507.GA3374@localhost.localdomain> (raw)
In-Reply-To: <Pine.LNX.4.64.0912071411560.31714@cobra.newdream.net>

On Mon, Dec 07, 2009 at 02:25:50PM -0800, Sage Weil wrote:
> When you create a new snap or subvol, first a new ROOT_ITEM is created 
> while everything commits, and then the referring directory entry is set up 
> (with a correspond ROOT_BACKREF).  
> 
> First, if you say 'btrfsctl -s foo .' and then 'reboot -f -n' before the 
> next regularly scheduled commit, the snap is created, but lost.. there's 
> no reference.  Second, the unreferenced ROOT_ITEM is never cleaned up.
> 
> Are there any existing plans for this?  It would be nice if the reference 
> could be committed as well the first time around.  That probably requires 
> a bit of futzing to determine what the root objectid is going to be 
> beforehand, then adding the link in the namespace, then flushing things 
> out and updating the root item in the right order?
> 

We could probably use the orphan code for this.  Just create an orphan item for
the snapshot and then delete it when the snapshot is fully created that way if
somebody does reboot -fn we cleanup the root item and such.  Thanks,

Josef

  reply	other threads:[~2009-12-08 16:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-07 22:25 committing new snapshots Sage Weil
2009-12-08 16:05 ` Josef Bacik [this message]
2009-12-08 16:14   ` Andrey Kuzmin
2009-12-08 17:03   ` Sage Weil

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=20091208160507.GA3374@localhost.localdomain \
    --to=josef@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox