Commit Graph

24 Commits

Author SHA1 Message Date
Miroslav Crnic
768072e054 kmod: remove block service cache
With reduced span cache time the block service cache
is no longer needed. We also don't need to fetch
changed block services from registry as we'll get
it as part of span fetches.
2025-12-09 15:34:09 +00:00
Miroslav Crnic
0436fe878c kmod: configurable span cache retention 2025-11-07 10:26:10 +00:00
Joshua Leahy
7a4e466ac6 Make TernFS open source 2025-09-17 18:20:23 +01:00
Miroslav Crnic
54caa4338b kmod: add refcount to spans 2025-09-10 19:06:23 +01:00
Miroslav Crnic
6304029894 kmod: abstract spans struct 2025-09-04 12:11:49 +00:00
Miroslav Crnic
f1d0b649f1 kmod: break metadata span dependency 2025-09-04 12:08:37 +00:00
Francesco Mazzoli
110705db8d EggsFS -> TernFS rename
Things not done because probably disruptive:

* kmod filesystem string
* sysctl/debugfs/trace
* metrics names
* xmon instance names

Some of these might be renamed too, but starting with a relatively
safe set.
2025-09-03 09:29:53 +01:00
Miroslav Crnic
5e17740091 kmod: remove stripe reads 2025-03-24 14:02:14 +00:00
Saulius Grusnys
8c4bd4d9e6 [kmod] add ability to read single page from blockservice (#300)
* [kmod] add ability to read single page from blockservice

* Update kmod/span.c

Co-authored-by: Miroslav Crnic <miroslav.crnic@xtxmarkets.com>

---------

Co-authored-by: Miroslav Crnic <miroslav.crnic@xtxmarkets.com>
2024-08-21 15:50:28 +01:00
Francesco Mazzoli
260656105d Cahgne caching from span to stripe level (#275)
Also added additional stripe cache sysfs metrics.

---------

Co-authored-by: Saulius Grusnys <saulius.grusnys@xtxmarkets.com>
2024-06-18 13:39:50 +01:00
Francesco Mazzoli
a05c16076a Store block service info separatedly rather than in each span
This saves quite a bit of space in the span structure. I'm doing this
in preparation for stripe-level span cache, since I plan to just tie
the span metadata lifetime to the inode lifetime, so space savings
in `struct eggsfs_span` are a good thing.

I think it also makes good sense, block service updates are propagated
instantly.
2024-06-06 09:04:30 +00:00
Francesco Mazzoli
752c53ced5 Do not crash when there's no shards in eggsfs info
This should almost never happened, but I think it did because of
an upgrade by @mcrnic which temporarily zeroed the state.
2024-02-08 20:02:48 +00:00
Francesco Mazzoli
1a8cda8747 Retry if we fail to get page in spans
See comment for explanation, this is in preparation for #50, see
<internal-repo/issues/50#issuecomment-23278>
in particular.
2023-08-22 15:01:33 +01:00
Francesco Mazzoli
0fef0a34ed Cache and timeout fetch block sockets 2023-07-09 19:50:37 +00:00
Francesco Mazzoli
583b53a111 Continue tightening various ownership structures
Also, start renaming static stuff taking `eggsfs` out, I get tired
typing. Various other tweaks, too.
2023-06-13 14:52:45 +00:00
Francesco Mazzoli
d076941ce8 Simplify block write/fetch
And hopefully reduce the likelihood of bugs. On the write end, given
that we do things less asynchronously, things might be a bit slower,
but I think the simplification is worth it for now.

Also, fix/improve a bunch of other stuff.
2023-06-08 11:59:09 +00:00
Francesco Mazzoli
cd86e632e2 Implement RS recovery, although it won't really be used now...
...since it only relies on block service flags, and we don't
set them right now.
2023-06-03 17:27:54 +00:00
Francesco Mazzoli
a4bc32a18f Span drop improvements
We could get into situations where async droppings were scheduled
at every read.
2023-05-26 17:22:43 +00:00
Francesco Mazzoli
9112cac1b0 si_mem_available() returns the _pages_ available, not bytes 2023-05-26 17:22:43 +00:00
Francesco Mazzoli
1a701f22a2 Actually reclaim spans 2023-05-25 10:22:31 +00:00
Francesco Mazzoli
52e50a1888 Simplify span cache locking further
With seqcount with the current locking strategy we can get into
subtle nasty situations. For now, just be "dumb" with a rw semaphore.

For example, consider the case where we get the span in the
seqcount protected section in get_span. Between getting the
span and acquiring it the reclaimer might free it.

Ideally we'd do something similar to what Paweł planned (seqcount
and RCU protection) but let's start with something simple which
seems to work.

Also, shard the LRU by 128, to reduce contention, and fix a couple
of unrelated bugs.
2023-05-25 08:34:40 +00:00
Francesco Mazzoli
47c1022896 Bugfixes 2023-05-23 22:10:11 +00:00
Francesco Mazzoli
8f32ecc1b6 Cached spans reclamation
Right now this is very crude (global spinlock), but reasonably simple.
We can improve if needed.
2023-05-23 16:57:29 +00:00
Francesco Mazzoli
6addbdee6a First version of kernel module
Initial version really by Pawel, but many changes in between.

Big outstanding issues:

* span cache reclamation (unbounded memory otherwise...)
* bad block service detection and workarounds
* corrupted blocks detection and workaround

Co-authored-by: Paweł Dziepak <pawel.dziepak@xtxmarkets.com>
2023-05-18 15:29:41 +00:00