Merge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository...
[dragonfly.git] / sys / vfs / hammer2 / TODO
1 * Nesting problems in the flusher.
2
3 * Inefficient vfsync due to thousands of file buffers, one per-vnode.
4   (need to aggregate using a device buffer?)
5
6 * Adjust the flusher to unlock the parent after the child is locked,
7   then restart if the parent changed out from under us.  This will
8   greatly reduce namecache contention.
9
10 * Use bp->b_dep to interlock the buffer with the chain structure so the
11   strategy code can calculate the crc and assert that the chain is marked
12   modified (not yet flushed).
13
14 * Deleted inode not reachable via tree for volume flush but still reachable
15   via fsync/inactive/reclaim.  Its tree can be destroyed at that point.
16
17 * The direct write code needs to invalidate any underlying physical buffers.
18   Direct write needs to be implemented.
19
20 * Make sure a resized block (hammer2_chain_resize()) calculates a new
21   hash code in the parent bref
22
23 * The freemap allocator needs to getblk/clrbuf/bdwrite any partial
24   block allocations (less than 64KB) that allocate out of a new 64K
25   block, to avoid causing a read-before-write I/O.
26
27 * Check flush race upward recursion setting SUBMODIFIED vs downward
28   recursion checking SUBMODIFIED then locking (must clear before the
29   recursion and might need additional synchronization)
30
31 * There is definitely a flush race in the hardlink implementation between
32   the forwarding entries and the actual (hidden) hardlink inode.
33
34   This will require us to associate a small hard-link-adjust structure
35   with the chain whenever we create or delete hardlinks, on top of
36   adjusting the hardlink inode itself.  Any actual flush to the media
37   has to synchronize the correct nlinks value based on whether related
38   created or deleted hardlinks were also flushed.
39
40 * When a directory entry is created and also if an indirect block is
41   created and entries moved into it, the directory seek position can
42   potentially become incorrect during a scan.
43
44 * When a directory entry is deleted a directory seek position depending
45   on that key can cause readdir to skip entries.
46
47 * TWO PHASE COMMIT - store two data offsets in the chain, and
48   hammer2_chain_delete() needs to leave the chain intact if MODIFIED2 is
49   set on its buffer until the flusher gets to it?
50
51
52                                 OPTIMIZATIONS
53
54 * If a file is unlinked buts its descriptors is left open and used, we
55   should allow data blocks on-media to be reused since there is no
56   topology left to point at them.