[Devel] [PATCH RHEL7 COMMIT] fuse kio: Revert "fuse: Move FUSE_DESTROY request handling in conn_abort"
Konstantin Khorenko
khorenko at virtuozzo.com
Mon Jun 18 13:00:36 MSK 2018
The commit is pushed to "branch-rh7-3.10.0-862.3.2.vz7.61.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-862.3.2.vz7.61.3
------>
commit bf49aa74e7c766ebde3cc30b985f40ce58ad6364
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date: Mon Jun 18 13:00:36 2018 +0300
fuse kio: Revert "fuse: Move FUSE_DESTROY request handling in conn_abort"
This reverts commit 58d18acf7cd024dbb5fe8c11c2829c10521b387f.
fuse_conn_abort() is also called from fuse_umount_begin(),
so we can't destroy kio connection from conn_abort().
https://pmc.acronis.com/browse/VSTOR-11187
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
fs/fuse/dev.c | 5 ++---
fs/fuse/kio/pcs/pcs_fuse_kdirect.c | 17 ++++++++++++-----
2 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
index f1388ec573ec..707ac13ca52d 100644
--- a/fs/fuse/dev.c
+++ b/fs/fuse/dev.c
@@ -2218,6 +2218,8 @@ void fuse_abort_conn(struct fuse_conn *fc)
list_splice_init(&fpq->processing, &to_end2);
spin_unlock(&fpq->lock);
}
+ if (fc->kio.op)
+ fc->kio.op->conn_abort(fc);
fc->max_background = UINT_MAX;
for_each_online_cpu(cpu)
@@ -2239,9 +2241,6 @@ void fuse_abort_conn(struct fuse_conn *fc)
request_end(fc, req);
}
end_requests(fc, &to_end2);
-
- if (fc->kio.op)
- fc->kio.op->conn_abort(fc);
} else {
spin_unlock(&fc->lock);
}
diff --git a/fs/fuse/kio/pcs/pcs_fuse_kdirect.c b/fs/fuse/kio/pcs/pcs_fuse_kdirect.c
index 797f07be7a82..af82b043f786 100644
--- a/fs/fuse/kio/pcs/pcs_fuse_kdirect.c
+++ b/fs/fuse/kio/pcs/pcs_fuse_kdirect.c
@@ -148,11 +148,9 @@ void kpcs_conn_abort(struct fuse_conn *fc)
if (!fc->kio.ctx)
return;
- /* TODO: This is just a crunch, Conn cleanup requires sane locking */
- kpcs_conn_fini(fc);
- spin_lock(&fc->lock);
- fc->kio.ctx = NULL;
- spin_unlock(&fc->lock);
+ //pcs_cluster_fini((struct pcs_fuse_cluster *) fc->kio.ctx);
+ printk("%s TODO: implement this method\n", __FUNCTION__);
+
}
static int kpcs_probe(struct fuse_conn *fc, char *name)
@@ -1004,6 +1002,15 @@ static int kpcs_req_send(struct fuse_conn* fc, struct fuse_req *req, bool bg, bo
TRACE(" Enter req:%p op:%d end:%p bg:%d lk:%d\n", req, req->in.h.opcode, req->end, bg, lk);
+ /* TODO: This is just a crunch, Conn cleanup requires sane locking */
+ if (req->in.h.opcode == FUSE_DESTROY) {
+ kpcs_conn_fini(fc);
+ spin_lock(&fc->lock);
+ fc->kio.ctx = NULL;
+ spin_unlock(&fc->lock);
+ return 1;
+ }
+
if (!fi || !fi->private)
return 1;
More information about the Devel
mailing list