* Nesting problems in the flusher. * Inefficient vfsync due to thousands of file buffers, one per-vnode. (need to aggregate using a device buffer?) * Adjust the flusher to unlock the parent after the child is locked, then restart if the parent changed out from under us. This will greatly reduce namecache contention. * Use bp->b_dep to interlock the buffer with the chain structure so the strategy code can calculate the crc and assert that the chain is marked modified (not yet flushed). * Deleted inode not reachable via tree for volume flush but still reachable via fsync/inactive/reclaim. Its tree can be destroyed at that point. * The direct write code needs to invalidate any underlying physical buffers. Direct write needs to be implemented. * Make sure a resized block (hammer2_chain_resize()) calculates a new hash code in the parent bref * The freemap allocator needs to getblk/clrbuf/bdwrite any partial block allocations (less than 64KB) that allocate out of a new 64K block, to avoid causing a read-before-write I/O. * Check flush race upward recursion setting SUBMODIFIED vs downward recursion checking SUBMODIFIED then locking (must clear before the recursion and might need additional synchronization) * There is definitely a flush race in the hardlink implementation between the forwarding entries and the actual (hidden) hardlink inode. This will require us to associate a small hard-link-adjust structure with the chain whenever we create or delete hardlinks, on top of adjusting the hardlink inode itself. Any actual flush to the media has to synchronize the correct nlinks value based on whether related created or deleted hardlinks were also flushed. * When a directory entry is created and also if an indirect block is created and entries moved into it, the directory seek position can potentially become incorrect during a scan. * When a directory entry is deleted a directory seek position depending on that key can cause readdir to skip entries. * TWO PHASE COMMIT - store two data offsets in the chain, and hammer2_chain_delete() needs to leave the chain intact if MODIFIED2 is set on its buffer until the flusher gets to it? OPTIMIZATIONS * If a file is unlinked buts its descriptors is left open and used, we should allow data blocks on-media to be reused since there is no topology left to point at them.