You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now that fwupd and other tools potentially also mount and unmount /boot, we need to assure that, while manipulations are made, the filesystem isn't unmounted by someone else.
The easiest and cleanest solution @fenrus75 and me came up with at lunch is to use opendir() and keep the DIR entry open as long as operations are proceeding.
The reason we don't want to lock a file is because we don't want to create lockfiles for no reason.
opendir() will prevent unmounting. We can lazy unmount as well to further make things more reliable.
DIR *d = opendir("/boot/loader");
//do work
closedir(d);
The text was updated successfully, but these errors were encountered:
Now that
fwupd
and other tools potentially also mount and unmount/boot
, we need to assure that, while manipulations are made, the filesystem isn't unmounted by someone else.The easiest and cleanest solution @fenrus75 and me came up with at lunch is to use
opendir()
and keep theDIR
entry open as long as operations are proceeding.The reason we don't want to lock a file is because we don't want to create lockfiles for no reason.
opendir()
will prevent unmounting. We can lazy unmount as well to further make things more reliable.The text was updated successfully, but these errors were encountered: