Skip to content

Conversation

@Firobe
Copy link
Collaborator

@Firobe Firobe commented Sep 3, 2024

Hi!

This PR does two things:

  • pin notafs directly from the unikernel's config.ml so it doesn't need to be pinned manually (so that step is removed from the README)
  • introduce a notafs_kv_rw function in config.ml that takes a block implementation (and a few other parameters, see the doc) and returns a kv_rw implementation, so that notafs-kv can be a real drop-in replacement for unikernels that already expect a KV (say, from a tar file)

A few thoughts:

  • here, all that code is introduced in the example config.ml, but of course the goal would be to merge this code upstream in mirage. This can be a first draft towards that goal
  • I change the example, but we could very well duplicate it (since this doesn't prevent people to directly use Block and the library, as done initialy) if you prefer
  • we could have a notafs_kv_ro as well if needed
  • currently notafs_kv_rw takes a format parameter to determine if the block should be formatted always, never or the first time. This could very well be a proper configure-time or run-time parameter as well
  • the logic for connection could be slightly easier if Notafs.KV took the checksum implementation as its first argument instead of its second (we wouldn't need to define a type for checksums)

@Firobe Firobe force-pushed the mirage-config-example branch from 5103957 to 1136627 Compare September 3, 2024 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants