Merge pull request #4858 from samuelkarp/freebsd-native-snapshotter

Support the native snapshotter on FreeBSD
This commit is contained in:
Maksym Pavlenko
2021-01-11 09:52:56 -08:00
committed by GitHub
5 changed files with 187 additions and 7 deletions

View File

@@ -327,12 +327,9 @@ func (o *snapshotter) mounts(s storage.Snapshot) []mount.Mount {
return []mount.Mount{
{
Source: source,
Type: "bind",
Options: []string{
roFlag,
"rbind",
},
Source: source,
Type: mountType,
Options: append(defaultMountOptions, roFlag),
},
}
}

View File

@@ -0,0 +1,23 @@
// +build !freebsd
/*
Copyright The containerd Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package native
const mountType = "bind"
var defaultMountOptions = []string{"rbind"}

View File

@@ -0,0 +1,23 @@
// +build freebsd
/*
Copyright The containerd Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package native
const mountType = "nullfs"
var defaultMountOptions = []string{}