linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* chattr +C  vs.  btrfs subvolume snapshot
@ 2013-01-08  0:37 Jun Lion
  2013-01-08  3:28 ` Liu Bo
  0 siblings, 1 reply; 3+ messages in thread
From: Jun Lion @ 2013-01-08  0:37 UTC (permalink / raw)
  To: linux-btrfs

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.)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: chattr +C  vs.  btrfs subvolume snapshot
  2013-01-08  0:37 chattr +C vs. btrfs subvolume snapshot Jun Lion
@ 2013-01-08  3:28 ` Liu Bo
  2013-01-09  3:35   ` junlion
  0 siblings, 1 reply; 3+ messages in thread
From: Liu Bo @ 2013-01-08  3:28 UTC (permalink / raw)
  To: Jun Lion; +Cc: linux-btrfs

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: chattr +C  vs.  btrfs subvolume snapshot
  2013-01-08  3:28 ` Liu Bo
@ 2013-01-09  3:35   ` junlion
  0 siblings, 0 replies; 3+ messages in thread
From: junlion @ 2013-01-09  3:35 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Liu Bo

On 2013-01-08 11:28 +0800, Liu Bo wrote:
> And for the fragmentation, do you mean 'filefrag'?

I was for something that would show how the data branches off across
different snapshots, --reflink copies etc.

filefrag looks interesting, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-01-09  3:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-08  0:37 chattr +C vs. btrfs subvolume snapshot Jun Lion
2013-01-08  3:28 ` Liu Bo
2013-01-09  3:35   ` junlion

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).