2 ms·
ZFS defragmentation is a very difficult topic, mainly because it's very hard to do transactionally. A lot of what makes ZFS good is it's CoW implementation, th
by jpgvm 11y ago
ZFS defragmentation is a very difficult topic, mainly because it's very hard to do transactionally.
A lot of what makes ZFS good is it'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 "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/clones etc.
So the long and the short of it is the situation isn't great.
Will we ever see BPR? Maybe.
Is it still a really good filesystem even with this limitation? Definitely.