Skip to content

While having boot.mount active, CBM should "lock" it. #184

Open
@ahkok

Description

@ahkok

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);

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions