lkml.org 
[lkml]   [1999]   [Jul]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Loop Devices over NFS don't work?

On Mon, 5 Jul 1999, Alan Cox wrote:

> > Oh, in that case shouldn't losetup fail with an error?
> >
> > Also, is it really necessary to have bmap to do loop devices? Couldn't
> > some sort of alternate mechanism be used?
>
> You could fall back to read/write in theory. There is an interesting project
> for you 8)

Hrm, I have tried a few things, and I am having poor luck making read work
in kernel space. I am using a call like this:

lo->lo_dentry->d_inode->i_op->
default_file_ops->read(lo->lo_backing_file,dest_addr,len,
&lo->lo_backing_file->f_pos));

Which I belive goes over to mm/filemap.c:generic_file_read which then
seems to return efault because access_ok says that it cannot write to
dest_addr (which should be within a buffer head, I think)

I'm going to guess here and say that access_ok is intended to restrict
user-space access, so it is probably ment to fail for memory belonging to
the kernel (?) I guess the only fix is to create another function in
filemap.c that has that call removed?

Is this correct or have I missed something?

Otherwise for my simple needs, removing the access_ok check works 'well
enough'

Jason



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:52    [W:0.082 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site