Skip to content

lfs_fs_forceconsistency()->lfs_fs_deorphan() doesn't commit updated gstate #604

Open
@kasper0

Description

@kasper0

Hi,
while debugging the lfs, I've noticed that lfs_fs_forceconsistency()->lfs_fs_deorphan() doesn't commit updated gstate after fixing orphans. The responsibility for saving new gstate lies with a function calling lfs_fs_forceconsistency(), but it fails if the function returns before making a commit (e.g. mkdir() when the directory already exists).

Unfortunately, it takes a long time to perform the consistency check on systems with limited resources and dozens of files. As a result, if the issue mentioned above occurs followed by a reboot or power outage, time will be wasted on another consistency check (in my case, 1600 files/ 30minutes).

Moreover, it would be great to perform the consistency check directly from API without using the side effect of mkdir/open/remove/rename.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions