* From: Stephen Hemminger <shemminger@osdl.org>
* Modified by Daniel McNeil <daniel@osdl.org> for testing aio.
* - added -a alignment
* - added -b blksize option
* From: Stephen Hemminger <shemminger@osdl.org>
* Modified by Daniel McNeil <daniel@osdl.org> for testing aio.
* - added -a alignment
* - added -b blksize option
* - added -f open_flag option
* - added -w (no write) option (reads from source only)
* - added -n (num aio) option
* - added -f open_flag option
* - added -w (no write) option (reads from source only)
* - added -n (num aio) option
-static int busy; // # of I/O's in flight
-static int tocopy; // # of blocks left to copy
-static int srcfd; // source fd
-static int dstfd = -1; // destination file descriptor
+static int busy; /* # of I/O's in flight */
+static int tocopy; /* # of blocks left to copy */
+static int srcfd; /* source fd */
+static int dstfd = -1; /* destination file descriptor */
static const char *dstname;
static const char *srcname;
static int source_open_flag = O_RDONLY; /* open flags on source file */
static const char *dstname;
static const char *srcname;
static int source_open_flag = O_RDONLY; /* open flags on source file */
struct iocb **iocb_free; /* array of pointers to iocb */
int iocb_free_count; /* current free count */
int alignment = 512; /* buffer alignment */
struct iocb **iocb_free; /* array of pointers to iocb */
int iocb_free_count; /* current free count */
int alignment = 512; /* buffer alignment */
io_error("aio write", res2);
if (res != iocb->u.c.nbytes) {
io_error("aio write", res2);
if (res != iocb->u.c.nbytes) {
io_queue_init(aio_maxio, &myctx);
tocopy = howmany(length, aio_blksize);
if (init_iocb(aio_maxio, aio_blksize) < 0) {
io_queue_init(aio_maxio, &myctx);
tocopy = howmany(length, aio_blksize);
if (init_iocb(aio_maxio, aio_blksize) < 0) {