--- IO-AIO/AIO.pm 2012/04/01 17:46:02 1.220 +++ IO-AIO/AIO.pm 2012/04/06 22:51:02 1.223 @@ -176,7 +176,7 @@ aio_stat aio_lstat aio_unlink aio_rmdir aio_readdir aio_readdirx aio_scandir aio_symlink aio_readlink aio_realpath aio_sync aio_fsync aio_syncfs aio_fdatasync aio_sync_file_range aio_fallocate - aio_pathsync aio_readahead + aio_pathsync aio_readahead aio_fiemap aio_rename aio_link aio_move aio_copy aio_group aio_nop aio_mknod aio_load aio_rmtree aio_mkdir aio_chown aio_chmod aio_utime aio_truncate @@ -415,7 +415,7 @@ =item aio_seek $fh, $offset, $whence, $callback->($offs) -Seeks the filehandle to the new C<$offset>, similarly to perl'S +Seeks the filehandle to the new C<$offset>, similarly to perl's C. The C<$whence> can use the traditional values (C<0> for C, C<1> for C or C<2> for C). @@ -1251,6 +1251,46 @@ aio_mlockall IO::AIO::MCL_FUTURE; +=item aio_fiemap $fh, $start, $length, $flags, $count, $cb->(\@extents) + +Queries the extents of the given file (by calling the Linux FIEMAP ioctl, +see L for details). If the +C is not available on your OS, then this rquiest will fail with +C. + +C<$start> is the starting offset to query extents for, C<$length> is the +size of the range to query - if it is C, then the whole file will +be queried. + +C<$flags> is a combination of flags (C or +C - C is also +exported), and is normally C<0> or C to query +the data portion. + +C<$count> is the maximum number of extent records to return. If it is +C, then IO::AIO queries all extents of the file. As a very special +case, if it is C<0>, then the callback receives the number of extents +instead of the extents themselves. + +If an error occurs, the callback receives no arguments. The special +C value C is available to test for flag errors. + +Otherwise, the callback receives an array reference with extent +structures. Each extent structure is an array reference itself, with the +following members: + + [$logical, $physical, $length, $flags] + +Flags is any combination of the following flag values (typically either C<0> +or C): + +C, C, +C, C, +C, C, +C, C, +C, C or +C. + =item aio_group $callback->(...) This is a very special aio request: Instead of doing something, it is a