[Devel] [PATCH VZ9 15/20] fuse: do not accelerate writes with unknown dirty state

Alexey Kuznetsov kuznet at virtuozzo.com
Fri Oct 6 13:43:48 MSK 2023


If we have no sync seq numbers we cannot force dirty status.
So, route writes via slow path. When CSes reply with dirty seqs,
we will be able to make shortcut.

Signed-off-by: Alexey Kuznetsov <kuznet at acronis.com>
---
 fs/fuse/kio/pcs/pcs_cs_accel.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/fs/fuse/kio/pcs/pcs_cs_accel.c b/fs/fuse/kio/pcs/pcs_cs_accel.c
index 6db4562..d47486d 100644
--- a/fs/fuse/kio/pcs/pcs_cs_accel.c
+++ b/fs/fuse/kio/pcs/pcs_cs_accel.c
@@ -1123,6 +1123,9 @@ struct pcs_int_request * pcs_csa_csl_write_submit(struct pcs_int_request * ireq)
 	ireq_init_acr(ireq);
 
 	for (idx = 0; idx < csl->nsrv; idx++) {
+		/* If dirty status is unknown go to slow path to get a seed */
+		if (csl->cs[idx].sync.dirty_seq == 0)
+			break;
 		if (!csa_cs_submit_write(ireq, idx))
 			break;
 	}
@@ -1171,6 +1174,8 @@ int pcs_csa_csl_write_submit_single(struct pcs_int_request * ireq, int idx)
 {
 	if (idx >= PCS_MAX_ACCEL_CS)
 		return 0;
+	if (ireq->iochunk.csl->cs[idx].sync.dirty_seq == 0)
+		return 0;
 
 	ireq_init_acr(ireq);
 
-- 
1.8.3.1



More information about the Devel mailing list