in this vm_operations_struct , there are open/close functions , are there necessary relations between file operations and this struct ? well not really for open/close of vm_ops are of interest to filesystems, but page fault handler and making page writable is where filesystem come into picture. Have a look at ext4_file_vm_ops, it implements operations of interest.
static const struct vm_operations_struct ext4_file_vm_ops = { .fault = filemap_fault, .page_mkwrite = ext4_page_mkwrite, } Note that only filesystem knows how to fill up this page. On Thu, Jan 3, 2013 at 3:39 PM, horseriver <horserivers@gmail.com> wrote:
On Thu, Jan 03, 2013 at 01:16:06PM +0530, Rajat Sharma wrote:
will it be maped with vm_area struct ? Yes if it is accessed via mmap system call.
you know that , in the struct vm_area_struct,there is a struct vm_operations_struct * vm_ops;
in this vm_operations_struct , there are open/close functions , are there necessary relations between file
operations and this struct ?
thanks!
what is the relation between page-cache and file operation? file operations for data access like read/write will look into page-cache first before going to disk.
-Rajat
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies