Commit 06db44c
bind is not a valid mount type
Per spec, "bind" is not a valid mount type. To use bind mount,
the spec compatible way is to set either "bind" or "rbind"
in the mount options.
Although in practice, setting the type as "bind" won't actually
cause an error (at the moment using runc, as well as the system
call mount(7) itself) as long as either "bind" or "rbind" is set
as well, it provide an incorrect example that "bind" is avalid
type, and make people think following config is a valid one for
bind mount, which in fact will throw an error in runc.
{
"destination": "/data",
"type": "bind"
"source": "/volumes/testing",
}
[1] tried to automatically add a MS_BIND flag when the type is "bind"
but was rejected on the ground it "encourage" the incorrect usage of
bind as the mount type, which I agree. Hence, here I change the example
in the spec in the hope making it clearer that for bind mount to work,
we should use the correct mount options, instead of the "bind" mount type.
[1]opencontainers/runc#1799
Signed-off-by: Bin Chen <nk@devicu.com>1 parent a1998ec commit 06db44c
1 file changed
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
119 | 118 | | |
120 | 119 | | |
121 | 120 | | |
| |||
0 commit comments