mirror of
https://github.com/versity/scoutfs.git
synced 2026-01-05 03:44:05 +00:00
Add the transaction machinery that writes out dirty metadata blocks as atomic transactions. The block radix tracks dirty blocks with a dirty radix tag. Blocks are written with bios whose completion marks them clean and propogates errors through the super info. The blocks are left tagged during writeout so that they won't be (someday) mistaken for clean by eviction. Since we're modifying the radix from io completion we change all block lock acquisitions to be interrupt safe. All the operations that modify blocks hold and release the transaction while they're doing their work. sync kicks off work that waits for the transaction to be released so that it can write out all the dirty blocks and then the new supers that reference them. Signed-off-by: Zach Brown <zab@versity.com>