mirror of
https://github.com/versity/scoutfs.git
synced 2026-02-07 11:10:44 +00:00
d5a2b0a6dbf17335de17d4433ab63fa50b52c714
The compaction code is still directly referencing the super block and calling sync methods as though it was still standalone. This is mostly OK because only the server runs it. But it isn't quite right because the sync methods no longer make the rings persistent as they write the item transaction. The server is in control of that now. Eventually we'll have compaction messages being sent between the mount clients and the server. Let's take a step in that direction by having the compaction work call net methods to get its compaction parameters and finish the compaction. Eventually these would be marshalled through request/process/reply code. But in this first step we know that the compaction code is running on the server so we can forgo all the messaging and just call in to and out of compaction. The net calls just holds the ring consistency locks in the server and call into the manifest to do the work, commiting the changes when its done. This is more careful about segno alloction and freeing. Compaction doesn't call the allocator directly. It gets allocaitons from the messages and returns them if it doesn't use them. We actually now free segnos as they're removed from the manifest. With the server controlling compaction and can tear all the fiddly level count watching code out of the manifest. Item transactions can't care about the level counts and the server always tries compaction after the manifest is updated intead of having the manifest watch the level counts and call compaction. Now that the server owns the rings they should not be torn down as the super is torn down, net does that now. And we need to be more careful to be sure that writes from dirtying and compaction are stable before killing the super. With all this in place moving to shared compaction involves adding the messages and negotiating concurrent compactions in the manifest. Signed-off-by: Zach Brown <zab@versity.com>
Description
No description provided
Languages
C
87%
Shell
9.3%
Roff
2.5%
TeX
0.8%
Makefile
0.4%