<div class="gmail_quote">On Wed, Feb 15, 2012 at 2:08 PM, Manish Katiyar <span dir="ltr"><<a href="mailto:mkatiyar@gmail.com">mkatiyar@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
[Apparently I forgot to cc list]<br>
<div class="HOEnZb"><div class="h5"><br>
On Tue, Feb 14, 2012 at 10:04 PM, Manish Katiyar <<a href="mailto:mkatiyar@gmail.com">mkatiyar@gmail.com</a>> wrote:<br>
> On Tue, Feb 14, 2012 at 7:43 PM, Ravishankar <<a href="mailto:cyberax82@gmail.com">cyberax82@gmail.com</a>> wrote:<br>
>> Hello,<br>
>><br>
>> When we unmount a file system with the umount command or the umount() system<br>
>> call, does the kernel sync the dirty buffers before the file system is<br>
>> unmounted?I am assuming that the file system is not 'busy' (i.e no open<br>
>> files etc) and no force options are specified. When I did a walk-through of<br>
>> do_umount() call in fs/namespace.c, I could not find calls to sync any dirty<br>
>> pages that might exist.<br>
><br>
> yes, most of the filesystem have their own function to sync fs. Look<br>
> for the function pointer "sync_fs"<br>
><br>
> For eg..for ext4<br>
><br>
> generic_shutdown_super -> sync_filesystem -> __sync_filesystem -><br>
> sync_fs -> ext4_sync_fs<br>
> --<br>
> Thanks -<br>
> Manish<br>
<br>
<br>
<br>
</div></div><span class="HOEnZb"><font color="#888888">--<br>
Thanks -<br>
Manish<br>
</font></span></blockquote></div><div><br></div>Thanks a lot.Just to add, generic_shutdown_super() is called thus:<div><br><div>umount systemcall -->mntput_no_expire()-->__mntput()-->deactivate_super()-->deactivate_locked_super()-->kill_block_super()-->generic_shutdown_super()<br>
<br>
</div></div>