From: Liu Bo <bo.li.liu@oracle.com>
To: Jun Lion <junlion@tormail.org>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: chattr +C vs. btrfs subvolume snapshot
Date: Tue, 8 Jan 2013 11:28:09 +0800 [thread overview]
Message-ID: <20130108032808.GB1916@liubo> (raw)
In-Reply-To: <1TsN9p-000FDf-SX@internal.tormail.org>
On Tue, Jan 08, 2013 at 12:37:11AM +0000, Jun Lion wrote:
> What happens if you set an individual file inside a subvolume as nocow
> (chattr +C) and then take a snapshot of that subvolume and modify the
> file in both?
>
> Will btrfs now ignore the nocow attribute completely or will it do "as
> few copies as possible"? (I'd love to know if it's possible to visualize
> the fragmentation of a single file.)
Well, btrfs nearly puts everything with a kind of "timestamp",
generation, which stands for transaction id.
For your case, the NOCOW file is created just before taking the
snapshot, so btrfs thinks of it being shared, and for shared parts, we
must COW it to keep everything right when trying to modify them.
And for the fragmentation, do you mean 'filefrag'?
thanks,
liubo
next prev parent reply other threads:[~2013-01-08 3:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-08 0:37 chattr +C vs. btrfs subvolume snapshot Jun Lion
2013-01-08 3:28 ` Liu Bo [this message]
2013-01-09 3:35 ` junlion
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=20130108032808.GB1916@liubo \
--to=bo.li.liu@oracle.com \
--cc=junlion@tormail.org \
--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).