ext3 Bug in 2.4.20

Net Llama! netllama
Mon May 17 11:41:02 PDT 2004


Another great reason to be using XFS.  ext3 is starting to look more & 
more like a toy FS.

On 12/01/02 19:21, kwall at kurtwerks.com wrote:
> Eew. Just when I thought I liked ext3:
> 
> -----
> From: Andrew Morton
> To: linux-kernel Mailing List
> Subject: data corrupting bug in 2.4.20 ext3, data=journal
> Date: Sun Dec 01 2002 - 03:11:41 EST
> 
> In 2.4.20-pre5 an optimisation was made to the ext3 fsync function
> which can very easily cause file data corruption at unmount time. This
> was first reported by Nick Piggin on November 29th (one day after 2.4.20 was
> released, and three months after the bug was merged. Unfortunate timing)
> 
> This only affects filesystems which were mounted with the `data=journal'
> option. Or files which are operating under `chattr -j'. So most people
> are unaffected. The problem is not present in 2.5 kernels.
> The symptoms are that any file data which was written within the thirty
> seconds prior to the unmount may not make it to disk. A workaround
> is to run `sync' before nmounting.
> 
> The optimisation was intended to avoid writing out and waiting on the
> inode's buffers when the subsequent commit would do that anyway. This
> optimisation was applied to both data=journal and data=ordered modes.
> But it is only valid for data=ordered mode.
> 
> In data=journal mode the data is left dirty in memory and the unmount
> will silently discard it.
> -----
> 
> A posted patch didn't fix the problem. So, don't use "data=journal"
> mode. The default is "data=ordered" mode, but I'm still distressed.
> Fortunately, I'm at 2.4.20-pre3 and didn't roll the 2.4.20 bits when
> they were released. Looks like 2.4.21 can't be far behind. ;-)
> 
> Kurt

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
L. Friedman                       	       netllama at linux-sxs.org
Linux Step-by-step & TyGeMo: 		    http://netllama.ipfox.com

   7:45pm  up  5:23,  1 user,  load average: 0.15, 0.15, 0.27



More information about the Linux-users mailing list