Thread (2 messages) 2 messages, 2 authors, 2012-02-15

Does unmount() sync dirty buffers

From: Ravishankar <hidden>
Date: 2012-02-15 11:38:38

Possibly related (same subject, not in this thread)

On Wed, Feb 15, 2012 at 2:08 PM, Manish Katiyar [off-list ref] wrote:
[Apparently I forgot to cc list]

On Tue, Feb 14, 2012 at 10:04 PM, Manish Katiyar [off-list ref]
wrote:
quoted
On Tue, Feb 14, 2012 at 7:43 PM, Ravishankar [off-list ref]
wrote:
quoted
quoted
Hello,

When we unmount a file system with the umount command or the umount()
system
quoted
quoted
call, does the kernel sync the dirty buffers before the file system is
unmounted?I am assuming that the file system is not 'busy' (i.e no open
files etc) and no force options are specified. When I did a
walk-through of
quoted
quoted
do_umount() call in fs/namespace.c, I could not find calls to sync any
dirty
quoted
quoted
pages that might exist.
yes, most of the filesystem have their own function to sync fs. Look
for the function pointer "sync_fs"

For eg..for ext4

generic_shutdown_super -> sync_filesystem -> __sync_filesystem ->
sync_fs -> ext4_sync_fs
--
Thanks -
Manish


--
Thanks -
Manish
Thanks a lot.Just to add,  generic_shutdown_super() is called thus:

umount systemcall
-->mntput_no_expire()-->__mntput()-->deactivate_super()-->deactivate_locked_super()-->kill_block_super()-->generic_shutdown_super()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120215/255d3844/attachment.html 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help