1. 10 Nov, 2023 27 commits
  2. 09 Nov, 2023 1 commit
    • Nils Goroll's avatar
      Fix wrong assertion hitting when all discard methods fail · e7999e0a
      Nils Goroll authored
      Manually tested with this modification:
      
      diff --git a/src/fellow_log.c b/src/fellow_log.c
      index 6075d81..45da269 100644
      --- a/src/fellow_log.c
      +++ b/src/fellow_log.c
      @@ -1696,6 +1696,9 @@ fellow_io_regions_discard(struct fellow_fd *ffd, void *ioctx,
                      r = fallocate(ffd->fd,
                          FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE,
                          (off_t)todo->offset, (off_t)todo->len);
      +               // XXX TEST
      +               r = 1;
      +               errno = EOPNOTSUPP;
                      if (r == 0) {
                              if ((ffd->cap & FFD_CAN_FALLOCATE_PUNCH_URING) == 0) {
                                      ffd->diag("fellow: fallocate punch"
      
      Fixes #38
      e7999e0a
  3. 07 Nov, 2023 5 commits
    • Nils Goroll's avatar
      fellow_stream_f(): Improve comment and assertion · 3fccc602
      Nils Goroll authored
      to make clear that we understand exactly what is happening.
      3fccc602
    • Nils Goroll's avatar
      Fix races for streaming busy objects · a1dbf0fe
      Nils Goroll authored
      For streaming busy objects, we basically rely on the varnish-cache
      ObjExtend() / ObjWaitExtend() API to never read past the object: In
      fellow_stream_f(), we always wait for more data (or the end of the
      object) before returning, such that fellow_cache_obj_iter(), which
      iterates over segments, should never touch a segment past the final
      FCS_BUSY segment.
      
      Yet - it did, by means of the read-ahead and the peek-ahead to determine
      whether or not OBJ_ITER_END should be signaled.
      
      We fix this issue by reading/peeking ahead only for segments with a
      state beyond FCS_BUSY.
      
      There is now also extensive test infrastructure to specifically test
      concurrent access ti busy objects. To keep layers separate,
      fellow_cache_test uses a lightweight signal/wait implementation
      analogous to the ObjExtend() / ObjWaitExtend() Varnish-Cache
      interface.
      
      An earlier version of t_busyobj() had run on my dev laptop for 3.5
      hours without crashing, while without the fixes it had run into
      assertion failures within seconds.
      
      Fixes #35 and #36 (I hope)
      a1dbf0fe
    • Nils Goroll's avatar
      Extend b62.vtc by cache reload · 79ed0dab
      Nils Goroll authored
      79ed0dab
    • Nils Goroll's avatar
      Mark a question to revisit later · 6fff4eed
      Nils Goroll authored
      6fff4eed
    • Nils Goroll's avatar
      Add DBG() to fcsc_next() · fbbcb962
      Nils Goroll authored
      ... to make it easier to follow the code in fellow_cache_test
      
      motivated by #35
      fbbcb962
  4. 03 Nov, 2023 7 commits