[Bug 223440] world needs review and adjustment for the disabling of fallocate for zfs (-r325320), lld included

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sun Nov 5 21:23:38 UTC 2017


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=223440

--- Comment #3 from Ed Maste <emaste at freebsd.org> ---
> contrib/sqlite3/sqlite3.c
> crypto/heimdal/lib/sqlite/sqlite3.c

AFAICT this is the only issue that needs more effort / investigation, as it
appears that it does not correctly handle EINVAL or EOPNOTSUPP:

#if defined(HAVE_POSIX_FALLOCATE) && HAVE_POSIX_FALLOCATE
      /* The code below is handling the return value of osFallocate() 
      ** correctly. posix_fallocate() is defined to "returns zero on success, 
      ** or an error number on  failure". See the manpage for details. */
      int err;
      do{
        err = osFallocate(pFile->h, buf.st_size, nSize-buf.st_size);
      }while( err==EINTR );
      if( err ) return SQLITE_IOERR_WRITE;
#else

Other source files with posix_fallocate / fallocate do not have an issue:

> contrib/netbsd-tests/lib/libc/sys/t_posix_fallocate.c

It's only testing that posix_fallocate doesn't change errno, and that EBADF is
returned for a bad fd (-1), so no issue here.

> contrib/llvm/lib/Support/Unix/Path.inc

Fixed by r325420

> contrib/pjdfstest/pjdfstest.c

Appears to be test harness only; I did not find a test invoking posix_fallocate
or fallocate.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list