Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.

Commit

Permalink
CORTX-33878_fix_alex_issues
Browse files Browse the repository at this point in the history
Fixed the issues reported by the Alex tool and added suitable replacement words for the issues reported.

Signed-off-by: Swapnil Chaudhary <swapnil.chaudhary@seagate.com>
  • Loading branch information
swapnil-seagate committed Aug 16, 2022
1 parent 553163b commit 6f63fcb
Show file tree
Hide file tree
Showing 13 changed files with 39 additions and 39 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,5 +175,5 @@ Refer to the [Motr Coding Style Guide](../dev/doc/coding-style.md) and the [CORT

You can reach out to us with your questions, feedback, and comments through our CORTX Communication Channels:

- Join our CORTX-Open Source Slack Channel to interact with your fellow community members and gets your questions answered. [![Slack Channel](https://img.shields.io/badge/chat-on%20Slack-blue)](https://join.slack.com/t/cortxcommunity/shared_invite/zt-femhm3zm-yiCs5V9NBxh89a_709FFXQ?)
- Join our CORTX-Open Source Slack Channel to interact with community members and gets your questions answered. [![Slack Channel](https://img.shields.io/badge/chat-on%20Slack-blue)](https://join.slack.com/t/cortxcommunity/shared_invite/zt-femhm3zm-yiCs5V9NBxh89a_709FFXQ?)
- If you'd like to contact us directly, drop us a mail at cortx-questions@seagate.com.
2 changes: 1 addition & 1 deletion SUPPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ Looking for support for CORTX parent or a repository ?
Consider some of these resources:

- Join our CORTX-Open Source Slack channel [![Slack](https://img.shields.io/badge/chat-on%20Slack-blue")](https://join.slack.com/t/cortxcommunity/shared_invite/zt-femhm3zm-yiCs5V9NBxh89a_709FFXQ?) to interact with community members and gets your questions answered.
- Join [GitHub Discussions](https://github.com/Seagate/cortx-motr/discussions) to ask, answer, and discuss topics with your fellow CORTX contributors!
- Join [GitHub Discussions](https://github.com/Seagate/cortx-motr/discussions) to ask, answer, and discuss topics with CORTX contributors!
- If you'd like to contact us directly, drop us a mail at [cortx-questions@seagate.com](mailto:cortx-questions@seagate.com) .
- We like to highlight the work and contributions of our community members—if you have solved an interesting challenge, or you are interested in sharing your experience or use cases, we want to talk to you! Please email our Community Manager [rachel.novak@seagate.com](mailto:rachel.novak@seagate.com) or [schedule a meeting with us](https://outlook.office365.com/owa/calendar/CORTXCommunity@seagate.com/bookings/s/x8yMn2ODxUCOdhxvXkH4FA2) to share.
12 changes: 6 additions & 6 deletions doc/ISC-Service-User-Guide
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ Consider a simple API that on reception of string “Hello” responds with “W
char *in_string, struct m0_rpc_conn *conn)
{
int rc;
/* A string is mapped to a mero buffer. */
/* A string is mapped to a motr buffer. */
m0_buf_init(in_args, in_string, strlen(in_string));
/* Initialise RPC adaptive transmission data structure. */
m0_rpc_at_init(&isc_fop->fi_args);
/* Add mero buffer to m0_rpc_at */
/* Add motr buffer to m0_rpc_at */

rc = m0_rpc_at_add(&isc_fop->fi_args, in_args, conn);

Expand Down Expand Up @@ -198,7 +198,7 @@ We now discuss the callee side code. Let’s assume that the function is registe
if (m0_buf_streq(in, “Hello”)) {
/*
* The string allocated here should not be freed by
* computation and Mero takes care of freeing it.
* computation and Motr takes care of freeing it.
*/

out_str = m0_strdup(“World”);
Expand All @@ -224,7 +224,7 @@ Suppose we have a collection of arrays of integers, each stored as a Motr object
```
/* Arguments for getting min/max. */
struct arr_fids {
/* Number of arrays stored with Mero. */
/* Number of arrays stored with Motr. */
uint32_t af_arr_nr;
/* An array holding unique identifiers of arrays. */
struct m0_fid *af_gfids
Expand Down Expand Up @@ -280,7 +280,7 @@ struct histo_args {
/** Minimum value. */
uint64_t ha_min_val;

/** Global fid of object stored with Mero. */
/** Global fid of object stored with Motr. */
struct m0_fid ha_gob_fid;

} M0_XCA_RECORD;
Expand All @@ -295,7 +295,7 @@ Here we discuss the API for generating a histogram of values, local to a node. T
* Structure of a computation is advisable to be similar to
* Motr foms. It returns M0_FSO_WAIT when it has to wait for
* an external event (n/w or disk I/O)else it returns
* M0_FSO_AGAIN. These two symbols are defined in Mero.
* M0_FSO_AGAIN. These two symbols are defined in Motr.
*/
int histo_generate(struct m0_buf *in, struct m0_buf *out,
struct m0_isc_comp_private *comp_data,
Expand Down
12 changes: 6 additions & 6 deletions doc/ISC-Service-User-Guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ Consider a simple API that on reception of string “Hello” responds with “W
char *in_string, struct m0_rpc_conn *conn)
{
int rc;
/* A string is mapped to a mero buffer. */
/* A string is mapped to a motr buffer. */
m0_buf_init(in_args, in_string, strlen(in_string));
/* Initialise RPC adaptive transmission data structure. */
m0_rpc_at_init(&isc_fop->fi_args);
/* Add mero buffer to m0_rpc_at */
/* Add motr buffer to m0_rpc_at */
rc = m0_rpc_at_add(&isc_fop->fi_args, in_args, conn);
Expand Down Expand Up @@ -198,7 +198,7 @@ We now discuss the callee side code. Let’s assume that the function is registe
if (m0_buf_streq(in, “Hello”)) {
/*
* The string allocated here should not be freed by
* computation and Mero takes care of freeing it.
* computation and Motr takes care of freeing it.
*/
out_str = m0_strdup(“World”);
Expand All @@ -224,7 +224,7 @@ Suppose we have a collection of arrays of integers, each stored as a Motr object
```
/* Arguments for getting min/max. */
struct arr_fids {
/* Number of arrays stored with Mero. */
/* Number of arrays stored with Motr. */
uint32_t af_arr_nr;
/* An array holding unique identifiers of arrays. */
struct m0_fid *af_gfids
Expand Down Expand Up @@ -280,7 +280,7 @@ struct histo_args {
/** Minimum value. */
uint64_t ha_min_val;
/** Global fid of object stored with Mero. */
/** Global fid of object stored with Motr. */
struct m0_fid ha_gob_fid;
} M0_XCA_RECORD;
Expand All @@ -295,7 +295,7 @@ Here we discuss the API for generating a histogram of values, local to a node. T
* Structure of a computation is advisable to be similar to
* Motr foms. It returns M0_FSO_WAIT when it has to wait for
* an external event (n/w or disk I/O)else it returns
* M0_FSO_AGAIN. These two symbols are defined in Mero.
* M0_FSO_AGAIN. These two symbols are defined in Motr.
*/
int histo_generate(struct m0_buf *in, struct m0_buf *out,
struct m0_isc_comp_private *comp_data,
Expand Down
4 changes: 2 additions & 2 deletions doc/Motr-Lnet-Transport.md
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ A Motr server uses the following pattern to use the LNet transport to initiate a

A Motr tool uses the following pattern to use the LNet transport to initiate passive bulk tranfers to Motr server components:

1. The tool should use an end point address that is not assigned to any mero server or file system client. It should use a dynamic address to achieve this.
1. The tool should use an end point address that is not assigned to any motr server or file system client. It should use a dynamic address to achieve this.
2. To perform a bulk operation, the tool provisions a network buffer. The tool then registers this buffer and enqueues the buffer for transmission.
3. When a buffer operation completes, the buffer can be de-registered and the memory can be de-provisioned.

Expand Down Expand Up @@ -437,7 +437,7 @@ LNet is capable of running without Lustre, but currently is distributed only thr

### References
* [1] T1 Task Definitions
* [2] Mero Summary Requirements Table
* [2] Motr Summary Requirements Table
* [3] m0 Glossary
* [4] m0LNet Preliminary Design Questions
* [5] RPC Bulk Transfer Task Plan
Expand Down
4 changes: 2 additions & 2 deletions doc/RPC_Layer_Core.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Requirements

- [r.rpccore.efficient.bulk] 0-copy, if provided by the underlying network transport, is utilized;

- [r.rpccore.eos] support ordered exactly once semantics (EOS) of delivery;
- [r.rpccore.cortx] support ordered exactly once semantics (CORTX) of delivery;

- [r.rpccore.formation.settings] support different setting like max_rpc_in_flight, max_page_per_rpc, etc.

Expand Down Expand Up @@ -239,7 +239,7 @@ Cached FOPs might have dependencies each on other. This could affect the order o

- m0_rpcmachine is a RPC processing machine, several instances of it might be existing simultaneously.

- m0_update_stream is an ADT associated with sessions and slots used for FOP sending with FIFO and EOS constrains.
- m0_update_stream is an ADT associated with sessions and slots used for FOP sending with FIFO and CORTX constrains.


*********************
Expand Down
2 changes: 1 addition & 1 deletion doc/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ Mero -> Motr rename
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

A: Remove ``/etc/ld.so.conf.d/mero.conf``, then rebuild Motr after ``git
A: Remove ``/etc/ld.so.conf.d/motr.conf``, then rebuild Motr after ``git
clean -dfx`` (WARNING: removes all files that are not staged and are not in
the repo).
6 changes: 3 additions & 3 deletions doc/fdmi_demo/demo-fdmi/m0-instance/Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
CC=gcc

MERO_PATH=/root/mero-true-bulk-rebased
MOTR_PATH=/root/motr-true-bulk-rebased
LUSTRE_PATH=/usr/src/lustre-2.7.18.4-headers

CFLAGS=-g -std=gnu99 -Wall -Werror -Wno-attributes -Wno-unused-variable \
-Wno-unused-but-set-variable -D_REENTRANT -D_GNU_SOURCE -DM0_INTERNAL='' \
-DM0_EXTERN=extern -fno-strict-aliasing -fno-omit-frame-pointer -fno-common \
-fPIC

INCLUDE_FLAGS=-include config.h -I$(MERO_PATH) -I$(LUSTRE_PATH)/lnet/include \
INCLUDE_FLAGS=-include config.h -I$(MOTR_PATH) -I$(LUSTRE_PATH)/lnet/include \
-I$(LUSTRE_PATH)/lustre/include

LDFLAGS=-L$(MERO_PATH)/extra-libs/gf-complete/src/.libs -L$(MERO_PATH)/mero/.libs -lm -lpthread -lrt -lgf_complete -lyaml -luuid -lmero
LDFLAGS=-L$(MOTR_PATH)/extra-libs/gf-complete/src/.libs -L$(MOTR_PATH)/motr/.libs -lm -lpthread -lrt -lgf_complete -lyaml -luuid -lmotr

OBJS=src/main.o

Expand Down
6 changes: 3 additions & 3 deletions doc/fdmi_demo/demo-fdmi/m0-instance/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "pool/pool.h" /* m0_pool_version */
#include "conf/confc.h" /* m0_confc_close */
#include "net/lnet/lnet.h" /* m0_net_lnet_xprt */
#include "mero/ha.h"
#include "motr/ha.h"
#include "rpc/rpc_machine.h" /* m0_rpc_machine */
#include "rpc/rpc.h" /* m0_rpc_bufs_nr */
#include "reqh/reqh.h" /* m0_reqh */
Expand All @@ -34,9 +34,9 @@
#include "fdmi/service.h"
#include "fdmi/plugin_dock.h"
#include "fdmi/plugin_dock_internal.h"
#include <clovis/clovis.h>
#include <motr/client.h>
#include <clovis/clovis_cont.h>
#include <clovis/clovis_internal.h>
#include <motr/client_internal.h>

#define MALLOC_ARR(arr, nr) ((arr) = malloc((nr) * sizeof ((arr)[0])))

Expand Down
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
CC=gcc

MERO_PATH=/root/mero-true-bulk-rebased
MOTR_PATH=/root/motr
LUSTRE_PATH=/usr/src/lustre-2.7.18.4-headers

CFLAGS=-g -std=gnu99 -Wall -Werror -Wno-attributes -Wno-unused-variable \
-Wno-unused-but-set-variable -D_REENTRANT -D_GNU_SOURCE -DM0_INTERNAL='' \
-DM0_EXTERN=extern -fno-strict-aliasing -fno-omit-frame-pointer -fno-common \
-fPIC

INCLUDE_FLAGS=-include config.h -I$(MERO_PATH) -I$(LUSTRE_PATH)/lnet/include \
INCLUDE_FLAGS=-include config.h -I$(MOTR_PATH) -I$(LUSTRE_PATH)/lnet/include \
-I$(LUSTRE_PATH)/lustre/include

LDFLAGS=-L$(MERO_PATH)/extra-libs/gf-complete/src/.libs -L$(MERO_PATH)/mero/.libs -lm -lpthread -lrt -lgf_complete -lyaml -luuid -lmero
LDFLAGS=-L$(MOTR_PATH)/extra-libs/gf-complete/src/.libs -L$(MOTR_PATH)/motr/.libs -lm -lpthread -lrt -lgf_complete -lyaml -luuid -lmotr

OBJS=src/main.o

NID:=$(sudo lctl list_nids)

clovis-app: $(OBJS)
motr-client: $(OBJS)
$(CC) -o $@ $(OBJS) $(LDFLAGS)

.c.o:
$(CC) -c $(CFLAGS) $(INCLUDE_FLAGS) -o $@ $<

# test: clovis-app
# ./clovis-app $(NID):12345:45:1 $(NID):12345:44:101 '<0x7000000000000001:0>' '<0x7200000000000000:0>'
# test: motr-client
# ./motr-client $(NID):12345:45:1 $(NID):12345:44:101 '<0x7000000000000001:0>' '<0x7200000000000000:0>'
# -
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <clovis/clovis.h>
#include <clovis/clovis_internal.h>
#include <motr/client.h>
#include <motr/client_internal.h>
#include "lib/trace.h"
#include "fdmi/fdmi.h"
#include "fdmi/service.h"
Expand Down
4 changes: 2 additions & 2 deletions motr/ut/idx_dix.c
Original file line number Diff line number Diff line change
Expand Up @@ -1293,7 +1293,7 @@ static void st_dtm0_r_common(uint32_t sdev_id)
dtm0_ut_send_redo(&duc.duc_ifid, sdev_id, &key, &val,
M0_CAS_PUT_FOP_OPCODE);

/* XXX dirty hack, but now we don't have completion notification */
/* XXX dirty workaround, but now we don't have completion notification */
rem = 2ULL * M0_TIME_ONE_SECOND;
while (rem != 0)
m0_nanosleep(rem, &rem);
Expand All @@ -1304,7 +1304,7 @@ static void st_dtm0_r_common(uint32_t sdev_id)
dtm0_ut_send_redo(&duc.duc_ifid, sdev_id, &key, NULL,
M0_CAS_DEL_FOP_OPCODE);

/* XXX dirty hack, but now we don't have completion notification */
/* XXX dirty workaround, but now we don't have completion notification */
rem = 2ULL * M0_TIME_ONE_SECOND;
while (rem != 0)
m0_nanosleep(rem, &rem);
Expand Down
8 changes: 4 additions & 4 deletions scripts/jenkins/code-coverage-with-xperior-and-doxygen.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@ pipeline {
sh '''
set -ae
set
WD=$(pwd)
WORKING_DIR=$(pwd)
hostname
id
ls
export DO_MOTR_BUILD=yes
export TESTDIR=motr/.xperior/testds/
export XPERIOR="${WD}/xperior"
export ITD="${WD}/seagate-ci/xperior"
export XPLIB="${WD}/xperior-perl-libs/extlib/lib/perl5"
export XPERIOR="${WORKING_DIR}/xperior"
export ITD="${WORKING_DIR}/seagate-ci/xperior"
export XPLIB="${WORKING_DIR}/xperior-perl-libs/extlib/lib/perl5"
export PERL5LIB="${XPERIOR}/mongo/lib:${XPERIOR}/lib:${ITD}/lib:${XPLIB}/"
export PERL_HOME="/opt/perlbrew/perls/perl-5.22.0/"
export PATH="${PERL_HOME}/bin/:$PATH:/sbin/:/usr/sbin/"
Expand Down

0 comments on commit 6f63fcb

Please sign in to comment.