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

Commit 5ab2d68

Browse files
Addressed review comments and updatedthe code with required changes.
Signed-off-by: Swapnil Chaudhary <[email protected]>
1 parent 0cd4f6d commit 5ab2d68

File tree

3 files changed

+9
-12
lines changed

3 files changed

+9
-12
lines changed

ha/entrypoint.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -501,11 +501,12 @@ static struct m0_rpc_item_ops ha_entrypoint_client_item_ops = {
501501
static void ha_entrypoint_client_fop_release(struct m0_ref *ref)
502502
{
503503
struct m0_fop *fop;
504-
504+
struct m0_ha_entrypoint_req_fop *req_fop_data;
505505
M0_ENTRY();
506506
M0_PRE(ref != NULL);
507507
fop = container_of(ref, struct m0_fop, f_ref);
508-
m0_free(fop->f_data.fd_data);
508+
req_fop_data = (struct m0_ha_entrypoint_req_fop*)fop->f_data.fd_data;
509+
m0_buf_free(&req_fop_data->erf_git_rev_id);
509510
fop->f_data.fd_data = NULL;
510511
m0_fop_fini(fop);
511512
M0_SET0(fop);
@@ -601,8 +602,6 @@ static int ha_entrypoint_client_fom_tick(struct m0_fom *fom)
601602
fop->f_opaque = ecl;
602603
next_state = M0_HEC_SEND_WAIT;
603604
rc = m0_rpc_post(item) == 0 ? M0_FSO_WAIT : M0_FSO_AGAIN;
604-
//m0_free(req_fop_data->erf_git_rev_id.b_addr);
605-
//m0_buf_free(&req_fop_data->erf_git_rev_id);
606605
break;
607606

608607
case M0_HEC_SEND_WAIT:

motr/m0d.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ M0_INTERNAL int main(int argc, char **argv)
123123
int result;
124124
int rc;
125125
struct m0_motr motr_ctx;
126-
//struct rlimit rlim = {10240, 10240};
126+
struct rlimit rlim = {10240, 10240};
127127

128128
if (argc > 1 &&
129129
(strcmp(argv[1], "-v") == 0 || strcmp(argv[1], "--version") == 0)) {
@@ -149,11 +149,11 @@ M0_INTERNAL int main(int argc, char **argv)
149149
}
150150
}
151151

152-
//rc = setrlimit(RLIMIT_NOFILE, &rlim);
153-
//if (rc != 0) {
154-
// warnx("\n Failed to setrlimit\n");
155-
// goto out;
156-
//}
152+
rc = setrlimit(RLIMIT_NOFILE, &rlim);
153+
if (rc != 0) {
154+
warnx("\n Failed to setrlimit\n");
155+
goto out;
156+
}
157157

158158
rc = cs_register_signal();
159159
if (rc != 0) {

motr/setup.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1102,8 +1102,6 @@ static int cs_storage_init(const char *stob_type,
11021102
*/
11031103
static void cs_storage_fini(struct cs_stobs *stob)
11041104
{
1105-
//struct cs_stobs *stob = &rctx->rc_stob;
1106-
//m0_free((char*)rctx->rc_addb_stlocation);
11071105
cs_storage_devs_fini();
11081106
if (stob->s_sdom != NULL)
11091107
m0_stob_domain_fini(stob->s_sdom);

0 commit comments

Comments
 (0)