xref: /haiku/src/add-ons/kernel/file_systems/bfs/ToDo (revision baa326e0ecbb94b6c340f853c9b5055aa9f47da2)
1BFS - ToDo, September 7th, 2002
2-----
3
4BlockAllocator
5
6 - the BlockAllocator is only slightly optimized and probably slow
7 - the first free and the largest range are currently not correctly maintained (only efficiency suffers - it does work correctly)
8 - the allocation policies will have to stand against some real world tests
9 - the access to the block bitmap is currently managed using a global lock
10
11
12DataStream
13
14 - only files are trimmed back (in bfs_close()), but every inode has a preallocated stream...
15 - Inode::GrowStream(): merging of block_runs doesn't work between range/block boundaries
16
17
18Queries
19
20 - There shouldn't be any cases where you can speed up a query with reordering the query expression - test it
21 - Check permissions of the parent directories
22 - Add protection against crashing applications which had a query open - at least the original BeOS kernel does not free the cookie (which throws some memory away *and* prevents unmounting the disk)
23 - the query set for "!=" and last_modified/size is not the same as for "="; last_modified/size don't contain directories
24
25
26Journal
27
28 - Check if there are any standard and often-happening cases for a transaction to fail, and if so, start the transaction only when necessary
29 - if the system crashes between bfs_unlink() and bfs_remove_vnode(), the inode can be removed from the tree, but its memory is still allocated - this can happen if the inode is still in use by someone (and that's what the "chkbfs" utility is for, mainly).
30 - add delayed index updating (+ delete actions to solve the issue above)
31 - multiple log files, parallel transactions?
32 - variable sized log file
33 - as long as we have a fixed-sized log file, it should be possible to reserve space for a transaction to be able to decide if batching it is possible
34
35
36BPlusTree
37
38 - BPlusTree::Remove() could trigger CachedNode::Free() to go through the free nodes list and free all pages at the end of the data stream
39 - updating the TreeIterators doesn't work yet for duplicates (which may be a problem if a duplicate node will go away after a remove)
40 - BPlusTree::RemoveDuplicate() could spread the contents of duplicate node with only a few entries to save some space (right now, only empty nodes are freed)
41
42
43Inode
44
45 - exchange Inode::OldLastModified() with Inode::NewLastModified(), and don't change the last_modified field directly in Inode::WriteAt() for consistency in case of a crash
46 - the size is only updated in bfs_close() - but if the system crashes before, the entry in the size index doesn't match the one in the inode anymore - it would be better to let the data.size not reflect the real file size in this case (since the max_xxx_range entries are always correct)
47 - Inode::FillGapWithZeros() currently disabled; apart from being slow, it really shouldn't be executed while a transaction is running, because that stops all other threads from doing anything (which can be a long time for a 100 MB file)
48
49
50Indices
51
52 - consider Index::UpdateLastModified() writing back the updated inode
53
54
55Attributes
56
57 - bfs_write_attr() doesn't check if the attribute data may fit into the small_data region if there already is that attribute as an attribute file
58
59
60Volume
61
62
63kernel_interface
64
65 - missing functions, maybe they are not really needed: bfs_rename_attr(), bfs_rename_index(), bfs_initialize(), bfs_setflags(), bfs_link()
66 - bfs_rename() currently doesn't respect any permissions
67
68
69general stuff
70
71 - There are also some comments with a leading "ToDo:" directly in the code which may not be mentioned here.
72
73
74-----
75Axel Dörfler
76axeld@pinc-software.de
77