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