Index: vfs_aio.c =================================================================== RCS file: /home/ncvs/src/sys/kern/vfs_aio.c,v retrieving revision 1.227 diff -u -r1.227 vfs_aio.c --- vfs_aio.c 24 Sep 2006 04:47:47 -0000 1.227 +++ vfs_aio.c 6 Oct 2006 03:13:40 -0000 @@ -1331,6 +1331,7 @@ struct socket *so; struct aiocblist *aiocbe, *cb; struct kaioinfo *ki; + struct vnode *vp; struct kevent kev; struct sockbuf *sb; int opcode; @@ -1410,6 +1411,18 @@ default: error = fget(td, fd, &fp); } + + if (error == 0) { + /* XXX Only block device and disk file is supported */ + if (fp->f_type != DTYPE_VNODE) + error = ENOTSUP; + else { + vp = fp->f_vnode; + if (vp->v_type != VREG && !vn_isdisk(vp, &error)) + error = ENOTSUP; + } + } + if (error) { uma_zfree(aiocb_zone, aiocbe); suword(&job->_aiocb_private.error, error);