… | |
… | |
725 | =item aio_allocate $fh, $mode, $offset, $len, $callback->($status) |
725 | =item aio_allocate $fh, $mode, $offset, $len, $callback->($status) |
726 | |
726 | |
727 | Allocates or frees disk space according to the C<$mode> argument. See the |
727 | Allocates or frees disk space according to the C<$mode> argument. See the |
728 | linux C<fallocate> documentation for details. |
728 | linux C<fallocate> documentation for details. |
729 | |
729 | |
730 | C<$mode> can currently be C<0> or C<IO::AIO::FALLOC_FL_KEEP_SIZE> |
730 | C<$mode> is usually C<0> or C<IO::AIO::FALLOC_FL_KEEP_SIZE> to allocate |
731 | to allocate space, or C<IO::AIO::FALLOC_FL_PUNCH_HOLE | |
731 | space, or C<IO::AIO::FALLOC_FL_PUNCH_HOLE | IO::AIO::FALLOC_FL_KEEP_SIZE>, |
732 | IO::AIO::FALLOC_FL_KEEP_SIZE>, to deallocate a file range. |
732 | to deallocate a file range. |
|
|
733 | |
|
|
734 | IO::AIO also supports C<FALLOC_FL_COLLAPSE_RANGE>, to remove a range |
|
|
735 | (without leaving a hole) and C<FALLOC_FL_ZERO_RANGE>, to zero a range (see |
|
|
736 | your L<fallocate(2)> manpage). |
733 | |
737 | |
734 | The file system block size used by C<fallocate> is presumably the |
738 | The file system block size used by C<fallocate> is presumably the |
735 | C<f_bsize> returned by C<statvfs>. |
739 | C<f_bsize> returned by C<statvfs>. |
736 | |
740 | |
737 | If C<fallocate> isn't available or cannot be emulated (currently no |
741 | If C<fallocate> isn't available or cannot be emulated (currently no |