CassFS
CassFS copied to clipboard
Rewrite inodes superblock less often
The inode problem is at the bottom of CassFs::Write, where we rewrite the inode even though we might not need to if we haven't allocated any new blocks or changed the size. This might change if/when we ever track mtime, though, so maybe it's a moot point.
The more serious issue is hitting the superblock all the time. If we implement dynamic data-block keys (issue 3), the worst part of that disappears. To handle inode allocations, we should bump next_ialloc by 100 or so each time we need to, and then use up that chunk before hitting the superblock again. If we crash, we lose some of those reserved inode numbers, but the pool is so large it doesn't matter.