<div dir="ltr"><div>> in this vm_operations_struct , there are open/close functions , are there necessary relations between file operations and this struct ?<br>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.<br>
<br>static const struct vm_operations_struct ext4_file_vm_ops = {<br> .fault = filemap_fault,<br> .page_mkwrite = ext4_page_mkwrite,<br>}<br><br></div>Note that only filesystem knows how to fill up this page.<br>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jan 3, 2013 at 3:39 PM, horseriver <span dir="ltr"><<a href="mailto:horserivers@gmail.com" target="_blank">horserivers@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Thu, Jan 03, 2013 at 01:16:06PM +0530, Rajat Sharma wrote:<br>
<br>
> > will it be maped with vm_area struct ?<br>
> Yes if it is accessed via mmap system call.<br>
<br>
</div>you know that , in the struct vm_area_struct,there is a struct vm_operations_struct * vm_ops;<br>
<br>
in this vm_operations_struct , there are open/close functions , are there necessary relations between file<br>
<br>
operations and this struct ?<br>
<br>
thanks!<br>
<div class="im HOEnZb"><br>
><br>
> > what is the relation between page-cache and file operation?<br>
> file operations for data access like read/write will look into page-cache<br>
> first before going to disk.<br>
><br>
> -Rajat<br>
><br>
<br>
</div><div class="HOEnZb"><div class="h5">_______________________________________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
<a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
</div></div></blockquote></div><br></div>