Re: [PATCH] ubifs: Add freeze support
From: Amir Goldstein
Date: Mon May 29 2017 - 07:44:57 EST
On Mon, May 29, 2017 at 1:17 PM, Richard Weinberger <richard@xxxxxx> wrote:
> 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.
Makes sense.
> 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.
So you see, unmount upon shutdown is not always an option
when you are in a system where not all tasks are killed before
attempting to unmount (or even attempting to remounr,ro).
This is what Darrick's patch was all about.
Maybe there is no such embedded system...
With the numbers of different embedded systems going to infinity,
the probability of no "such embedded system" is unlikely.
FIFREEZE gives a privileged process the ability to checkpoint the
journal (e.g. for shorter mount time) and reboot without having to
kill all other processes in the system first.
Amir.