diff options
| author | Brian Feldman <green@FreeBSD.org> | 2000-01-17 21:18:39 +0000 |
|---|---|---|
| committer | Brian Feldman <green@FreeBSD.org> | 2000-01-17 21:18:39 +0000 |
| commit | f582ac0630edb81fb14d29050f817866812b64a2 (patch) | |
| tree | 622faa5761a8aa44815e55b6f9ceae702f57e67f /sys | |
| parent | 96cdb64ea929ba19ddf8543bdf410853c6ba46f1 (diff) | |
Notes
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/kern/vfs_aio.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/sys/kern/vfs_aio.c b/sys/kern/vfs_aio.c index 5fc3c2ce89e37..fa953cdaac0ee 100644 --- a/sys/kern/vfs_aio.c +++ b/sys/kern/vfs_aio.c @@ -944,8 +944,17 @@ aio_qphysio(struct proc *p, struct aiocblist *aiocbe) vp = (struct vnode *)fp->f_data; - if (!vn_isdisk(vp, &error)) - return (error); + /* + * If its not a disk, we don't want to return a positive error. + * It causes the aio code to not fall through to try the thread + * way when you're talking to a regular file. + */ + if (!vn_isdisk(vp, &error)) { + if (error == ENOTBLK) + return (-1); + else + return (error); + } if (cb->aio_nbytes % vp->v_rdev->si_bsize_phys) return (-1); |
