On 2017年12月06日 20:39, Austin S. Hemmelgarn wrote: > Somewhat OT, but the only operation that's remotely 'instant' is > creating an empty subvolume.  Snapshot creation has to walk the tree in > the subvolume being snapshotted, which can take a long time (and as a > result of it's implementation, also means BTRFS snapshots are _not_ > atomic). Nope, this is not true. Btrfs from the very beginning is designed to speed up snapshot. The most obvious evidence is its extent tree design. When doing snapshot, btrfs only needs to increase reference of 2nd highest level tree blocks of original snapshot, other than "walking the tree". (If tree root level is 2, then level 2 node is copied, while all reference of level 1 tree blocks get increased) This design hugely speeds up snapshot creation, making snapshot obviously faster than any block level snapshot. Although this design obviously slows down backref walk. As btrfs must do a full walk until tree root, to see if any tree blocks between leaf and root is shared with another snapshot. And for btrfs snapshot atomic thing, it's just because btrfs delayed snapshot creation to transaction commit time, and buffered write is not triggered for snapshot creation, so it makes snapshot not so atomic. Thanks, Qu >  Subvolume deletion has to do a bunch of cleanup work in the > background (though it may be fairly quick if it was a snapshot and the > source subvolume hasn't changed much).