From: Liu Bo <bo.li.liu@oracle.com>
To: Itaru Kitayama <kitayama@cl.bb4u.ne.jp>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 1/2 v4] Btrfs: snapshot-aware defrag
Date: Mon, 26 Nov 2012 18:30:13 +0800 [thread overview]
Message-ID: <20121126103012.GA18538@liubo.jp.oracle.com> (raw)
In-Reply-To: <CANW9uyt9qE9384WnQq5ggZ2hb-DbahZe8KY5-WXRFSKTiedekg@mail.gmail.com>
On Sun, Nov 25, 2012 at 12:48:33PM +0900, Itaru Kitayama wrote:
> Hi Liubo:
>
> At the relinking stage, in some situations, looking up the extent tree with
> the extent logical start objectid key from one of the old extents fails,
> but the found previous item's objectid + offset is exactly the original
> search objectid. As you say, usually old extents are retrieved from the
> extent tree without a problem, but if the Delayed or some other mechanisms
> change extents layout in the finish ordered IO function, we need to take
> care of those rejected extents, not simply returning ENOENT. What do you
> think?
Hi Itaru san,
Thanks for the suggestion.
It's all right to ignore ENOENT.
An extent stands for a range of space, which owns an item in extent tree.
If old extents' item is not found in the extent tree, i.e. rejected extents,
it means that this range of space is not shared by any snapshots(the extent refs is now 0),
and so it's safe.
So the worst case is that due to COW, a file and its snapshots share nothing
after some time, the defrag on the file won't change its snapshots, but this
can be solved when we always with autodefrag and snapshot-aware defrag.
thanks,
liubo
next prev parent reply other threads:[~2012-11-26 10:31 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-27 10:28 [PATCH 1/2 v4] Btrfs: snapshot-aware defrag Liu Bo
2012-10-27 10:28 ` [PATCH 2/2] Btrfs: make snapshot-aware defrag as a mount option Liu Bo
2012-10-30 23:31 ` David Sterba
2012-10-31 0:34 ` Liu Bo
2012-10-31 0:44 ` David Sterba
2012-10-31 13:31 ` Liu Bo
2012-11-01 14:43 ` Chris Mason
2012-11-01 15:49 ` Liu Bo
2012-10-29 20:06 ` [PATCH 1/2 v4] Btrfs: snapshot-aware defrag Mitch Harder
2012-10-30 1:20 ` Liu Bo
2012-10-30 20:59 ` Mitch Harder
2012-10-31 12:13 ` Itaru Kitayama
2012-10-31 12:55 ` Liu Bo
2012-11-01 11:08 ` Itaru Kitayama
2012-11-01 11:21 ` Liu Bo
2012-11-01 14:05 ` Itaru Kitayama
2012-11-01 16:01 ` Liu Bo
[not found] ` <CANW9uyt9qE9384WnQq5ggZ2hb-DbahZe8KY5-WXRFSKTiedekg@mail.gmail.com>
2012-11-26 10:30 ` Liu Bo [this message]
2012-12-12 19:37 ` Mitch Harder
2012-12-13 1:28 ` Liu Bo
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=20121126103012.GA18538@liubo.jp.oracle.com \
--to=bo.li.liu@oracle.com \
--cc=kitayama@cl.bb4u.ne.jp \
--cc=linux-btrfs@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).