[Devel] [PATCH] fs/fuse kio: skip iostat count for unknown req types
Pavel Butsykin
pbutsykin at virtuozzo.com
Fri May 31 12:23:44 MSK 2019
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);
- BUG_ON(!se);
+ if (!se)
+ return;
+
+ write_seqlock(&iostat->seqlock);
fuse_val_stat_update(se, size);
write_sequnlock(&iostat->seqlock);
}
--
2.15.1
More information about the Devel
mailing list