Posted Jun 24, 2010 12:37 UTC (Thu) by masoncl (subscriber, #47138)
Parent article: Btrfs: broken by design?
Just a quick update, the fix was posted this week but I did hit a race under load so I have a better fix in a long QA run here.
Edward's 17% number didn't factor in the part where btrfs duplicates all btree blocks by default, so the actual fragmentation caused by the btree is much lower.
All filesystems suffer from the problem of partially data used blocks. The btrfs btree does allow partially used btree leaves, but the higher level nodes are much more traditional (fixed record length) blocks. So the worst case in btrfs is to have the directory items in one block, the inode in another block and the inline file data extent in a third block.
This means our worst case is similar to the standard case for ext*. Ext will always get more than one inode in a block, but it'll also always have separate blocks for inodes, directories and file data.
I do appreciate Edward's comments, he has been working on filesystems for a long time and contributed the btrfs grubv1 support.