When some incomplete write is detected during the mount, logfs try to recover
and look for a free segment but the list of free segment is populated only later.
This patch switch both function calls.
Signed-off-by: Tristan Lelong <tlelong@adeneo-embedded.com>
Signed-off-by: Prasad Joshi <prasadjoshi.linux@gmail.com>
if (err)
return err;
+ /* Do one GC pass before any data gets dirtied */
+ logfs_gc_pass(sb);
+
/* Check areas for trailing unaccounted data */
err = logfs_check_areas(sb);
if (err)
return err;
- /* Do one GC pass before any data gets dirtied */
- logfs_gc_pass(sb);
-
/* after all initializations are done, replay the journal
* for rw-mounts, if necessary */
err = logfs_replay_journal(sb);