Motr  M0
sw_fop.c
Go to the documentation of this file.
1 /* -*- C -*- */
2 /*
3  * Copyright (c) 2016-2020 Seagate Technology LLC and/or its Affiliates
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  * For any questions about this software or licensing,
18  * please email opensource@seagate.com or cortx-questions@seagate.com.
19  *
20  */
21 
22 
23 
24 #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_DIX
25 #include "lib/trace.h"
26 
27 #include "fop/fop.h"
28 
29 #include "cm/cm.h"
30 
33 
34 #include "cm/repreb/sw_onwire_fop_xc.h"
35 
44 extern struct m0_cm_type dix_rebalance_cmt;
45 
46 static int dix_rebalance_sw_fom_create(struct m0_fop *fop, struct m0_fom **m,
47  struct m0_reqh *reqh)
48 {
49  struct m0_fop *r_fop;
50  int rc;
51 
53  if (r_fop == NULL)
54  return M0_ERR(-ENOMEM);
56 
57  return M0_RC(rc);
58 }
59 
62 };
63 
66 {
70  "dix cm sw update fop",
71  m0_cm_sw_onwire_xc,
77  "dix cm sw update rep fop",
78  m0_cm_sw_onwire_rep_xc,
81 }
82 
85 {
88 }
89 
91 M0_INTERNAL int
93  void (*fop_release)(struct m0_ref *),
94  uint64_t proxy_id, const char *local_ep,
95  const struct m0_cm_sw *sw,
96  const struct m0_cm_sw *out_interval)
97 {
99  fop, fop_release, proxy_id,
100  local_ep, sw, out_interval);
101 }
102 
103 #undef M0_TRACE_SUBSYSTEM
104 
107 /*
108  * Local variables:
109  * c-indentation-style: "K&R"
110  * c-basic-offset: 8
111  * tab-width: 8
112  * fill-column: 80
113  * scroll-step: 1
114  * End:
115  */
116 /*
117  * vim: tabstop=8 shiftwidth=8 noexpandtab textwidth=80 nowrap
118  */
M0_INTERNAL void m0_dix_rebalance_sw_onwire_fop_init(void)
Definition: sw_fop.c:65
M0_INTERNAL void m0_cm_repreb_sw_onwire_fop_init(struct m0_fop_type *ft, const struct m0_fom_type_ops *fomt_ops, enum M0_RPC_OPCODES op, const char *name, const struct m0_xcode_type *xt, uint64_t rpc_flags, struct m0_cm_type *cmt)
Definition: sw_onwire_fop.c:46
Definition: sw.h:45
#define NULL
Definition: misc.h:38
static struct m0_addb2_mach * m
Definition: consumer.c:38
M0_INTERNAL void m0_dix_rebalance_sw_onwire_fop_fini(void)
Definition: sw_fop.c:84
static int dix_rebalance_sw_fom_create(struct m0_fop *fop, struct m0_fom **m, struct m0_reqh *reqh)
Definition: sw_fop.c:46
void fop_release(struct m0_ref *ref)
Definition: stats_ut_svc.c:148
int(* fto_create)(struct m0_fop *fop, struct m0_fom **out, struct m0_reqh *reqh)
Definition: fom.h:650
return M0_RC(rc)
static struct m0_cm * cm
Definition: cm.c:63
return M0_ERR(-EOPNOTSUPP)
Definition: refs.h:34
Definition: reqh.h:94
M0_INTERNAL void m0_cm_repreb_sw_onwire_fop_fini(struct m0_fop_type *ft)
Definition: sw_onwire_fop.c:64
struct m0_fop_type dix_rebalance_sw_onwire_rep_fopt
Definition: sw_fop.c:43
struct m0_fop * m0_fop_reply_alloc(struct m0_fop *req, struct m0_fop_type *rept)
Definition: fop.c:129
M0_INTERNAL int m0_cm_repreb_sw_onwire_fop_setup(struct m0_cm *cm, struct m0_fop_type *ft, struct m0_fop *fop, void(*fop_release)(struct m0_ref *), uint64_t proxy_id, const char *local_ep, const struct m0_cm_sw *sw, const struct m0_cm_sw *out_interval)
Definition: sw_onwire_fop.c:70
struct m0_fop_type dix_rebalance_sw_onwire_fopt
Definition: sw_fop.c:42
Definition: fom.h:481
Definition: cm.h:143
struct m0_reqh reqh
Definition: rm_foms.c:48
struct m0_cm_type dix_rebalance_cmt
Definition: cm.h:174
static const char * local_ep(const struct m0_cm *cm)
Definition: cm_utils.c:397
Definition: cm.h:166
static struct m0_fop * fop
Definition: item.c:57
M0_INTERNAL int m0_cm_repreb_sw_onwire_fom_create(struct m0_fop *fop, struct m0_fop *r_fop, struct m0_fom **out, struct m0_reqh *reqh)
int32_t rc
Definition: trigger_fop.h:47
const struct m0_fom_type_ops dix_rebalance_sw_fom_type_ops
Definition: sw_fop.c:60
M0_INTERNAL int m0_dix_rebalance_sw_onwire_fop_setup(struct m0_cm *cm, struct m0_fop *fop, void(*fop_release)(struct m0_ref *), uint64_t proxy_id, const char *local_ep, const struct m0_cm_sw *sw, const struct m0_cm_sw *out_interval)
Definition: sw_fop.c:92
Definition: fop.h:79