• 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
Name
Last commit
Last update
LICENSES Loading commit data...
logs Loading commit data...
src Loading commit data...
.editorconfig Loading commit data...
.gitignore Loading commit data...
BUGS.rst Loading commit data...
CHANGES.rst Loading commit data...
COPYING Loading commit data...
DEVELOPER.rst Loading commit data...
INSTALL.rst Loading commit data...
Makefile.am Loading commit data...
README.rst Loading commit data...
bootstrap Loading commit data...
configure.ac Loading commit data...