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