qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 068/104] virtiofsd: passthrough_ll: control readdirplus


From: Daniel P . Berrangé
Subject: Re: [PATCH 068/104] virtiofsd: passthrough_ll: control readdirplus
Date: Tue, 7 Jan 2020 11:23:16 +0000
User-agent: Mutt/1.12.1 (2019-06-15)

On Thu, Dec 12, 2019 at 04:38:28PM +0000, Dr. David Alan Gilbert (git) wrote:
> From: Miklos Szeredi <address@hidden>
>

What is readdirplus and what do we need a command line option to
control it ? What's the user benefit of changing the setting ?

> Signed-off-by: Miklos Szeredi <address@hidden>
> ---
>  tools/virtiofsd/passthrough_ll.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/virtiofsd/passthrough_ll.c 
> b/tools/virtiofsd/passthrough_ll.c
> index 0d70a367bd..c3e8bde5cf 100644
> --- a/tools/virtiofsd/passthrough_ll.c
> +++ b/tools/virtiofsd/passthrough_ll.c
> @@ -118,6 +118,8 @@ struct lo_data {
>      double timeout;
>      int cache;
>      int timeout_set;
> +    int readdirplus_set;
> +    int readdirplus_clear;
>      struct lo_inode root; /* protected by lo->mutex */
>      struct lo_map ino_map; /* protected by lo->mutex */
>      struct lo_map dirp_map; /* protected by lo->mutex */
> @@ -141,6 +143,8 @@ static const struct fuse_opt lo_opts[] = {
>      { "cache=auto", offsetof(struct lo_data, cache), CACHE_NORMAL },
>      { "cache=always", offsetof(struct lo_data, cache), CACHE_ALWAYS },
>      { "norace", offsetof(struct lo_data, norace), 1 },
> +    { "readdirplus", offsetof(struct lo_data, readdirplus_set), 1 },
> +    { "no_readdirplus", offsetof(struct lo_data, readdirplus_clear), 1 },
>      FUSE_OPT_END
>  };
>  static bool use_syslog = false;
> @@ -479,7 +483,8 @@ 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) {
> +    if ((lo->cache == CACHE_NEVER && !lo->readdirplus_set) ||
> +        lo->readdirplus_clear) {
>          fuse_log(FUSE_LOG_DEBUG, "lo_init: disabling readdirplus\n");
>          conn->want &= ~FUSE_CAP_READDIRPLUS;
>      }
> -- 
> 2.23.0
> 
> 

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




reply via email to

[Prev in Thread] Current Thread [Next in Thread]