On Sun, Apr 19, 2015 at 07:50:32PM +0200, Martin Steigerwald wrote: > Am Sonntag, 19. April 2015, 15:18:51 schrieb Hugo Mills: > > On Sun, Apr 19, 2015 at 05:10:30PM +0200, Martin Steigerwald wrote: > > > Am Sonntag, 19. April 2015, 22:31:02 schrieb Craig Ringer: > > > > I'm curious as to whether +C has any effect on BTRFS's durability, > > > > too. > > > > > > You will loose the ability to snapshot that directory tree then. > > > > No you won't. > > > > The +C attribute still allows snapshotting and reflink copies. > > However, after the snapshot, writes to either copy will result in that > > copy being CoWed. (Specifically, writes to an extent of a +C file with > > more than one reference to the extent will result in a CoW operation, > > until there is only one reference, and then the writes will not be > > CoWed again). > > > > The practical upshot of this is that every snapshot of, and > > subsequent writes to, a +C file will introduce fragmentation in the > > same way that writes to a non-+C file would. > > > > You also have a disadvantage with +C that you lose the checksumming > > features of the FS, and hence the self-healing properties if you're > > running with btrfs-native RAID. > > Thanks for clarifying this Hugo, so chattr +C will make the directory > cowed again. Not quite sure what you mean there. If you set +C on a file or directory, there's no CoW operations on write to any of the affected files, *except* if there's a snapshot, in which case the file being written to will have *one* CoW operation before reverting to nodatacow again. > And there is not checksumming on the FS at all anymore. Why is the later? > Why canīt BTRFS checkum nocowed objects or at least the cowed ones in the > same FS? Cause of atomicity guarentees? Atomicity, indeed. You need to be able to update the checksum and the new data atomically. This is possible when the data can be CoWed, but if the data is being modified in place, there must be a short period of time when the two parts are out of sync. Just to make it clear, the lack of checksums is *only* for those files which are marked +C. The rest of the FS is unaffected. > If this has been answered before, and I missed it, feel free to point me > to it, I didnīt find anything obvious with my quick search. It's certainly knowledge that's out there (it's been discussed at length on IRC, for example), but I don't know if there's anything written up on the wiki. Hugo. -- Hugo Mills | Jenkins! Chap with the wings there! Five rounds hugo@... carfax.org.uk | rapid! http://carfax.org.uk/ | Brigadier Alistair Lethbridge-Stewart PGP: E2AB1DE4 | Dr Who and the Daemons