Motr  M0
plan.h
Go to the documentation of this file.
1 /* -*- C -*- */
2 /*
3  * Copyright (c) 2016-2021 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  * Original author: Nikita Danilov <nikita.danilov@seagate.com>
21  * Original creation date: 07-Jun-2016
22  */
23 
24 #pragma once
25 
26 #ifndef __MOTR_LAYOUT_PLAN_H__
27 #define __MOTR_LAYOUT_PLAN_H__
28 
232 #include "lib/types.h" /* uint64_t */
233 #include "lib/tlist.h"
234 #include "lib/vec.h"
235 
236 struct m0_op;
237 struct m0_layout;
238 struct m0_layout_plan;
239 struct m0_layout_plop;
240 struct m0_layout_plop_ops;
241 
335 
337 };
338 
346 };
347 
372  uint64_t pl_colour;
374  uint64_t pl_magix;
388  struct m0_tl pl_deps;
393  struct m0_tl pl_rdeps;
398  struct m0_fid pl_ent;
403  int32_t pl_rc;
408  const struct m0_layout_plop_ops *pl_ops;
409 };
410 
420  uint64_t plr_magix;
425 };
426 
441  void (*po_cancel)(struct m0_layout_plop *plop);
449  void (*po_fini)(struct m0_layout_plop *plop);
450 };
451 
469 };
470 
480 
487 
490 
500 };
501 
511 };
512 
520  int (*fp_fun)(struct m0_layout_fun_plop *plop);
521  void *fp_datum;
522 };
523 
524 M0_TL_DESCR_DECLARE(pldeps, M0_EXTERN);
525 M0_TL_DECLARE(pldeps, M0_EXTERN, struct m0_layout_plop_rel);
526 
527 M0_TL_DESCR_DECLARE(plrdeps, M0_EXTERN);
528 M0_TL_DECLARE(plrdeps, M0_EXTERN, struct m0_layout_plop_rel);
529 
533 M0_INTERNAL struct m0_layout_plan * m0_layout_plan_build(struct m0_op *op);
534 
541 M0_INTERNAL void m0_layout_plan_fini(struct m0_layout_plan *plan);
542 
543 enum {
545 };
546 
555 M0_INTERNAL int m0_layout_plan_get(struct m0_layout_plan *plan, uint64_t colour,
556  struct m0_layout_plop **out);
557 
564 M0_INTERNAL int m0_layout_plop_start(struct m0_layout_plop *plop);
565 
574 M0_INTERNAL void m0_layout_plop_done(struct m0_layout_plop *plop);
575 
582 M0_INTERNAL void m0_layout_plan_abort(struct m0_layout_plan *plan);
583 
585 #endif /* __MOTR_LAYOUT_PLAN_H__ */
586 
587 /*
588  * Local variables:
589  * c-indentation-style: "K&R"
590  * c-basic-offset: 8
591  * tab-width: 8
592  * fill-column: 80
593  * scroll-step: 1
594  * End:
595  */
596 /*
597  * vim: tabstop=8 shiftwidth=8 noexpandtab textwidth=80 nowrap
598  */
struct m0_layout_plop rp_base
Definition: plan.h:510
int32_t pl_rc
Definition: plan.h:403
m0_layout_plop_state
Definition: plan.h:342
M0_INTERNAL void m0_layout_plop_done(struct m0_layout_plop *plop)
Definition: plan.c:311
const struct m0_layout_plop_ops * pl_ops
Definition: plan.h:408
struct m0_tlink plr_rdep_linkage
Definition: plan.h:424
M0_INTERNAL int m0_layout_plan_get(struct m0_layout_plan *plan, uint64_t colour, struct m0_layout_plop **plop)
Definition: plan.c:278
int(* fp_fun)(struct m0_layout_fun_plop *plop)
Definition: plan.h:520
struct m0_bufvec iob_data
Definition: plan.h:468
void(* po_cancel)(struct m0_layout_plop *plop)
Definition: plan.h:441
struct m0_tl pl_deps
Definition: plan.h:388
struct m0_indexvec iob_ready
Definition: plan.h:466
struct m0_fid pl_ent
Definition: plan.h:398
uint64_t m0_bindex_t
Definition: types.h:80
uint64_t plr_magix
Definition: plan.h:420
enum m0_layout_plop_state pl_state
Definition: plan.h:359
op
Definition: libdemo.c:64
Definition: client.h:641
struct m0_bufvec iop_data
Definition: plan.h:499
m0_bindex_t iop_goff
Definition: plan.h:489
enum m0_layout_plop_type pl_type
Definition: plan.h:357
Definition: tlist.h:251
M0_TL_DESCR_DECLARE(pldeps, M0_EXTERN)
M0_INTERNAL int m0_layout_plop_start(struct m0_layout_plop *plop)
Definition: plan.c:299
struct target_ioreq * pl_ti
Definition: plan.h:363
struct m0_tl pl_rdeps
Definition: plan.h:393
M0_TL_DECLARE(pldeps, M0_EXTERN, struct m0_layout_plop_rel)
struct m0_layout_plop * plr_rdep
Definition: plan.h:418
struct m0_layout_plan * pl_plan
Definition: plan.h:361
struct m0_layout_plop iop_base
Definition: plan.h:479
struct m0_tlink pl_linkage
Definition: plan.h:378
struct m0_rpc_session * iop_session
Definition: plan.h:482
struct m0_layout_plop iob_base
Definition: plan.h:464
struct m0_indexvec iop_ext
Definition: plan.h:486
uint64_t pl_magix
Definition: plan.h:374
M0_INTERNAL void m0_layout_plan_fini(struct m0_layout_plan *plan)
Definition: plan.c:229
struct m0_layout_plop fp_base
Definition: plan.h:519
m0_layout_plop_type
Definition: plan.h:249
Definition: fid.h:38
void * fp_datum
Definition: plan.h:521
struct m0_tlink plr_dep_linkage
Definition: plan.h:422
M0_INTERNAL struct m0_layout_plan * m0_layout_plan_build(struct m0_op *op)
Definition: plan.c:136
void(* po_fini)(struct m0_layout_plop *plop)
Definition: plan.h:449
#define out(...)
Definition: gen.c:41
struct m0_layout_plop * plr_dep
Definition: plan.h:416
M0_INTERNAL void m0_layout_plan_abort(struct m0_layout_plan *plan)
uint64_t pl_colour
Definition: plan.h:372
Definition: vec.h:145