Skip to content

Commit 38a0d87

Browse files
eryugeyliubogithub
authored andcommitted
passthroughfs: support "none" as cache policy
virtiofsd uses "none" as one of the cache policies, but passthroughfs uses "never". Support "none" as well to be compatible with virtiofsd's configuration. Signed-off-by: Eryu Guan <eguan@linux.alibaba.com>
1 parent db715a4 commit 38a0d87

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/passthrough/fs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ impl FromStr for CachePolicy {
199199

200200
fn from_str(s: &str) -> Result<Self, Self::Err> {
201201
match s {
202-
"never" | "Never" | "NEVER" => Ok(CachePolicy::Never),
202+
"never" | "Never" | "NEVER" | "none" | "None" | "NONE" => Ok(CachePolicy::Never),
203203
"auto" | "Auto" | "AUTO" => Ok(CachePolicy::Auto),
204204
"always" | "Always" | "ALWAYS" => Ok(CachePolicy::Always),
205205
_ => Err("invalid cache policy"),

0 commit comments

Comments
 (0)