Skip to content

Commit

Permalink
Merge branch 'master' into mjean/DAOS-16167
Browse files Browse the repository at this point in the history
Skip-unit-tests: true
Skip-fault-injection-test: true
Test-tag: soak_smoke

Required-githooks: true

Signed-off-by: Maureen Jean <maureen.jean@intel.com>
  • Loading branch information
mjean308 committed Jul 31, 2024
2 parents 86bfb25 + a0af03d commit 063424b
Show file tree
Hide file tree
Showing 73 changed files with 2,575 additions and 877 deletions.
45 changes: 37 additions & 8 deletions src/cart/utils/memcheck-cart.supp
Original file line number Diff line number Diff line change
Expand Up @@ -583,13 +583,19 @@
fun:racecall
}
{
go 1.22.3 race
__tsan_go_atomic64_load
Memcheck:Addr8
fun:__tsan_go_atomic64_load
fun:racecall
}
{
go 1.22.3 race
__tsan_go_atomic64_store
Memcheck:Addr8
fun:__tsan_go_atomic64_store
fun:racecall
}
{
__tsan_go_atomic64_compare_exchange
Memcheck:Addr8
fun:__tsan_go_atomic64_compare_exchange
fun:racecall
Expand All @@ -605,11 +611,17 @@
fun:runtime.persistentalloc
}
{
go 1.22.3 race
__tsan_write_pc
Memcheck:Value8
fun:__tsan_write_pc
fun:racecall
}
{
__tsan_read_pc
Memcheck:Value8
fun:__tsan_read_pc
fun:racecall
}
{
go 1.22.3 race
Memcheck:Value8
Expand All @@ -623,31 +635,48 @@
fun:racecall
}
{
go 1.22.3 race
__tsan_read
Memcheck:Value8
fun:__tsan_read
fun:racecall
}
{
go 1.22.3 race
__tsan_write
Memcheck:Value8
fun:__tsan_write
fun:racecall
}
{
racecallatomic
Memcheck:Addr8
fun:racecallatomic
}
{
go 1.22.3 race
racecalladdr
Memcheck:Addr8
fun:racecalladdr
}
{
Syscall6 param
Memcheck:Param
read(buf)
fun:runtime/internal/syscall.Syscall6
}
{
go 1.22.3 race
__tsan_go_atomic32_load
Memcheck:Addr4
fun:__tsan_go_atomic32_load
fun:racecall
}
{
go 1.22.3 race
__tsan_go_atomic32_store
Memcheck:Addr4
fun:__tsan_go_atomic32_store
fun:racecall
}
{
__tsan_go_atomic32_compare_exchange
Memcheck:Addr4
fun:__tsan_go_atomic32_compare_exchange
fun:racecall
}
3 changes: 2 additions & 1 deletion src/client/api/SConscript
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
"""Build DAOS client"""

LIBDAOS_SRC = ['agent.c', 'array.c', 'container.c', 'event.c', 'init.c', 'job.c', 'kv.c', 'mgmt.c',
'object.c', 'pool.c', 'rpc.c', 'task.c', 'tx.c', 'pipeline.c', 'metrics.c']
'object.c', 'pool.c', 'rpc.c', 'task.c', 'tx.c', 'pipeline.c', 'metrics.c',
'version.c']


def scons():
Expand Down
31 changes: 31 additions & 0 deletions src/client/api/version.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/**
* (C) Copyright 2024 Intel Corporation.
*
* SPDX-License-Identifier: BSD-2-Clause-Patent
*/
/**
* This file is part of daos
*
* src/client/api/version.c
*/
#define D_LOGFAC DD_FAC(client)

#include <daos/common.h>
#include <daos_version.h>

/**
* Retrieve DAOS client API version.
*/
int
daos_version_get(int *major, int *minor, int *fix)
{
if (major == NULL || minor == NULL || fix == NULL) {
D_ERROR("major, minor, fix must not be NULL\n");
return -DER_INVAL;
}
*major = DAOS_API_VERSION_MAJOR;
*minor = DAOS_API_VERSION_MINOR;
*fix = DAOS_API_VERSION_FIX;

return 0;
}
24 changes: 24 additions & 0 deletions src/client/dfuse/pil4dfs/int_dfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,8 @@ static int (*next_unlinkat)(int dirfd, const char *path, int flags);

static int (*next_fsync)(int fd);

static int (*next_fdatasync)(int fd);

static int (*next_truncate)(const char *path, off_t length);

static int (*next_ftruncate)(int fd, off_t length);
Expand Down Expand Up @@ -5309,6 +5311,28 @@ fsync(int fd)
return 0;
}

int
fdatasync(int fd)
{
int fd_directed;

if (next_fdatasync == NULL) {
next_fdatasync = dlsym(RTLD_NEXT, "fdatasync");
D_ASSERT(next_fdatasync != NULL);
}
if (!d_hook_enabled)
return next_fdatasync(fd);

fd_directed = d_get_fd_redirected(fd);
if (fd_directed < FD_FILE_BASE)
return next_fdatasync(fd);

if (fd < FD_DIR_BASE && d_compatible_mode)
return next_fdatasync(fd);

return 0;
}

int
ftruncate(int fd, off_t length)
{
Expand Down
5 changes: 4 additions & 1 deletion src/common/lru.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ lru_hop_rec_addref(struct d_hash_table *htable, d_list_t *link)
{
struct daos_llink *llink = link2llink(link);

D_ASSERT(llink->ll_evicting == 0 && llink->ll_evicted == 0);
llink->ll_ref++;
}

Expand Down Expand Up @@ -216,6 +215,10 @@ daos_lru_ref_hold(struct daos_lru_cache *lcache, void *key,
if (link != NULL) {
llink = link2llink(link);
D_ASSERT(llink->ll_evicted == 0);
if (llink->ll_evicting) {
daos_lru_ref_release(lcache, llink);
D_GOTO(out, rc = -DER_SHUTDOWN);
}
/* remove busy item from LRU */
if (!d_list_empty(&llink->ll_qlink))
d_list_del_init(&llink->ll_qlink);
Expand Down
7 changes: 6 additions & 1 deletion src/container/srv_target.c
Original file line number Diff line number Diff line change
Expand Up @@ -1989,9 +1989,14 @@ cont_snap_update_one(void *vin)
struct ds_cont_child *cont;
int rc;

rc = ds_cont_child_lookup(args->pool_uuid, args->cont_uuid, &cont);
/* The container should be exist on the system at this point, if non-exist on this target
* it should be the case of reintegrate the container was destroyed ahead, so just
* open_create the container here.
*/
rc = ds_cont_child_open_create(args->pool_uuid, args->cont_uuid, &cont);
if (rc != 0)
return rc;

if (args->snap_count == 0) {
if (cont->sc_snapshots != NULL) {
D_ASSERT(cont->sc_snapshots_nr > 0);
Expand Down
6 changes: 4 additions & 2 deletions src/control/build/interop.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// (C) Copyright 2022 Intel Corporation.
// (C) Copyright 2022-2024 Intel Corporation.
//
// SPDX-License-Identifier: BSD-2-Clause-Patent
//
Expand Down Expand Up @@ -40,6 +40,8 @@ var (
ComponentAdmin = Component("admin")
// ComponentAgent represents the compute node agent.
ComponentAgent = Component("agent")
// ComponentClient represents the libdaos client.
ComponentClient = Component("client")
)

// NewVersionedComponent creates a new VersionedComponent.
Expand All @@ -50,7 +52,7 @@ func NewVersionedComponent(comp Component, version string) (*VersionedComponent,
}

switch comp {
case ComponentServer, ComponentAdmin, ComponentAgent, ComponentAny:
case ComponentServer, ComponentAdmin, ComponentAgent, ComponentClient, ComponentAny:
return &VersionedComponent{
Component: comp,
Version: v,
Expand Down
Loading

0 comments on commit 063424b

Please sign in to comment.