Comments (21)
Thanks @rupasree-roy for reporting this. You provided two links. One to the original code and one to the modified code (uploaded as a tarball). Is the pasted compilation error coming from the original code or from the modified code in the tarball? Also, for those of us who can't see inside Seagate, does the tarball contain everything that is at the original link?
from cortx-motr.
The compiling errors are from the original code. There were many other compiling errors which were mainly around change in naming convention and change in function definitions. I changed the original code to take care of those compiling errors and thus the modified code.
And yes, the tarball contains everything that is at the original link. Just that its the updated version to make it work with the opensource code. I made changes to the following files from the original link : ~/clovis-app/Makefile, ~/clovis-app/src/main.c, ~/m0-instance/Makefile, ~/m0-instance/src/main.c
from cortx-motr.
Thanks Rupasree for the info. Where are you maintaining this code and working on this? I think it would make sense for you to put this code into a fork of either cortx-motr or m0-client-apps. That way, others of us can pull your fork and help look at these issues. Would that be possible for you to do please?
from cortx-motr.
I've found the code for container functions in an old branch of Motr. Here are the functions:
void m0_container_init(struct m0_container *cont,
struct m0_realm *parent,
const struct m0_uint128 *id,
struct m0_client *instance,
struct m0_pool *pool)
{
M0_ENTRY();
M0_PRE(cont != NULL);
M0_PRE(instance != NULL);
M0_PRE(parent != NULL);
M0_PRE(pool != NULL);
M0_PRE(id != NULL);
m0_realm_init(&cont->cont_realm, parent, id,
M0_ST_CONTAINER, instance);
m0_idx_init(&cont->cont_idx, parent, id);
cont->cont_pool = pool;
M0_LEAVE();
}
M0_EXPORTED(m0_container_init);
void m0_container_fini(struct m0_container *cont)
{
M0_ENTRY();
M0_PRE(cont != NULL);
m0_idx_fini(&cont->cont_idx);
m0_realm_fini(&cont->cont_realm);
M0_LEAVE();
}
M0_EXPORTED(m0_container_fini);
int m0_container_op(struct m0_container *cont,
enum m0_idx_opcode opcode,
struct m0_bufvec *keys,
struct m0_bufvec *vals,
int32_t *rcs,
uint32_t flags,
struct m0_op **op)
{
M0_PRE(cont != NULL);
M0_ENTRY();
return M0_RC(m0_idx_op(&cont->cont_idx, opcode, keys,
vals, rcs, flags, op));
}
int m0_container_bulk(struct m0_container *cont,
struct m0_uint128 *bop,
struct m0_param *datum,
struct m0_op **ops)
{
M0_ENTRY();
return M0_RC(m0_idx_bulk(&cont->cont_idx, bop, datum, ops));
}
M0_INTERNAL int m0_container_create(struct m0_container *cont,
struct m0_op **op)
{
M0_ENTRY();
M0_PRE(op != NULL);
M0_PRE(cont != NULL);
return M0_RC(m0_entity_create(&cont->cont_idx.in_entity, op));
}
Looks like they are mostly the wrappers over existing API, that's probably why they never made into the main branch. At least you can see the idea behind them.
from cortx-motr.
Another one:
int m0_idx_bulk(struct m0_idx *idx,
struct m0_uint128 *bop,
struct m0_param *datum,
struct m0_op **ops)
{
int rc;
struct m0_bufvec *fids;
struct m0_bufvec *data;
int *rcs;
M0_ENTRY();
M0_PRE(idx != NULL);
M0_PRE(bop != NULL);
M0_PRE(datum != NULL);
M0_PRE(ops != NULL);
M0_ALLOC_PTR(rcs);
M0_ALLOC_PTR(fids);
M0_ALLOC_PTR(data);
if (!rcs || !fids || !data) {
return -ENOMEM;
}
rc = m0_bufvec_empty_alloc(fids, 1);
if (rc) {
return M0_ERR(rc);
}
rc = m0_bufvec_empty_alloc(data, 1);
if (rc) {
return M0_ERR(rc);
}
fids->ov_buf[0] = (void*) bop;
fids->ov_vec.v_count[0] = sizeof(void*);
data->ov_buf[0] = (void*) datum;
data->ov_vec.v_count[0] = sizeof(void*);
return M0_RC(m0_idx_op(idx, M0_IC_BULK, fids,
data, rcs, 0, ops));
}
from cortx-motr.
Instead of m0_default_layout_id()
use M0_DEFAULT_LAYOUT_ID
macro.
Don't worry about m0_realm_init()
, just drop it and see how the realm is used in another examples. (For example, at https://github.com/Seagate/cortx-motr/blob/main/bindings/go/mio/mio.go.)
from cortx-motr.
As for the m0_conf_fs_get()
, here I updated it to the latest API (m0_confc_root_open()
) - m0-instance.tar.gz.
Hope you could continue from here?
from cortx-motr.
@johnbent I was maintaining the code in one of the lab machines in FRC. And sure I can fork cortx-motr and put the code there.
from cortx-motr.
@andriytk Thank you for sharing those info. Made changes according to what you suggested.
As far as the wrappers like 'm0_container_op' is concerned, how are we going to take care of that?
from cortx-motr.
@andriytk might say differently but I'd suggest to just add the wrappers yourself in your FDMI plugin.
from cortx-motr.
I'd suggest to make direct calls and get rid of the wrappers.
from cortx-motr.
This issue/pull request has been marked as needs attention
as it has been left pending without new activity for 4 days. Tagging @huanghua78 @mukundkanekar for appropriate assignment. Sorry for the delay & Thank you for contributing to CORTX. We will get back to you as soon as possible.
from cortx-motr.
Adding
@paulq11 @Lsmithy @Z2020Z
from cortx-motr.
This issue/pull request has been marked as needs attention
as it has been left pending without new activity for 4 days. Tagging @huanghua78 @mukundkanekar for appropriate assignment. Sorry for the delay & Thank you for contributing to CORTX. We will get back to you as soon as possible.
from cortx-motr.
Please note, this fdmi-demo is somewhat copied from "dix/utils/m0dixinit.c".
Please refer to "dix/utils/m0dixinit.c " and change the fdmi-demo accordingly.
from cortx-motr.
This issue/pull request has been marked as needs attention
as it has been left pending without new activity for 4 days. Tagging @huanghua78 @mukundkanekar for appropriate assignment. Sorry for the delay & Thank you for contributing to CORTX. We will get back to you as soon as possible.
from cortx-motr.
@huanghua78 please have a look at this once and suggest what needs to be done. Thanks.
from cortx-motr.
This issue is outdated.
Please refer to files in fdmi/plugins/*
for more details about how to write an FDMI application and how to compile it.
from cortx-motr.
Nagakishore Kommuri commented in Jira Server:
Github Issue closed.
from cortx-motr.
Nagakishore Kommuri commented in Jira Server:
.
from cortx-motr.
Nagakishore Kommuri commented in Jira Server:
.
from cortx-motr.
Related Issues (20)
- Unexpected keyword argument 'priority' in function call HOT 6
- degraded write fails when cob create fails HOT 5
- m0_fom_queue() panic in some UTs while doing cleanup HOT 13
- list of unit test failed HOT 3
- subprocess call with shell=True identified, security issue. HOT 9
- [Codacy code cleanup] occurrence: 8 pattern: hardcoded_sql_expression HOT 7
- Disable alternative pool versions by default HOT 4
- Sustained writes causes Motr to stop responding and require restarting HOT 25
- gccxml_cc1plus: error: cortx-motr/be/btree.h: No such file or directory HOT 6
- UT net-lnet is failing on Jenkins because lnet is not configured/loaded properly. HOT 11
- dtm0/log: record pmsgs from participants HOT 5
- I/O test failed HOT 10
- Error when trying to install Motr+HARE from iosea release HOT 3
- Ctgdump failed and all2all test HOT 7
- Phase2 mkfs failed during cluster bootstrapping after recent updates HOT 8
- Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead. HOT 7
- dix: return obj-version and number of replicas on get HOT 9
- dix: introduce cas-put by obj-version operation HOT 5
- dix: introduce cas-delete by obj-version operation HOT 4
- dix: make index creation/deletion operations fault-tolerant HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cortx-motr.