Some time ago I began to develop a test file systems for Linux and FreeBSD
https://github.com/nagual2/Test
And to assess the effects of file fragmentation on performance file system I needed to implement add and remove blocks in the middle of the file - "hole punching" I can't find an analogue functions fallocate() and splice() under FreeBSD. And while I'm running linux emulator these functions are not available when compiling:
Function posix_fallocate() not analgichna fallocate().
How do I implement fallocate() and splice() on FreeBSD? Or how to use those that are in the emulator linux?
https://github.com/nagual2/Test
And to assess the effects of file fragmentation on performance file system I needed to implement add and remove blocks in the middle of the file - "hole punching" I can't find an analogue functions fallocate() and splice() under FreeBSD. And while I'm running linux emulator these functions are not available when compiling:
Code:
# if HAVE_LINUX_FALLOCATE
return fallocate (fd, mode, offset, len);
# else
return EIO_ENOSYS ();
# endif
How do I implement fallocate() and splice() on FreeBSD? Or how to use those that are in the emulator linux?