[Devel] [PATCH RHEL7 COMMIT] fio kio: PCS unblock writepath

Konstantin Khorenko khorenko at virtuozzo.com
Mon Feb 19 14:22:34 MSK 2018


The commit is pushed to "branch-rh7-3.10.0-693.17.1.vz7.45.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-693.17.1.vz7.43.7
------>
commit aa5dd928f638ec6701445f6821aa7fce3b78b52a
Author: Dmitry Monakhov <dmonakhov at openvz.org>
Date:   Mon Feb 19 14:22:34 2018 +0300

    fio kio: PCS unblock writepath
    
    https://jira.sw.ru/browse/PSBM-80680
    Signed-off-by: Dmitry Monakhov <dmonakhov at openvz.org>
---
 fs/fuse/kio/pcs/pcs_fuse_kdirect.c | 14 +++++---------
 fs/fuse/kio/pcs/pcs_map.c          |  2 --
 2 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/fs/fuse/kio/pcs/pcs_fuse_kdirect.c b/fs/fuse/kio/pcs/pcs_fuse_kdirect.c
index f7226021d469..1b21fc9f9ffe 100644
--- a/fs/fuse/kio/pcs/pcs_fuse_kdirect.c
+++ b/fs/fuse/kio/pcs/pcs_fuse_kdirect.c
@@ -593,9 +593,9 @@ static void pcs_fuse_submit(struct pcs_fuse_cluster *pfc, struct fuse_req *req,
 	switch (r->req.in.h.opcode) {
 	case FUSE_WRITE: {
 		struct fuse_write_in *in = &r->req.misc.write.in;
-		struct fuse_write_out *out = &r->req.misc.write.out;
-		out->size = in->size;
-		break;
+
+		pcs_fuse_prep_io(r, PCS_REQ_T_WRITE, in->offset, in->size);
+		goto submit;
 	}
 	case FUSE_READ: {
 		struct fuse_read_in *in = &r->req.misc.read.in;
@@ -612,8 +612,8 @@ static void pcs_fuse_submit(struct pcs_fuse_cluster *pfc, struct fuse_req *req,
 		goto submit;
 	}
 	case FUSE_FSYNC:
-		/*NOOP */
-		break;
+		pcs_fuse_prep_io(r, PCS_REQ_T_SYNC, 0, 0);
+		goto submit;
 	}
 	r->req.out.h.error = 0;
 	DTRACE("do fuse_request_end req:%p op:%d err:%d\n", &r->req, r->req.in.h.opcode, r->req.out.h.error);
@@ -661,10 +661,6 @@ int kpcs_req_send(struct fuse_conn* fc, struct fuse_req *req, bool bg, bool lk)
 	if (!fi->private)
 		return 1;
 
-	/* TODO, fetch only read requests for now */
-	if (req->in.h.opcode != FUSE_READ)
-		return 1;
-
 	__clear_bit(FR_BACKGROUND, &req->flags);
 	__clear_bit(FR_PENDING, &req->flags);
 	/* request_end below will do fuse_put_request() */
diff --git a/fs/fuse/kio/pcs/pcs_map.c b/fs/fuse/kio/pcs/pcs_map.c
index 32cfd073befd..98b8357c5c2b 100644
--- a/fs/fuse/kio/pcs/pcs_map.c
+++ b/fs/fuse/kio/pcs/pcs_map.c
@@ -2136,7 +2136,6 @@ int pcs_cslist_submit(struct pcs_int_request *ireq, struct pcs_cs_list *csl, int
 	BUG_ON(!atomic_read(&csl->refcnt));
 
 	if (ireq->type == PCS_IREQ_FLUSH) {
-		BUG();
 		return pcs_cslist_submit_flush(ireq, csl, requeue);
 	} else if (!ireq->iochunk.direction) {
 		return pcs_cslist_submit_read(ireq, csl, requeue);
@@ -2144,7 +2143,6 @@ int pcs_cslist_submit(struct pcs_int_request *ireq, struct pcs_cs_list *csl, int
 		BUG();
 		return -EIO;
 	} else {
-		BUG();
 		return pcs_cslist_submit_write(ireq, csl, requeue);
 	}
 	BUG();


More information about the Devel mailing list