<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: ioctl, fsync - how to flush block device buffers?</title>
	<atom:link href="http://blogs.gnome.org/cneumair/2006/02/11/ioctl-fsync-how-to-flush-block-device-buffers/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.gnome.org/cneumair/2006/02/11/ioctl-fsync-how-to-flush-block-device-buffers/</link>
	<description>Just another GNOME Blogs weblog</description>
	<pubDate>Tue, 07 Oct 2008 00:19:38 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
		<item>
		<title>By: Anonymous Coward</title>
		<link>http://blogs.gnome.org/cneumair/2006/02/11/ioctl-fsync-how-to-flush-block-device-buffers/#comment-91</link>
		<dc:creator>Anonymous Coward</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.gnome.org/cneumair/2006/02/11/ioctl-fsync-how-to-flush-block-device-buffers/#comment-91</guid>
		<description>Your problem with fsync is the interpretation of "all data for the open file descriptor".&lt;p/&gt;For every inode in use on the system, Linux creates a separate "page cache".  Fsync just writes the modified parts of this cache to the disk.&lt;p/&gt;Different inodes have different page caches.  So, an fsync on /dev/foo will not have any effect on the cache of /mnt/file, even though /dev/foo is mounted on /mnt .&lt;p/&gt;I don't think there's a portable way to sync a specific filesystem (I don't even know if there's a good solution on Linux).  AFAIR, sync(2) is not required to wait until all the writes have completed.</description>
		<content:encoded><![CDATA[<p>Your problem with fsync is the interpretation of &#8220;all data for the open file descriptor&#8221;.
<p />For every inode in use on the system, Linux creates a separate &#8220;page cache&#8221;.  Fsync just writes the modified parts of this cache to the disk.
<p />Different inodes have different page caches.  So, an fsync on /dev/foo will not have any effect on the cache of /mnt/file, even though /dev/foo is mounted on /mnt .
<p />I don&#8217;t think there&#8217;s a portable way to sync a specific filesystem (I don&#8217;t even know if there&#8217;s a good solution on Linux).  AFAIR, sync(2) is not required to wait until all the writes have completed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stephane Chauveau</title>
		<link>http://blogs.gnome.org/cneumair/2006/02/11/ioctl-fsync-how-to-flush-block-device-buffers/#comment-92</link>
		<dc:creator>Stephane Chauveau</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.gnome.org/cneumair/2006/02/11/ioctl-fsync-how-to-flush-block-device-buffers/#comment-92</guid>
		<description>What will happen if you try to remount the device? I would not be surprised if the remount was delayed until everything is properly flushed. If so, the proper unmounting procedure could be: umount , mount read-only , umount&lt;p/&gt;&lt;br/&gt; &lt;p/&gt;</description>
		<content:encoded><![CDATA[<p>What will happen if you try to remount the device? I would not be surprised if the remount was delayed until everything is properly flushed. If so, the proper unmounting procedure could be: umount , mount read-only , umount
<p /> 
<p />
]]></content:encoded>
	</item>
	<item>
		<title>By: Diego</title>
		<link>http://blogs.gnome.org/cneumair/2006/02/11/ioctl-fsync-how-to-flush-block-device-buffers/#comment-93</link>
		<dc:creator>Diego</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.gnome.org/cneumair/2006/02/11/ioctl-fsync-how-to-flush-block-device-buffers/#comment-93</guid>
		<description>AFAIK "umount /foo/bar" syncs things before returning. I think it'd be weird to keep data in the kernel (be it caches or dirty data or anything) for a filesystem that is _not_ mounted.&lt;p/&gt;&lt;br/&gt;But you probably should send this question to linux-kernel@vger.kernel.org (no subscription needed)</description>
		<content:encoded><![CDATA[<p>AFAIK &#8220;umount /foo/bar&#8221; syncs things before returning. I think it&#8217;d be weird to keep data in the kernel (be it caches or dirty data or anything) for a filesystem that is _not_ mounted.
<p />But you probably should send this question to <a href="mailto:linux-kernel@vger.kernel.org">linux-kernel@vger.kernel.org</a> (no subscription needed)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christian Neumair</title>
		<link>http://blogs.gnome.org/cneumair/2006/02/11/ioctl-fsync-how-to-flush-block-device-buffers/#comment-94</link>
		<dc:creator>Christian Neumair</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.gnome.org/cneumair/2006/02/11/ioctl-fsync-how-to-flush-block-device-buffers/#comment-94</guid>
		<description>&gt; AFAIK "umount /foo/bar" syncs things before returning&lt;p/&gt;no, it doesn't. eject does, though, it uses extra ioctl calls.&lt;p/&gt;&gt; I think it'd be weird to keep data in the kernel (be it caches or dirty data or anything) for a filesystem that is _not_ mounted.&lt;p/&gt;The file system is still mounted when I invoke one of the syscalls, it is done before the actual unmount.</description>
		<content:encoded><![CDATA[<p>> AFAIK &#8220;umount /foo/bar&#8221; syncs things before returning
<p />no, it doesn&#8217;t. eject does, though, it uses extra ioctl calls.
<p />> I think it&#8217;d be weird to keep data in the kernel (be it caches or dirty data or anything) for a filesystem that is _not_ mounted.
<p />The file system is still mounted when I invoke one of the syscalls, it is done before the actual unmount.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rudd-O</title>
		<link>http://blogs.gnome.org/cneumair/2006/02/11/ioctl-fsync-how-to-flush-block-device-buffers/#comment-95</link>
		<dc:creator>Rudd-O</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.gnome.org/cneumair/2006/02/11/ioctl-fsync-how-to-flush-block-device-buffers/#comment-95</guid>
		<description>Please read my proposed solution at:&lt;p/&gt;&lt;a href="http://rudd-o.com/archives/2006/02/13/fsync-on-unmount-solution/"&gt;http://rudd-o.com/archives/2006/02/13/fsync-on-unmount-solution/&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>Please read my proposed solution at:
<p /><a href="http://rudd-o.com/archives/2006/02/13/fsync-on-unmount-solution/">http://rudd-o.com/archives/2006/02/13/fsync-on-unmount-solution/</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
