<font class="Apple-style-span" face="&#39;comic sans ms&#39;, sans-serif">Hi all ,</font><div><font class="Apple-style-span" face="&#39;comic sans ms&#39;, sans-serif">I wanted to free a data block from disk. So I made a loop device for ext2 fs and inserted my module(code) through insmod command.</font></div>
<div><font class="Apple-style-span" face="&#39;comic sans ms&#39;, sans-serif"><br></font></div><div><font class="Apple-style-span" face="&#39;comic sans ms&#39;, sans-serif">Here are the details :</font></div><div><div><font class="Apple-style-span" face="&#39;comic sans ms&#39;, sans-serif"> I</font><span class="Apple-style-span" style="font-size: 13px; "><span class="Apple-style-span" style="font-size: 12px; white-space: pre-wrap; "><font class="Apple-style-span" face="&#39;comic sans ms&#39;, sans-serif"> found a function named ext2_free_data() which takes block numbers to be freed as a parameter. The declaration of the function is as follows :</font></span><pre style="font-size: 12px; white-space: pre-wrap; overflow-x: hidden; overflow-y: hidden; padding-left: 0.7em; ">
<font class="Apple-style-span" face="&#39;comic sans ms&#39;, sans-serif">void ext2_free_data(struct inode *inode, __le32 *p, __le32 *q);

As we can see this function use structure of inode object and it make changes in this inode object.

This function changes the fields in in-core inode and mark the inode dirty. 
But I want the changes made in in-core inode to be reflected in disk inode immediately .
</font></pre><pre style="font-size: 12px; white-space: pre-wrap; overflow-x: hidden; overflow-y: hidden; padding-left: 0.7em; "><font class="Apple-style-span" face="&#39;comic sans ms&#39;, sans-serif"><br></font></pre><pre style="font-size: 12px; white-space: pre-wrap; overflow-x: hidden; overflow-y: hidden; padding-left: 0.7em; ">
<font class="Apple-style-span" face="&#39;comic sans ms&#39;, sans-serif">Is there any command to flush the buffers ?</font></pre><div style="font-family: arial, sans-serif; "><br></div></span><br>-- <br><span style="color:rgb(51, 51, 51)">Regards,</span><br>
Kashish<br><br>
</div></div>