Description
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.