Fix wrong assertion hitting when all discard methods fail
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
Showing
Please register or sign in to comment