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, Apr 11, 1:47 PM
Unknown Object (File)
Thu, Apr 11, 10:43 AM
Unknown Object (File)
Thu, Apr 11, 9:06 AM
Unknown Object (File)
Mon, Apr 8, 3:29 AM
Unknown Object (File)
Sun, Apr 7, 5:41 PM
Unknown Object (File)
Mar 11 2024, 5:11 AM
Unknown Object (File)
Jan 17 2024, 6:16 PM
Unknown Object (File)
Jan 4 2024, 6:36 AM

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.