Bug 16163

Summary: posix AIO broken for normal files
Product: Base System Reporter: Adrian Chadd <adrian>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.0-CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Adrian Chadd freebsd_committer freebsd_triage 2000-01-17 20:40:03 UTC
Trying to use aio_* on a normal file (not a socket or a device) gives 
ENOTBLK.

The code calls aio_qphysio() which it expects to fall through with
a return value of -1 if it can't queue it the non-thread way. This
routine is only valid for VCHRs. However, the vn_isdisk() call
isn't checked to see if the return is ENOTBLK, and any error triggers
a return which causes the aio_* routines to error out without
queueing the IO request the "normal" way.

How-To-Repeat: 
Try to write some AIO code, that talks to normal disk files, and not
special stuff (sockets or VCHRs).
Comment 1 Adrian Chadd freebsd_committer freebsd_triage 2000-01-18 13:48:16 UTC
State Changed
From-To: open->closed

Patch applied by green, with a quick style fix.