UnifyFS icon indicating copy to clipboard operation
UnifyFS copied to clipboard

Tracking laminated file state

Open adammoody opened this issue 5 years ago • 1 comments

In order to take advantage of lamination semantics, we first need to track the boolean state as to whether a file has been laminated. For example, this could be a new boolean field on the global file metadata.

Knowing whether a file is laminated will greatly assist in things like file size queries:

get_file_size() {
  if (laminated)
    return cached_file_size (cheap)
  else
    query key/value store for current max written offset (expensive)
}

We can also start to return errors on new writes.

To set the laminated property, we may need to define the unifycr_laminate function in our library.

adammoody avatar Jun 17 '19 20:06 adammoody

Examples that need to laminate a file (size.c, write.c) currently do so by using chmod to remove the write bits (#354). These will need to be updated once there is an explicit unifyfs_laminate() call. Mentioning it here for my future self, who will have forgotten by then.

CamStan avatar Aug 26 '19 23:08 CamStan