Messages in this thread | | | From | "Peter T. Breuer" <> | Subject | Re: block device/VM question | Date | Tue, 27 Aug 2002 20:04:48 +0200 (MET DST) |
| |
"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 open_namei.
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.
Peter - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |