Add support for multiple lines to the sharenfs property for FreeBSD #16338
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There has been a bugzilla PR#147881 requesting this for a long time (14 years!). It extends the syntax of the ZFS shanenfs property (for FreeBSD only) to allow multiple sets of options for different hosts/nets, separated by ';'s.
Signed-off-by: Rick Macklem [email protected]
Motivation and Context
On FreeBSD, exports with separate sets of options can be provided for the
same file system for different hosts/subnets. A FreeBSD bugzilla PR to allow ZFS's sharenfs
property to do this has existed for 14years.
Description
Allows multiple sets of export options to be expressed in the sharenfs property
separated by semicolons. Each set generates a line in /etc/zfs/exports.
The patch also replaces the use of arrays of size OPTSSIZE with malloc'd arrays
to hold the option lists. This change was suggested by [email protected].
How Has This Been Tested?
A variety of settings for the sharenfs property, with and without semicolons in
it were tried on FreeBSD and the resultant /etc/zfs/exports was checked for
correctness.
Types of changes
Checklist:
Signed-off-by
.