diff --git a/src/libpmem2/region_namespace_ndctl.c b/src/libpmem2/region_namespace_ndctl.c index dfdec34de54..675f82d61cd 100644 --- a/src/libpmem2/region_namespace_ndctl.c +++ b/src/libpmem2/region_namespace_ndctl.c @@ -1,5 +1,5 @@ // SPDX-License-Identifier: BSD-3-Clause -/* Copyright 2020-2022, Intel Corporation */ +/* Copyright 2020-2023, Intel Corporation */ /* * region_namespace_ndctl.c -- common ndctl functions @@ -17,13 +17,18 @@ #include "region_namespace.h" #include "out.h" +#define FOREACH_BUS_REGION_NAMESPACE(ctx, bus, region, ndns) \ + ndctl_bus_foreach(ctx, bus) \ + ndctl_region_foreach(bus, region) \ + ndctl_namespace_foreach(region, ndns) + /* - * ndctl_match_devdax -- (internal) returns 0 if the devdax matches + * pmem2_devdax_match -- (internal) returns 0 if the devdax matches * with the given file, 1 if it doesn't match, * and a negative value in case of an error. */ static int -ndctl_match_devdax(dev_t st_rdev, const char *devname) +pmem2_devdax_match(dev_t st_rdev, const char *devname) { LOG(3, "st_rdev %lu devname %s", st_rdev, devname); @@ -56,12 +61,12 @@ ndctl_match_devdax(dev_t st_rdev, const char *devname) #define BUFF_LENGTH 64 /* - * ndctl_match_fsdax -- (internal) returns 0 if the device matches + * pmem2_fsdax_match -- (internal) returns 0 if the device matches * with the given file, 1 if it doesn't match, * and a negative value in case of an error. */ static int -ndctl_match_fsdax(dev_t st_dev, const char *devname) +pmem2_fsdax_match(dev_t st_dev, const char *devname) { LOG(3, "st_dev %lu devname %s", st_dev, devname); @@ -171,7 +176,7 @@ pmem2_region_namespace(struct ndctl_ctx *ctx, struct daxctl_dev *dev; daxctl_dev_foreach(dax_region, dev) { devname = daxctl_dev_get_devname(dev); - int ret = ndctl_match_devdax(src->value.st_rdev, + int ret = pmem2_devdax_match(src->value.st_rdev, devname); if (ret < 0) return ret; @@ -200,7 +205,7 @@ pmem2_region_namespace(struct ndctl_ctx *ctx, ndctl_namespace_get_block_device(ndns); } - int ret = ndctl_match_fsdax(src->value.st_dev, devname); + int ret = pmem2_fsdax_match(src->value.st_dev, devname); if (ret < 0) return ret; diff --git a/src/libpmem2/region_namespace_ndctl.h b/src/libpmem2/region_namespace_ndctl.h index 8c89a16d972..43250c6ee12 100644 --- a/src/libpmem2/region_namespace_ndctl.h +++ b/src/libpmem2/region_namespace_ndctl.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright 2017-2020, Intel Corporation */ +/* Copyright 2017-2023, Intel Corporation */ /* * region_namespace_ndctl.h -- internal definitions for libpmem2 @@ -15,11 +15,6 @@ extern "C" { #endif -#define FOREACH_BUS_REGION_NAMESPACE(ctx, bus, region, ndns) \ - ndctl_bus_foreach(ctx, bus) \ - ndctl_region_foreach(bus, region) \ - ndctl_namespace_foreach(region, ndns) - int pmem2_region_namespace(struct ndctl_ctx *ctx, const struct pmem2_source *src, struct ndctl_region **pregion, diff --git a/src/stats/stack-usage-debug.txt b/src/stats/stack-usage-debug.txt index 5b857ae20a4..c516e07f447 100644 --- a/src/stats/stack-usage-debug.txt +++ b/src/stats/stack-usage-debug.txt @@ -171,17 +171,17 @@ 4352 out_init : src/debug/libpmemobj/out.su:out.c dynamic,bounded 4352 out_init : src/debug/libpmem2/out.su:out.c dynamic,bounded 4352 out_init : src/debug/core/out.su:out.c dynamic,bounded -4320 ndctl_match_fsdax : src/debug/libpmem/region_namespace_ndctl.su:region_namespace_ndctl.c dynamic,bounded -4320 ndctl_match_fsdax : src/debug/libpmempool/region_namespace_ndctl.su:region_namespace_ndctl.c dynamic,bounded -4320 ndctl_match_fsdax : src/debug/libpmemobj/region_namespace_ndctl.su:region_namespace_ndctl.c dynamic,bounded -4320 ndctl_match_fsdax : src/debug/libpmem2/region_namespace_ndctl.su:region_namespace_ndctl.c dynamic,bounded -4320 ndctl_match_fsdax : src/debug/common/region_namespace_ndctl.su:region_namespace_ndctl.c dynamic,bounded +4320 pmem2_fsdax_match : src/debug/libpmem/region_namespace_ndctl.su:region_namespace_ndctl.c dynamic,bounded +4320 pmem2_fsdax_match : src/debug/libpmempool/region_namespace_ndctl.su:region_namespace_ndctl.c dynamic,bounded +4320 pmem2_fsdax_match : src/debug/libpmemobj/region_namespace_ndctl.su:region_namespace_ndctl.c dynamic,bounded +4320 pmem2_fsdax_match : src/debug/libpmem2/region_namespace_ndctl.su:region_namespace_ndctl.c dynamic,bounded +4320 pmem2_fsdax_match : src/debug/common/region_namespace_ndctl.su:region_namespace_ndctl.c dynamic,bounded 4288 pool_set_map : src/debug/libpmempool/pool.su:pool.c dynamic,bounded -4288 ndctl_match_devdax : src/debug/libpmem/region_namespace_ndctl.su:region_namespace_ndctl.c dynamic,bounded -4288 ndctl_match_devdax : src/debug/libpmempool/region_namespace_ndctl.su:region_namespace_ndctl.c dynamic,bounded -4288 ndctl_match_devdax : src/debug/libpmemobj/region_namespace_ndctl.su:region_namespace_ndctl.c dynamic,bounded -4288 ndctl_match_devdax : src/debug/libpmem2/region_namespace_ndctl.su:region_namespace_ndctl.c dynamic,bounded -4288 ndctl_match_devdax : src/debug/common/region_namespace_ndctl.su:region_namespace_ndctl.c dynamic,bounded +4288 pmem2_devdax_match : src/debug/libpmem/region_namespace_ndctl.su:region_namespace_ndctl.c dynamic,bounded +4288 pmem2_devdax_match : src/debug/libpmempool/region_namespace_ndctl.su:region_namespace_ndctl.c dynamic,bounded +4288 pmem2_devdax_match : src/debug/libpmemobj/region_namespace_ndctl.su:region_namespace_ndctl.c dynamic,bounded +4288 pmem2_devdax_match : src/debug/libpmem2/region_namespace_ndctl.su:region_namespace_ndctl.c dynamic,bounded +4288 pmem2_devdax_match : src/debug/common/region_namespace_ndctl.su:region_namespace_ndctl.c dynamic,bounded 4208 util_header_check : src/debug/libpmempool/set.su:set.c dynamic,bounded 4208 util_header_check : src/debug/libpmemobj/set.su:set.c dynamic,bounded 4208 util_header_check : src/debug/common/set.su:set.c dynamic,bounded diff --git a/src/stats/stack-usage-nondebug.txt b/src/stats/stack-usage-nondebug.txt index 7ac24525825..f1d354cafbc 100644 --- a/src/stats/stack-usage-nondebug.txt +++ b/src/stats/stack-usage-nondebug.txt @@ -13,16 +13,16 @@ 7424 memmove_mov_avx512f_empty : src/nondebug/libpmem/memcpy_t_avx512f.su:memcpy_t_avx512f.c static 7424 memmove_mov_avx512f_empty : src/nondebug/libpmem2/memcpy_t_avx512f.su:memcpy_t_avx512f.c static 4352 pool_params_parse.isra.2.constprop : src/nondebug/libpmempool/pool.su:pool.c dynamic,bounded -4272 ndctl_match_fsdax : src/nondebug/libpmem/region_namespace_ndctl.su:region_namespace_ndctl.c static -4272 ndctl_match_fsdax : src/nondebug/libpmempool/region_namespace_ndctl.su:region_namespace_ndctl.c static -4272 ndctl_match_fsdax : src/nondebug/libpmemobj/region_namespace_ndctl.su:region_namespace_ndctl.c static -4272 ndctl_match_fsdax : src/nondebug/libpmem2/region_namespace_ndctl.su:region_namespace_ndctl.c static -4272 ndctl_match_fsdax : src/nondebug/common/region_namespace_ndctl.su:region_namespace_ndctl.c static -4272 ndctl_match_devdax : src/nondebug/libpmem/region_namespace_ndctl.su:region_namespace_ndctl.c static -4272 ndctl_match_devdax : src/nondebug/libpmempool/region_namespace_ndctl.su:region_namespace_ndctl.c static -4272 ndctl_match_devdax : src/nondebug/libpmemobj/region_namespace_ndctl.su:region_namespace_ndctl.c static -4272 ndctl_match_devdax : src/nondebug/libpmem2/region_namespace_ndctl.su:region_namespace_ndctl.c static -4272 ndctl_match_devdax : src/nondebug/common/region_namespace_ndctl.su:region_namespace_ndctl.c static +4272 pmem2_fsdax_match : src/nondebug/libpmem/region_namespace_ndctl.su:region_namespace_ndctl.c static +4272 pmem2_fsdax_match : src/nondebug/libpmempool/region_namespace_ndctl.su:region_namespace_ndctl.c static +4272 pmem2_fsdax_match : src/nondebug/libpmemobj/region_namespace_ndctl.su:region_namespace_ndctl.c static +4272 pmem2_fsdax_match : src/nondebug/libpmem2/region_namespace_ndctl.su:region_namespace_ndctl.c static +4272 pmem2_fsdax_match : src/nondebug/common/region_namespace_ndctl.su:region_namespace_ndctl.c static +4272 pmem2_devdax_match : src/nondebug/libpmem/region_namespace_ndctl.su:region_namespace_ndctl.c static +4272 pmem2_devdax_match : src/nondebug/libpmempool/region_namespace_ndctl.su:region_namespace_ndctl.c static +4272 pmem2_devdax_match : src/nondebug/libpmemobj/region_namespace_ndctl.su:region_namespace_ndctl.c static +4272 pmem2_devdax_match : src/nondebug/libpmem2/region_namespace_ndctl.su:region_namespace_ndctl.c static +4272 pmem2_devdax_match : src/nondebug/common/region_namespace_ndctl.su:region_namespace_ndctl.c static 4224 check_domain_in_region : src/nondebug/libpmempool/auto_flush_linux.su:auto_flush_linux.c dynamic,bounded 4224 check_domain_in_region : src/nondebug/libpmemobj/auto_flush_linux.su:auto_flush_linux.c dynamic,bounded 4224 check_domain_in_region : src/nondebug/libpmem/auto_flush_linux.su:auto_flush_linux.c dynamic,bounded