23 #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_SNSCM 75 uint32_t data_seg_nr,
size_t seg_size, uint32_t bshift)
83 M0_PRE(!cp_data_buf_tlist_is_empty(cp_buffers_head));
96 m0_tl_for(cp_data_buf, cp_buffers_head, nbuf) {
123 uint32_t data_seg_nr;
133 nbuf = cp_data_buf_tlist_head(&cp->
c_buffers);
140 max_buf_size, bshift);
184 "fom %p, ag_id "M0_AG_F", stob not found, rc %d",
232 #ifdef __SPARE_SPACE__ 275 #ifdef __SPARE_SPACE__ 299 "id "FID_F"is not feasible",
394 #undef M0_TRACE_SUBSYSTEM static m0_bcount_t seg_size
struct m0_cob_nsrec co_nsrec
static int ivec_prepare(struct m0_cm_cp *cp, struct m0_indexvec *iv, m0_bindex_t idx, size_t unit_size, size_t max_buf_size, uint32_t bshift)
#define M0_ALLOC_ARR(arr, nr)
enum m0_stob_io_flags si_flags
int(* sop_punch)(struct m0_stob *stob, struct m0_indexvec *range, struct m0_dtx *dtx)
static int cob_stob_check(struct m0_cm_cp *cp)
M0_INTERNAL void m0_mutex_unlock(struct m0_mutex *mutex)
struct m0_net_buffer_pool * nb_pool
static int cp_io(struct m0_cm_cp *cp, const enum m0_stob_io_opcode op)
M0_INTERNAL void m0_stob_io_fini(struct m0_stob_io *io)
M0_INTERNAL int m0_indexvec_alloc(struct m0_indexvec *ivec, uint32_t len)
struct m0_stob_id sc_stob_id
struct m0_bufvec nb_buffer
const struct m0_stob_ops * so_ops
M0_INTERNAL struct m0_sns_cm * cm2sns(struct m0_cm *cm)
M0_INTERNAL struct m0_cob_domain * m0_sns_cm_cp2cdom(struct m0_cm_cp *cp)
M0_INTERNAL int m0_storage_dev_stob_find(struct m0_storage_devs *devs, struct m0_stob_id *sid, struct m0_stob **stob)
M0_INTERNAL void m0_storage_dev_stob_put(struct m0_storage_devs *devs, struct m0_stob *stob)
#define M0_LOG(level,...)
static int cp_prepare(struct m0_cm_cp *cp, struct m0_indexvec *dst_ivec, struct m0_bufvec *dst_bvec, m0_bindex_t start_idx, uint32_t bshift)
static int cp_stob_release_exts(struct m0_stob *stob, struct m0_indexvec *range, struct m0_dtx *dtx)
M0_INTERNAL bool m0_stob_domain_is_of_type(const struct m0_stob_domain *dom, const struct m0_stob_type *dt)
const struct m0_stob_type m0_stob_ad_type
struct m0_cm_ag_id cag_id
M0_INTERNAL void m0_indexvec_free(struct m0_indexvec *ivec)
M0_INTERNAL void m0_stob_ad_balloc_set(struct m0_stob_io *io, uint64_t flags)
M0_INTERNAL void m0_fom_wait_on(struct m0_fom *fom, struct m0_chan *chan, struct m0_fom_callback *cb)
M0_INTERNAL void m0_mutex_lock(struct m0_mutex *mutex)
M0_INTERNAL int m0_io_cob_stob_create(struct m0_fom *fom, struct m0_cob_domain *cdom, struct m0_fid *fid, struct m0_fid *pver, uint64_t lid, bool crow, struct m0_cob **out)
M0_INTERNAL int m0_cob_size_update(struct m0_cob *cob, uint64_t size, struct m0_be_tx *tx)
static struct m0_be_tx * m0_fom_tx(struct m0_fom *fom)
struct m0_stob_domain * so_domain
M0_INTERNAL int m0_sns_cm_cp_write_pre(struct m0_cm_cp *cp)
M0_INTERNAL uint32_t m0_stob_block_shift(struct m0_stob *stob)
static uint32_t unit_size
enum m0_cm_cp_io_op c_io_op
return M0_ERR(-EOPNOTSUPP)
static int bufvec_prepare(struct m0_bufvec *obuf, struct m0_tl *cp_buffers_head, uint32_t data_seg_nr, size_t seg_size, uint32_t bshift)
#define M0_AMB(obj, ptr, field)
M0_INTERNAL int m0_stob_io_prepare_and_launch(struct m0_stob_io *io, struct m0_stob *obj, struct m0_dtx *tx, struct m0_io_scope *scope)
struct m0_indexvec si_stob
static struct m0_stob * stob
static struct m0_cob * cob
M0_INTERNAL int m0_sns_cm_cp_write(struct m0_cm_cp *cp)
struct m0_stob_io sc_stio
M0_INTERNAL int m0_sns_cm_cp_io_wait(struct m0_cm_cp *cp)
void m0_fom_phase_move(struct m0_fom *fom, int32_t rc, int phase)
M0_INTERNAL void m0_cob_oikey_make(struct m0_cob_oikey *oikey, const struct m0_fid *fid, int linkno)
const struct m0_cm_cp_ops * c_ops
M0_INTERNAL void * m0_stob_addr_pack(const void *buf, uint32_t shift)
M0_INTERNAL int m0_stob_io_private_setup(struct m0_stob_io *io, struct m0_stob *obj)
struct m0_fol_frag * si_fol_frag
enum m0_stob_io_state si_state
struct m0_cm_aggr_group * c_ag
M0_INTERNAL struct m0_sns_cm_cp * cp2snscp(const struct m0_cm_cp *cp)
struct m0_cob_domain * sc_cob_dom
static struct m0_stob_io io
M0_INTERNAL struct m0_storage_devs * m0_cs_storage_devs_get(void)
M0_INTERNAL int m0_sns_cm_cp_tx_open(struct m0_cm_cp *cp)
static bool cp_stob_io_is_initialised(struct m0_stob_io *io)
struct m0_sns_cm_file_ctx * sag_fctx
M0_INTERNAL enum m0_stob_state m0_stob_state_get(struct m0_stob *stob)
M0_INTERNAL int m0_sns_cm_cp_read(struct m0_cm_cp *cp)
static void bufvec_free(struct m0_bufvec *bv)
M0_INTERNAL uint64_t m0_io_size(struct m0_stob_io *sio, uint32_t bshift)
#define M0_FI_ENABLED(tag)
void(* co_complete)(struct m0_cm_cp *cp)
int(* co_phase_next)(struct m0_cm_cp *cp)
M0_INTERNAL void m0_fom_callback_cancel(struct m0_fom_callback *cb)
M0_INTERNAL int m0_cob_locate(struct m0_cob_domain *dom, struct m0_cob_oikey *oikey, uint64_t flags, struct m0_cob **out)
M0_INTERNAL void m0_stob_io_init(struct m0_stob_io *io)
struct m0_cob_attr sf_attr
static struct m0_sns_cm_file_ctx fctx
M0_INTERNAL int m0_sns_cm_cp_tx_close(struct m0_cm_cp *cp)
#define m0_tl_for(name, head, obj)
M0_INTERNAL void m0_fid_convert_stob2cob(const struct m0_stob_id *stob_id, struct m0_fid *cob_fid)
M0_INTERNAL bool m0_cm_cp_invariant(const struct m0_cm_cp *cp)
M0_INTERNAL struct m0_sns_cm_ag * ag2snsag(const struct m0_cm_aggr_group *ag)
static int cp_stob_io_init(struct m0_cm_cp *cp, const enum m0_stob_io_opcode op)
struct m0_fol_frag sc_fol_frag
struct m0_fom_callback fo_cb
static uint64_t max64u(uint64_t a, uint64_t b)
#define M0_IMPOSSIBLE(fmt,...)
enum m0_stob_io_opcode si_opcode