virtiofsd: passthrough_ll: disable readdirplus on cache=never

...because the attributes sent in the READDIRPLUS reply would be discarded
anyway.

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
This commit is contained in:
Miklos Szeredi 2018-08-16 11:14:13 +02:00 committed by Dr. David Alan Gilbert
parent f0ab7d6f78
commit ddcbabcb0e
1 changed files with 4 additions and 0 deletions

View File

@ -478,6 +478,10 @@ static void lo_init(void *userdata, struct fuse_conn_info *conn)
fuse_log(FUSE_LOG_DEBUG, "lo_init: activating flock locks\n");
conn->want |= FUSE_CAP_FLOCK_LOCKS;
}
if (lo->cache == CACHE_NEVER) {
fuse_log(FUSE_LOG_DEBUG, "lo_init: disabling readdirplus\n");
conn->want &= ~FUSE_CAP_READDIRPLUS;
}
}
static void lo_getattr(fuse_req_t req, fuse_ino_t ino,