Page MenuHomeFreeBSD

rc.d/linux: Attempt to mount only if necessary
ClosedPublic

Authored by 0mp on Oct 12 2021, 8:49 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 7, 1:09 PM
Unknown Object (File)
Thu, Nov 7, 1:09 PM
Unknown Object (File)
Wed, Nov 6, 6:27 PM
Unknown Object (File)
Mon, Nov 4, 9:04 AM
Unknown Object (File)
Oct 15 2024, 12:57 AM
Unknown Object (File)
Oct 13 2024, 3:51 PM
Unknown Object (File)
Oct 13 2024, 8:04 AM
Unknown Object (File)
Oct 11 2024, 1:41 PM

Details

Summary

Currently, if the linux service is run twice, mount fails with:

mount: linprocfs: Device busy
mount: linsysfs: Device busy
mount: devfs: Device busy
mount: fdescfs: Device busy
mount: tmpfs: Device busy

Additionally, the exit code of service linux start is 1 in such a case.

It is a bit more user-friendly if before running mount(8) the service
checks if there are any file systems let to be mounted.

Test Plan

The service still mounts file systems as before. Invoking service linux start for the second time no longer prints out error messages.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

0mp requested review of this revision.Oct 12 2021, 8:49 AM

There is a somewhat related issue in https://reviews.freebsd.org/D26240. Do you think you could fix it as well, by throwing in an mkdir(1) somewhere in linux_mount?

This revision is now accepted and ready to land.Nov 13 2021, 2:25 PM

There is a somewhat related issue in https://reviews.freebsd.org/D26240. Do you think you could fix it as well, by throwing in an mkdir(1) somewhere in linux_mount?

Sure thing.

This revision was automatically updated to reflect the committed changes.

I think so, yeah. Please make sure to test it though; iirc previously the “nocover” option support wasn’t MFC-ed and I had to work around it.

I'll see to it when I have some time. If anyone wants to MFC that earlier than let me know or just commandeer it straight away.

Noting to ease confusion that trhodes' commit was for D32436, not this.