ZFS defragmentation is a very difficult topic, mainly because it&#x27;s very hard to do transactionally.<p>A lot of what makes ZFS good is it&#x27;s CoW implementation, that implementation is simplified by the concept that a block will never change. However the main underlying feature that would allow defragmentation is referred to as &quot;block pointer rewrite. Effectively it would allow you to copy a block and apply any other transformation to it and then transactionally update all pointers to that block. This is very hard when you factor in all the things that could possibly point to a block including many snapshots&#x2F;clones etc.<p>So the long and the short of it is the situation isn&#x27;t great.
Will we ever see BPR? Maybe.
Is it still a really good filesystem even with this limitation? Definitely.