News for hackers. Stuff that matters.
Re:New tricks for XFS: support for subvolumes by viraptor on Thursday March 01, 2018 @03:57PM (#16496262)
> When a CoW filesystem writes to a block of data or metadata, it first makes a copy of it

Is this a really a precise description? I was sure that (for data) the actual copy only happens in case of a block with multiple references. If there was a single use of a block I expected it to be modified in place in most real-world filesystems. Summary from wikipedia seems to confirm that.

Am I missing something, or is that just unfortunate wording?

What they describe with the write of the data followed with write of the indexes as new elements seems more like a log filesystem.

Re:New tricks for XFS: support for subvolumes by wmf on Thursday March 01, 2018 @06:25PM (#16497366)
No, the copy is generally done every time. In-place writes cause all kinds of problems with atomicity, ordering, torn writes, etc. Also, for ZFS/btrfs/bcachefs style filesystems the pointer contains a checksum of the block and thus it needs to be updated on every write.
Re:New tricks for XFS: support for subvolumes by barrkel on Thursday March 01, 2018 @04:16PM (#16496429)
Always copying is what ZFS does as far as I know - so that the final write on raidz can be a pointer swap at the top of the tree.
Re:New tricks for XFS: support for subvolumes by aidenn0 on Thursday March 01, 2018 @11:46PM (#16499109)
CoW stands for "Copy on Write" a system that updates blocks in-place is not is not CoW.
Re:New tricks for XFS: support for subvolumes by viraptor on Friday March 02, 2018 @04:57AM (#16500288)
There's lots of things which are called copy on write, where CoW means really copy-on-deduplication-otherwise-update-in-place. Like qcow2 filesystem. Or Cow type in Rust.
Re:New tricks for XFS: support for subvolumes by ghusbands on Thursday March 01, 2018 @05:35PM (#16497035)
It's an implementation detail that can and does go either way in many real world systems, depending on the technologies involved.