hammer2 - Stabilization
[dragonfly.git] / sys / vfs / hammer2 / TODO
1
2
3         * The block freeing code.  At the very least a bulk scan is needed
4           to implement freeing blocks.
5
6         * Crash stability.  Right now the allocation table on-media is not
7           properly synchronized with the flush.  This needs to be adjusted
8           such that H2 can do an incremental scan on mount to fixup
9           allocations on mount as part of its crash recovery mechanism.
10
11         * We actually have to start checking and acting upon the CRCs being
12           generated.
13
14         * Remaining known hardlink issues need to be addressed.
15
16         * Core 'copies' mechanism needs to be implemented to support multiple
17           copies on the same media.
18
19         * Core clustering mechanism needs to be implemented to support
20           mirroring and basic multi-master operation from a single host
21           (multi-host requires additional network protocols and won't
22           be as easy).
23
24 * make sure we aren't using a shared lock during RB_SCAN's?
25
26 * overwrite in write_file case w/compression - if device block size changes
27   the block has to be deleted and reallocated.  See hammer2_assign_physical()
28   in vnops.
29
30 * freemap / clustering.  Set block size on 2MB boundary so the cluster code
31   can be used for reading.
32
33 * need API layer for shared buffers (unfortunately).
34
35 * add magic number to inode header, add parent inode number too, to
36   help with brute-force recovery.
37
38 * modifications past our flush point do not adjust vchain.
39   need to make vchain dynamic so we can (see flush_scan2).??
40
41 * MINIOSIZE/RADIX set to 1KB for now to avoid buffer cache deadlocks
42   on multiple locked inodes.  Fix so we can use LBUFSIZE!  Or,
43   alternatively, allow a smaller I/O size based on the sector size
44   (not optimal though).
45
46 * When making a snapshot, do not allow the snapshot to be mounted until
47   the in-memory chain has been freed in order to break the shared core.
48
49 * Snapshotting a sub-directory does not snapshot any
50   parent-directory-spanning hardlinks.
51
52 * Snapshot / flush-synchronization point.  remodified data that crosses
53   the synchronization boundary is not currently reallocated.  see
54   hammer2_chain_modify(), explicit check (requires logical buffer cache
55   buffer handling).
56
57 * on fresh mount with multiple hardlinks present separate lookups will
58   result in separate vnodes pointing to separate inodes pointing to a
59   common chain (the hardlink target).
60
61   When the hardlink target consolidates upward only one vp/ip will be
62   adjusted.  We need code to fixup the other chains (probably put in
63   inode_lock_*()) which will be pointing to an older deleted hardlink
64   target.
65
66 * Filesystem must ensure that modify_tid is not too large relative to
67   the iterator in the volume header, on load, or flush sequencing will
68   not work properly.  We should be able to just override it, but we
69   should complain if it happens.
70
71 * Kernel-side needs to clean up transaction queues and make appropriate
72   callbacks.
73
74 * Userland side needs to do the same for any initiated transactions.
75
76 * Nesting problems in the flusher.
77
78 * Inefficient vfsync due to thousands of file buffers, one per-vnode.
79   (need to aggregate using a device buffer?)
80
81 * Use bp->b_dep to interlock the buffer with the chain structure so the
82   strategy code can calculate the crc and assert that the chain is marked
83   modified (not yet flushed).
84
85 * Deleted inode not reachable via tree for volume flush but still reachable
86   via fsync/inactive/reclaim.  Its tree can be destroyed at that point.
87
88 * The direct write code needs to invalidate any underlying physical buffers.
89   Direct write needs to be implemented.
90
91 * Make sure a resized block (hammer2_chain_resize()) calculates a new
92   hash code in the parent bref
93
94 * The freemap allocator needs to getblk/clrbuf/bdwrite any partial
95   block allocations (less than 64KB) that allocate out of a new 64K
96   block, to avoid causing a read-before-write I/O.
97
98 * Check flush race upward recursion setting SUBMODIFIED vs downward
99   recursion checking SUBMODIFIED then locking (must clear before the
100   recursion and might need additional synchronization)
101
102 * There is definitely a flush race in the hardlink implementation between
103   the forwarding entries and the actual (hidden) hardlink inode.
104
105   This will require us to associate a small hard-link-adjust structure
106   with the chain whenever we create or delete hardlinks, on top of
107   adjusting the hardlink inode itself.  Any actual flush to the media
108   has to synchronize the correct nlinks value based on whether related
109   created or deleted hardlinks were also flushed.
110
111 * When a directory entry is created and also if an indirect block is
112   created and entries moved into it, the directory seek position can
113   potentially become incorrect during a scan.
114
115 * When a directory entry is deleted a directory seek position depending
116   on that key can cause readdir to skip entries.
117
118 * TWO PHASE COMMIT - store two data offsets in the chain, and
119   hammer2_chain_delete() needs to leave the chain intact if MODIFIED2 is
120   set on its buffer until the flusher gets to it?
121
122
123                                 OPTIMIZATIONS
124
125 * If a file is unlinked buts its descriptors is left open and used, we
126   should allow data blocks on-media to be reused since there is no
127   topology left to point at them.