Hi. Recently, it came to my knowledge that btrfs relies on disks honoring fsync. So, when a transaction is issued, all of the tree structure is updated (not in-place, bottom-up) and, lastly, the superblock is updated to point to the new tree generation. If reordering happens (or buggy firmware just drops its cache contents without updating the corresponding sectors) then a power-loss could render the filesystem unmountable. Upon more reading, ZFS seems to implement a circular buffer in which new pointers are updated one after another. That means that, if older generations (in btrfs terminology) of the tree are kept on disk you could survive such situations by just using another (older) pointer. I seem to recall having read somewhere that the btrfs superblock maintains four pointers to such older tree generations. My question is: is the statement in this last paragraph true? If not: could it be implemented in btrfs to not depend on correct fsync behaviour? I assume it would require an on-disk format change. Lastly: are there any downsides in this approach? I have skimmed the mailing list but couldn't find concise answers. Bear in mind that I'm just an user so I would really appreciate a very brief explanation attached to any technical aspect in the response. If any of these questions have no merit (or this isn't the appropriate place to ask) I'm sorry for the noise and, please, ignore this mail. Thanks.
