Page MenuHomeFreeBSD

Deduplicate fsid comparisons
ClosedPublic

Authored by freqlabs on May 7 2020, 4:46 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Feb 17, 9:27 PM
Unknown Object (File)
Mon, Feb 17, 9:19 PM
Unknown Object (File)
Tue, Feb 11, 9:28 PM
Unknown Object (File)
Tue, Feb 11, 9:28 PM
Unknown Object (File)
Tue, Feb 11, 9:27 PM
Unknown Object (File)
Wed, Jan 29, 6:30 PM
Unknown Object (File)
Jan 23 2025, 4:09 PM
Unknown Object (File)
Jan 19 2025, 10:58 PM

Details

Summary

Comparing fsid_t objects requires internal knowledge of the fsid structure and yet this is duplicated across a number of places in the code.

Simplify by creating a fsidcmp function.

Sponsored by: iXsystems, Inc.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

freqlabs edited the summary of this revision. (Show Details)
freqlabs added reviewers: rmacklem, trasz, mjg.
freqlabs added a subscriber: mav.
sys/sys/mount.h
59 ↗(On Diff #71521)

I think it would be cleaner to just to turn this into an actual function.

59 ↗(On Diff #71521)

.. it can land in vfs_subr.c

sys/sys/mount.h
59 ↗(On Diff #71521)

I'll have to get it into userland somewhere, too.

freqlabs marked an inline comment as not done.May 8 2020, 2:52 PM
sys/sys/mount.h
59 ↗(On Diff #71521)

Oh, my bad. In that case just turn in into a macro. We can survive without type checking for this one but it can still be added "by hand". Then it can just "memcmp and the comment can be removed.

This revision is now accepted and ready to land.May 10 2020, 8:19 PM
This revision was automatically updated to reflect the committed changes.