2008-06-14 07:57:51

by Gary Hawco

[permalink] [raw]
Subject: How to switch ext4 to ordered_data mode

Ted,

I notice that ext4dev defaults to data=writeback mode. This is in contrast
to ext3 which uses ordered data mode. Tune2fs from git does not seem to be
able to change this using "tune2fs -o ^journal_data_writeback /dev/sdaX"
followed by "tune2fs -o journal_data_ordered /dev/sdaX.

Is this change intentional or a not yet worked out bug?

Thanks,
Gary Hawco



2008-06-14 08:53:51

by Aneesh Kumar K.V

[permalink] [raw]
Subject: Re: How to switch ext4 to ordered_data mode

On Sat, Jun 14, 2008 at 12:39:35AM +0000, Gary Hawco wrote:
> Ted,
>
> I notice that ext4dev defaults to data=writeback mode. This is in contrast
> to ext3 which uses ordered data mode. Tune2fs from git does not seem to be
> able to change this using "tune2fs -o ^journal_data_writeback /dev/sdaX"
> followed by "tune2fs -o journal_data_ordered /dev/sdaX.
>
> Is this change intentional or a not yet worked out bug?
>

With delayed allocation we currently support only writeback mode. We enable
delayed allocation by default with the latest patches. The intention is
to get these new features test well enough before they can be pushed
upstream. Since we enable delalloc by default we also force writeback
mode. You should be able to disable them by -o nodelalloc,data=ordered
mount option. I have patches which support ordered mode with delalloc. Once we get
those patches in we should be able to remove forcing writeback mode with delalloc.


-aneesh