Page MenuHomeFreeBSD

autounmountd: set filter-specific flags for the EVFILT_FS event
ClosedPublic

Authored by rew on Feb 27 2021, 7:47 PM.
Tags
None
Referenced Files
F109282884: D28975.diff
Mon, Feb 3, 12:46 AM
Unknown Object (File)
Mon, Jan 13, 7:22 PM
Unknown Object (File)
Dec 18 2024, 12:15 PM
Unknown Object (File)
Dec 11 2024, 3:17 PM
Unknown Object (File)
Dec 4 2024, 3:22 AM
Unknown Object (File)
Dec 2 2024, 2:12 PM
Unknown Object (File)
Dec 2 2024, 2:12 PM
Unknown Object (File)
Dec 2 2024, 2:12 PM
Subscribers

Details

Summary

Set the filter-specific flags VQ_MOUNT and VQ_UNMOUNT for the
EVFILT_FS event.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 37444
Build 34333: arc lint + arc unit

Event Timeline

Thank you, but why?

This is more about the commit message than the code itself; I don't remember how kevent works for mount/umount events, and it's not documented in the kqueue(2) man page. In particular, does it fix a bug, or is an API-correctness fix that doesn't change semantics?

Looks like related to D28974, in which case it looks fine.

This revision is now accepted and ready to land.Mar 2 2021, 7:29 PM

Looks like related to D28974, in which case it looks fine.

yep, cool - thanks.

D28974 is a bug fix for the EVFILT_FS filter - the bug was that kevents registered for EVFILT_FS were triggered for every EVFILT_FS event, regardless of the fflags specified.

After the fix in D28974, autounmountd wasn't being notified of any kevents (since fflags was 0) - so this review fixes that.

couple other things:

EV_CLEAR could be removed here since it's set by default for EVFILT_FS events - as you know, it doesn't hurt to leave it there though..

noted about the lack of documentation for EVFILT_FS in kqueue(2), will add it to the TODO list..