xfs
[Top] [All Lists]

Re: Xfs_repair and journalling -- EXT4 journal replay discussion

To: stan@xxxxxxxxxxxxxxxxx
Subject: Re: Xfs_repair and journalling -- EXT4 journal replay discussion
From: Stan Hoeppner <stan@xxxxxxxxxxxxxxxxx>
Date: Sat, 30 Mar 2013 07:49:54 -0500
Cc: Martin Steigerwald <Martin@xxxxxxxxxxxx>, Eric Sandeen <sandeen@xxxxxxxxxxx>, Subranshu Patel <spatel.ml@xxxxxxxxx>, xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <51483A7D.9050202@xxxxxxxxxxxxxxxxx>
References: <CAEUQceh-Xcabr0KErxF6EAdafDDP1PY_AeHwgYB82QeUdyGp-g@xxxxxxxxxxxxxx> <5147E360.10605@xxxxxxxxxxx> <5148037B.5010706@xxxxxxxxxxxxxxxxx> (sfid-20130319_091205_759083_BA6F1AD2) <201303190924.29362.Martin@xxxxxxxxxxxx> <51483A7D.9050202@xxxxxxxxxxxxxxxxx>
Reply-to: stan@xxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130307 Thunderbird/17.0.4
On 3/19/2013 5:14 AM, Stan Hoeppner wrote:
> On 3/19/2013 3:24 AM, Martin Steigerwald wrote:
...
>> Heck, even I was confused at first. Cause the manpage of fsck.ext4 IMHO is 
>> not really clear about that topic to say the least. I tested it out for a 
>> reason.
> 
> I already contacted Ted off list hoping he can point me to the relevant
> kernel documentation, so I don't make such a mistake again with EXT.

Ok, so here's the skinny on the source of our confusion WRT how/when
EXT4 replays journals, and it's rather interesting.  Ted Ts'o explained
the following.

The EXT4 kernel module does have code to perform journal replay, but it
is rarely executed.  The reasons for this are:

1.  EXT4 journal replay can take a lot of time (whereas XFS is instant)
2.  EXT4 systems tend to have multiple filesystems, often one per drive
    (whereas XFS systems tend to have few filesystems)
3.  Linux mounts filesystems serially during startup

To prevent potentially lengthy boot times, the init scripts run e2fsck
to replay all EXT4 filesystem journals in parallel, well before the
mount stage.  Thus the only case where the EXT4 kernel module performs
journal replay is when doing a mount while the system is running, e.g.
USB hard drive.

There are other reasons e2fsck was chosen to perform journal replay at
boot in addition to the speed issue, but as I understood Ted this is the
main reason.

-- 
Stan

<Prev in Thread] Current Thread [Next in Thread>