--- IO-AIO/AIO.pm 2011/07/18 03:09:06 1.205 +++ IO-AIO/AIO.pm 2011/07/25 16:50:33 1.207 @@ -174,8 +174,8 @@ our @AIO_REQ = qw(aio_sendfile aio_read aio_write aio_open aio_close 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_fdatasync aio_sync_file_range aio_fallocate + 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_rename aio_link aio_move aio_copy aio_group aio_nop aio_mknod aio_load aio_rmtree aio_mkdir aio_chown @@ -239,6 +239,7 @@ aio_scandir $path, $maxreq, $callback->($dirs, $nondirs) aio_rmtree $path, $callback->($status) aio_sync $callback->($status) + aio_syncfs $fh, $callback->($status) aio_fsync $fh, $callback->($status) aio_fdatasync $fh, $callback->($status) aio_sync_file_range $fh, $offset, $nbytes, $flags, $callback->($status) @@ -688,8 +689,8 @@ =item aio_readdirx $pathname, $flags, $callback->($entries, $flags) -Quite similar to C, but the C<$flags> argument allows to tune -behaviour and output format. In case of an error, C<$entries> will be +Quite similar to C, but the C<$flags> argument allows one to +tune behaviour and output format. In case of an error, C<$entries> will be C. The flags are a combination of the following constants, ORed together (the @@ -746,7 +747,7 @@ This flag should not be set when calling C. Instead, it is being set by C, when any of the C<$type>'s found were -C. The absense of this flag therefore indicates that all +C. The absence of this flag therefore indicates that all C<$type>'s are known, which can be used to speed up some algorithms. =back @@ -938,7 +939,7 @@ entry plus an appended C will be C'ed, likely directories first, in order of their inode numbers. If that succeeds, it assumes that the entry is a directory or a symlink to directory (which will be checked -seperately). This is often faster than stat'ing the entry itself because +separately). This is often faster than stat'ing the entry itself because filesystems might detect the type of the entry without reading the inode data (e.g. ext2fs filetype feature), even on systems that cannot return the filetype information on readdir. @@ -1086,6 +1087,13 @@ If this call isn't available because your OS lacks it or it couldn't be detected, it will be emulated by calling C instead. +=item aio_syncfs $fh, $callback->($status) + +Asynchronously call the syncfs syscall to sync the filesystem associated +to the given filehandle and call the callback with the syncfs result +code. If syncfs is not available, calls sync(), but returns C<-1> and sets +errno to C nevertheless. + =item aio_sync_file_range $fh, $offset, $nbytes, $flags, $callback->($status) Sync the data portion of the file specified by C<$offset> and C<$length> @@ -1667,7 +1675,7 @@ Simply calls the C function (see its manpage for details). The following advice constants are -avaiable: C, C, +available: C, C, C, C, C, C. @@ -1678,7 +1686,7 @@ Simply calls the C function (see its manpage for details). The following advice constants are -avaiable: C, C, +available: C, C, C, C, C. On systems that do not implement C, this function returns @@ -1688,7 +1696,7 @@ Simply calls the C function on the preferably AIO::mmap'ed $scalar (see its manpage for details). The following protect -constants are avaiable: C, C, +constants are available: C, C, C, C. On systems that do not implement C, this function returns @@ -1823,8 +1831,8 @@ =item IO::AIO::reinit -Abondons all current requests and I/O threads and simply reinitialises all -data structures. This is not an operation suppported by any standards, but +Abandons all current requests and I/O threads and simply reinitialises all +data structures. This is not an operation supported by any standards, but happens to work on GNU/Linux and some newer BSD systems. The only reasonable use for this function is to call it after forking, if