Re: [PATCH] ubifs: Add freeze support

From: Richard Weinberger
Date: Mon May 29 2017 - 06:17:09 EST


Amir,

Am 29.05.2017 um 12:04 schrieb Amir Goldstein:
>> Well, UBIFS is a bit different.
>> The UBIFS journal is not an add-on feature, you have to replay it in
>> any case. Otherwise you're facing corrupted data.
>
> Yes, I suppose you are right.
> I guess there is no equivalent of mount -oro,{norecovery,noload} for
> ubifs.

Correct.

> I don't know the ubifs journal implementation details.
> Can ubifs_run_commit() when writers are frozen contribute to
> shorter journal replay time after boot with some workloads?

If the journal is empty then mounting will be faster, yes.
But I'm still interested in Hyunchul's use-case/problem.
Usually you run UBIFS in an embedded environment where you simple
never shutdown or reboot in a clean way. The power supply just
cut off.

On the other hand, if you want an empty journal for a faster mount,
just make sure that you umount upon shutdown.
Or make the size of the journal smaller at mkfs time.
Also see:

commit 27ad27993313312a4ad0047d0a944c425cd511a5
Author: Artem Bityutskiy <Artem.Bityutskiy@xxxxxxxxx>
Date: Thu Jan 29 16:34:30 2009 +0200

UBIFS: remove fast unmounting

This UBIFS feature has never worked properly, and it was a mistake
to add it because we simply have no use-cases. So, lets still accept
the fast_unmount mount option, but ignore it. This does not change
much, because UBIFS commit in sync_fs anyway, and sync_fs is called
while unmounting.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@xxxxxxxxx>

Thanks,
//richard