<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Tribulaciones.org &#187; delayed allocation</title>
	<atom:link href="http://tribulaciones.org/tag/delayed-allocation/feed/" rel="self" type="application/rss+xml" />
	<link>http://tribulaciones.org</link>
	<description>A blog about me and whatever insterests me</description>
	<lastBuildDate>Wed, 27 Jan 2010 22:12:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Is ext4 unsafe?</title>
		<link>http://tribulaciones.org/2009/03/is-ext4-unsafe/</link>
		<comments>http://tribulaciones.org/2009/03/is-ext4-unsafe/#comments</comments>
		<pubDate>Thu, 19 Mar 2009 20:13:22 +0000</pubDate>
		<dc:creator>jsogo</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[delayed allocation]]></category>
		<category><![CDATA[ext4]]></category>
		<category><![CDATA[zero file length]]></category>

		<guid isPermaLink="false">http://tribulaciones.org/?p=115</guid>
		<description><![CDATA[There has been a lot of hype about ext4 lately, following an Ubuntu bug which rose a lot of concerns about ext4 security. I know these are no news, and I know also that I am not a kernel guru, but let&#8217;s resume some important concepts.
Ext4 implements something called allocate-on-flush. This means that kernel will [...]]]></description>
			<content:encoded><![CDATA[<p>There has been a lot of hype about ext4 lately, following an <a href="https://bugs.launchpad.net/ubuntu/+source/linux/+bug/317781?comments=all">Ubuntu bug</a> which rose a lot of concerns about ext4 security. I know these are no news, and I know also that I am not a kernel guru, but let&#8217;s resume some important concepts.<br />
<a href="http://en.wikipedia.org/wiki/Ext4">Ext4</a> implements something called <a href="http://en.wikipedia.org/wiki/Allocate-on-flush">allocate-on-flush</a>. This means that kernel will decide how to write to disk in an efficient way by batching allocations together in larger runs. It increases performance and reduces fragmentation. But if a system crash happens between metadata and data is actually written to disk a 0-size length file can be found in the filesystem. With ext3 journal had a default timeout of 5 seconds and then was flushed to disk. With ext4 this time is unknown, so appplications that want to ensure everything is on disk have to call fsync() on file and directory after every operation. To avoid this, a series of patches have been queued for 2.6.30 so when a file is going to be replaced, it is written to disk with no delay.<br />
Another concern raised is the need for <em>atomicity and durability</em> of files. For achieving this applications have first to write a temporary file and then rename() it over the old file. This will ensure that new or old file will be found in the filesystem after a crash, instead of a corrupted file that can be found when it is opened with O_TRUNC.<br />
Anyway, my opinion is that when choosing a filesystem, one have to know what the computer is going to be used for. Using binary propietary drivers is an option, which can lead your Linux installation to behave most like Vista and filesystem cannot be blamed for losing files if it is making its job as designed. Perhaps, it&#8217;s better to use ext3 in this situation, but at the cost of missing performance.<br />
If you want to learn more about this issues I recommend you to read both articles by Theodore Tso, <em><a href="http://thunk.org/tytso/blog/2009/03/12/delayed-allocation-and-the-zero-length-file-problem">&#8220;Delayed allocation and the zero-length file problem&#8221;</a></em> and <em><a href="http://thunk.org/tytso/blog/2009/03/15/dont-fear-the-fsync">&#8220;Don’t fear the fsync!&#8221;</a></em> and also <del datetime="2009-03-20T08:59:03+00:00">Alessander</del>Alexander Larsson&#8217;s one <em><a href="http://blogs.gnome.org/alexl/2009/03/16/ext4-vs-fsync-my-take">&#8220;ext4 vs fsync, my take&#8221;</a></em> as well as comment in all of them.</p>
]]></content:encoded>
			<wfw:commentRss>http://tribulaciones.org/2009/03/is-ext4-unsafe/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- www.000webhost.com Analytics Code -->
<script type="text/javascript" src="http://analytics.hosting24.com/count.php"></script>
<noscript><a href="http://www.hosting24.com/"><img src="http://analytics.hosting24.com/count.php" alt="web hosting" /></a></noscript>
<!-- End Of Analytics Code -->
