psarna/seastar

Implement creating a file and performing basic I/O on it

Opened this issue · 0 comments

With basic metadata log capabilities and using the in-memory representation of the whole filesystem metadata, implement:

  • creating a file with given name and attributes
  • writing to a file at given offset
  • reading from the file at given offset

First note: since directory is represented simply as a file with specific structure (a list of dentries), creating a file should actually be the second operation to implement - writing to a file will naturally come first, as the file needs to be placed in the root directory, which means that a write to that directory must be performed.

Take note that at this stage it's sufficient to implement small writes only, i.e. writes that go straight to the metadata log and do not involve block allocation nor keeping track of which offsets belong to which blocks - these are for later. When testing this feature, assume very small writes that definitely fit in RAM.