Subject: Re: Oddity in physio()
To: Ben Harris <bjh21@netbsd.org>
From: Jason R Thorpe <thorpej@zembu.com>
List: tech-kern
Date: 05/29/2001 08:12:57
On Tue, May 29, 2001 at 02:03:17PM +0100, Ben Harris wrote:

 >                         error = uvm_vslock(p, bp->b_data, todo,
 >                                            (flags & B_READ) ?
 >                                            VM_PROT_READ | VM_PROT_WRITE :
 >                                            VM_PROT_READ);
 > 
 > Am I missing something really obvious, or is that B_READ test backwards?

A "read" from a device is a "write" to memory.  Similarly, a "write" to
a device is a "read" from memory.

-- 
        -- Jason R. Thorpe <thorpej@zembu.com>