kaio
[Top] [All Lists]

Re: kaio patch on linux 2.2.14 kernel

To: Gabor Dolla <agdolla@xxxxxxxxx>
Subject: Re: kaio patch on linux 2.2.14 kernel
From: "Matt D. Robinson" <yakker@xxxxxxxxxxxxxx>
Date: Wed, 1 Mar 2000 08:11:49 -0800 (PST)
Cc: Rajagopal Ananthanarayanan <ananth@xxxxxxx>, kaio@xxxxxxxxxxx
In-reply-to: <Pine.BSF.4.10.10003010954280.74355-100000@xxxxxxxxxxxxxxxxx>
Sender: owner-kaio@xxxxxxxxxxx
On Wed, 1 Mar 2000, Gabor Dolla wrote:
|>> Hmm. sd_raw_fops is defined by the following patch
|>> 
|>> ftp://oss.sgi.com/www/projects/rawio/download/sgi+straw2.2.13.patch
|>> 
|>> which is the one you should be using on a vanilla linux kernel.
|>
|>well, the patch place kaio_is_raw function in sd.c at line 606
|>and sd_raw_fops struct defined at line 790...
|>that is why I needed the pre definition....
|>
|>> > void *
|>> > kaio_raw_rw(int rw, struct file *filp, char *buf, size_t count, loff_t
|>> > *ppos,
|>> >         int *error, struct semaphore *semp, struct kiobuf *iobufp)
|>> > {
|>> >       return(sd_raw_rw(rw, filp, buf, count, ppos, error, semp, iobufp));
|>> > }
|>> > 
|>> > the compiler said that sd_raw_rw needs 9 parameters
|>> > 
|>> > so I changed it to:
|>> > return(sd_raw_rw(rw, filp, buf, count, ppos, error, semp, iobufp,
|>> > AS_USER));
|>> > 
|>> Yes this is the correct fix. Apparently the rawio patches
|>> have been upgraded since made the kaio patches.
|>
|>there is another flag AS_KERNEL, maybe I should use that flag in the
|>kernel source ????

The kernel flag is used for kernel memory -- the real reason is
the LKCD code (http://oss.sgi.com/projects/lkcd) requires mapping
kiobufs in kernel memory.  The previous model didn't support anything
but user memory, hence the addition of AS_KERNEL.

It's recommended that unless you really require AS_KERNEL, there's
no need to use it.  Rarely will people want to map kiobufs with kernel
memory unless you're doing something in the kernel to raw devices (IMHO).

|>thanks
|>
|>Gabor

--Matt


<Prev in Thread] Current Thread [Next in Thread>