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