On 5/16/24 17:22, Liu Kui wrote: > --- a/fs/fuse/kio/pcs/pcs_cs.h > +++ b/fs/fuse/kio/pcs/pcs_cs.h > @@ -159,7 +159,7 @@ unsigned int cs_get_avg_in_flight(struct pcs_cs *cs); > void pcs_csset_init(struct pcs_cs_set *css); > void pcs_csset_fini(struct pcs_cs_set *css); > > -struct pcs_cs *pcs_cs_alloc(struct pcs_cs_set *css, struct pcs_cluster_core > *cc); > +// struct pcs_cs *pcs_cs_alloc(struct pcs_cs_set *css, struct > pcs_cluster_core *cc); <<<<<< // comment? > > void cs_log_io_times(struct pcs_int_request *ireq, struct pcs_msg *resp, > unsigned int max_iolat); > int pcs_cs_format_io_times(char *buf, int buflen, struct pcs_int_request > *ireq, struct pcs_msg *resp); > void pcs_csa_cs_detach(struct pcs_cs * cs);
> + spin_lock(&krpc->lock); > + kreq->krpc = pcs_krpc_get(krpc); > + list_add_tail(&kreq->link, &krpc->pending_queue); > + spin_unlock(&krpc->lock); > + // DTRACE to be added > <<<<<< // comment? > + pcs_rpc_queue(krpc->rpc, msg); > + > + return 0; > + > +struct krpc_completion { > + struct list_head link; // in krpc->in_queue; > <<<<<< // comment? > + > + u64 xid; > + int result; > + > + void *private; > + int data_len; > + u8 _data_buf[0]; > +}; > +struct pcs_krpc_buf_desc { > + u64 addr; // buf address in userspace. > <<<<<< // comment? > + u32 len; // size of the buf > + u32 mr_id; // mr id > +}; > diff --git a/fs/fuse/kio/pcs/pcs_req.h b/fs/fuse/kio/pcs/pcs_req.h > index cdf1c9754803..886400fcaf1b 100644 > --- a/fs/fuse/kio/pcs/pcs_req.h > +++ b/fs/fuse/kio/pcs/pcs_req.h > @@ -18,6 +18,8 @@ > #include "fuse_ktrace_prot.h" > #include "fuse_stat.h" > #include "../../fuse_i.h" > +#include "pcs_mr.h" > +#include "pcs_krpc.h" > > /////////////////////////// > > @@ -287,6 +289,10 @@ struct pcs_cluster_core > //// struct pcs_ratelimit rlim; /* Rate limiter */ > <<<<< old code with // comments? > //// struct pcs_rng rng; > /* <SKIP */ > + > + struct pcs_mr_set mrs; /* Table of all MRs*/ > + struct pcs_krpc_set krpcs; /* Table of all KRPCs */ > + > +void pcs_rpc_clnt_close(struct pcs_rpc *ep) > +{ > + mutex_lock(&ep->mutex); > + BUG_ON(ep->flags & PCS_RPC_F_DEAD); > + BUG_ON(ep->flags & PCS_RPC_F_PASSIVE); > + > + ep->nr_clnts--; > + if (!ep->nr_clnts) { > + // close the rpc if we're the last rpc client > <<<<<< // comment? > + ep->flags |= PCS_RPC_F_DEAD; > + rpc_abort(ep, 1, PCS_ERR_NET_ABORT); > + ep->state = PCS_RPC_DESTROY; > + } _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel