[lkml]   [2002]   [Aug]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: block device/VM question
"A month of sundays ago Thunder from the hill wrote:"
> > there I can do whatever the sysopen with O_DIRECT does.
> I try to say, see how sys_open() handles O_DIRECT. You should be able to
> do just the same.

Well, how it handles it is manifestly unclear. It seems to trace down to
the dentry and call dentry_open(), but with a struct vfsmount as
another arg. I don't know what that's for. It got the vfsmount by aother
esoteric lookup, getting a struct nameidata from the filename via

Yecch. I have the inode of the sepecial device file. I don't want to
know the name. I even have a file pointer.

In dentry_open(), we get a struct file f = get_empty_filp(), and then
fill out various of its fields with enormously obscure things. And for
the O_DIRECT flag we seem to do alloc_kiovec(1, &f->f_iobuf).

I feel that the latter is all I want to do, and the question is to what,
where (I'll clean up on release). Do I do this every time the devices
_open() function is called? Or just once, and what do I do it to? I
should do it to the struct file that gets passed into to the driver
open()? I'll try that. And set the flag.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

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