[Devel] [PATCH] fs/fuse kio: skip iostat count for unknown req types

Kirill Tkhai ktkhai at virtuozzo.com
Fri May 31 19:06:34 MSK 2019


On 31.05.2019 12:23, Pavel Butsykin wrote:
> There are still some number of response req types:
> PCS_CS_WRITE_ZERO_RESP
> PCS_CS_WRITE_HOLE_RESP
> PCS_CS_REPLICATEX_RESP
> PCS_CS_FIEMAP_RESP
> PCS_CS_MAP_PROP_RESP
> 
> It makes no sense to count statistics for such requests, so for them the stat
> count will simply be skipped.
> 
> Signed-off-by: Pavel Butsykin <pbutsykin at virtuozzo.com>
> ---
>  fs/fuse/kio/pcs/fuse_stat.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/fs/fuse/kio/pcs/fuse_stat.c b/fs/fuse/kio/pcs/fuse_stat.c
> index 06be3c75240c..31ff73d6c3dc 100644
> --- a/fs/fuse/kio/pcs/fuse_stat.c
> +++ b/fs/fuse/kio/pcs/fuse_stat.c
> @@ -654,7 +654,6 @@ struct fuse_val_stat *req_stat_entry(struct pcs_fuse_io_stat *io, u32 type)
>  		default:
>  			break;
>  	}
> -	WARN_ON_ONCE(1);
>  	return NULL;
>  }
>  
> @@ -663,9 +662,11 @@ static void fuse_iostat_count(struct pcs_fuse_io_stat_sync *iostat,
>  {
>  	struct fuse_val_stat *se;
>  
> -	write_seqlock(&iostat->seqlock);
>  	se = req_stat_entry(iostat->CURR(iostat), type);

Shouldn't iostat->CURR(iostat) be obtained under seqlock?


More information about the Devel mailing list