Page MenuHomeFreeBSD

Deduplicate fsid comparisons
ClosedPublic

Authored by freqlabs on May 7 2020, 4:46 PM.
Tags
None
Referenced Files
F103643505: D24749.id72061.diff
Wed, Nov 27, 1:45 PM
Unknown Object (File)
Sun, Nov 24, 3:08 PM
Unknown Object (File)
Thu, Nov 14, 4:40 PM
Unknown Object (File)
Oct 23 2024, 4:55 AM
Unknown Object (File)
Oct 22 2024, 10:35 PM
Unknown Object (File)
Oct 7 2024, 11:58 PM
Unknown Object (File)
Oct 7 2024, 11:33 PM
Unknown Object (File)
Oct 2 2024, 5:57 AM

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 Skipped
Unit
Tests Skipped

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

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

59

.. it can land in vfs_subr.c

sys/sys/mount.h
59

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

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.