Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
0ab9610
test: disable VARIANT_MOVDIR64B under Valgrind
osalyk Nov 20, 2024
4a9b56f
common: regular validation with basic OSes
grom72 Jan 20, 2025
d1eec01
common: remove paralel execution to stop build on the first failure
grom72 Jan 20, 2025
30a2abe
common: add status badge for Main workflow
grom72 Jan 20, 2025
35dd4b2
common: pmem2_badblock_next is replaced by pmem2_badblock_next_internal
grom72 Jan 3, 2025
22cbe18
common: fix - clang-format update from 9.0 to 14.0
grom72 Jan 17, 2025
9ae3358
common: fix clang '-Wcast-function-type-strict' issue
grom72 Jan 17, 2025
4508616
common: ChangeLog supplement for #6117 and #6127
grom72 Jan 21, 2025
87a75a6
fix: review
grom72 Jan 29, 2025
1ed4ce1
common: change lower_limit
osalyk Jan 31, 2025
69a56d9
common: check clang version
osalyk Feb 6, 2025
5a0dc0d
Include HPE in general license files
grom72 Feb 14, 2025
3898c19
common: 2.1.1-rc1 release
osalyk Feb 17, 2025
bb0c210
common: git versions
osalyk Feb 17, 2025
b4edc2c
common: 2.1.1-rc2 release
osalyk Feb 18, 2025
865d6e1
common: git versions
osalyk Feb 18, 2025
70b3565
common: 2.1.1 release
osalyk Feb 19, 2025
2b957fd
common: git versions
osalyk Feb 19, 2025
f46984d
test: call setup before require_sds
osalyk Feb 25, 2025
5865fc6
common: update before install (aarch64)
janekmi Mar 3, 2025
5b503be
test: unblock obj_sds tests for non-pmem
osalyk Feb 25, 2025
a531788
test: check if mock functions are used
osalyk Feb 26, 2025
4c5a67a
common: update workflow files
osalyk Apr 8, 2025
910d119
test: add unit test for sds_check (#1)
osalyk May 14, 2025
d5dfe44
utils: switch self hosted runners to the new repo location
osalyk Sep 18, 2025
f74873e
common: fix typo
osalyk Oct 2, 2025
d92048c
common: split the pmem_tests.yml file (#9)
osalyk Oct 7, 2025
e3f9f69
common: reshuffle the jobs to fit both workflows into the 24-hour window
osalyk Oct 10, 2025
22d6930
common: extend jobs timeouts (#11)
osalyk Oct 13, 2025
d600a7e
common: add new timeout to static build
osalyk Oct 15, 2025
7154100
common: update the badges in the README.md file
osalyk Oct 15, 2025
502075f
common: limit Static builds to ICX runners only
osalyk Oct 16, 2025
9d35a33
common: expand the sds.at_create CTL to also cover pmemobj_open()
janekmi Sep 5, 2025
533bf57
test: expand the sds.at_create CTL to also cover pmemobj_open() (fix)
janekmi Oct 17, 2025
1318c54
common: 2.1.2-rc1 release
osalyk Oct 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/docker_rebuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ env:
GH_CR_USER: ${{ secrets.GH_CR_USER }}
GH_CR_PAT: ${{ secrets.GH_CR_PAT }}

GITHUB_REPO: pmem/pmdk
GITHUB_REPO: ${{ github.repository }}
DOCKER_REPO: ghcr.io/pmem/pmdk
WORKDIR: utils/docker
PUSH_IMAGE: 1
Expand All @@ -27,7 +27,7 @@ permissions: {}

jobs:
image:
if: github.repository == 'pmem/pmdk'
if: ${{ github.repository_owner == 'daos-stack' }}
name: Image
runs-on: ubuntu-latest
strategy:
Expand Down
17 changes: 11 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name: Main

on:
workflow_dispatch:
schedule:
# run this job at 23:00 UTC every other day
- cron: '0 23 */2 * *'
pull_request:

permissions: {}
Expand All @@ -21,11 +24,11 @@ jobs:
fetch-depth: 50

- name: Check changelog
# Skip for pmem/pmdk/master and stable-* branches
# Skip for master and stable-* branches
if: |
!(github.repository == 'pmem/pmdk' &&
(github.ref_name == 'master' || startsWith(github.ref_name, 'stable-'))) &&
github.event_name == 'pull_request'
!(github.repository_owner == 'daos-stack' &&
(github.ref_name == 'master' || startsWith(github.ref_name, 'stable-'))) &&
github.event_name == 'pull_request'
uses: Zomzog/changelog-checker@09cfe9ad3618dcbfdba261adce0c41904cabb8c4 # v1.3.0
with:
fileName: ChangeLog
Expand Down Expand Up @@ -70,7 +73,7 @@ jobs:
NDCTL_ENABLE: n # just to speed up the job
PMEMOBJ_IGNORE_DIRTY_SHUTDOWN: y # not recommended for production
PMEMOBJ_IGNORE_BAD_BLOCKS: y # not recommended for production
run: make -j$(nproc) cstyle
run: make cstyle


basic_build:
Expand Down Expand Up @@ -107,7 +110,9 @@ jobs:

- if: ${{ contains(matrix.CC, 'aarch64') }}
name: Install dependencies (aarch64)
run: sudo apt-get -y install gcc-aarch64-linux-gnu g++-11-aarch64-linux-gnu binutils-aarch64-linux-gnu
run: |
sudo apt-get update
sudo apt-get -y install gcc-aarch64-linux-gnu g++-11-aarch64-linux-gnu binutils-aarch64-linux-gnu

- name: Build sources
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
- '*'

env:
GITHUB_REPO: pmem/pmdk
GITHUB_REPO: ${{ github.repository }}
DOCKER_REPO: ghcr.io/pmem/pmdk
HOST_WORKDIR: /home/runner/work/pmdk/pmdk
WORKDIR: utils/docker
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pmem_ras.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ permissions: {}
jobs:
linux:
name: PMEM_RAS
if: github.repository == 'pmem/pmdk'
if: github.repository_owner == 'daos-stack'
runs-on: [self-hosted, ras_controller]
env:
WORKDIR: utils/gha-runners
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pmem_test_matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ permissions: {}
jobs:
job:
name: ${{ matrix.force_enable }}, ${{ matrix.test_script }}, ${{ matrix.os }}, ${{ matrix.build }}
if: github.repository == 'pmem/pmdk'
runs-on: [self-hosted, "${{ matrix.os }}"]
if: github.repository_owner == 'daos-stack'
runs-on: [self-hosted, pmdk, "${{ matrix.os }}"]
timeout-minutes: ${{ inputs.timeout_minutes }}
strategy:
fail-fast: false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Run all tests on PMEM.
#
# This workflow is run on 'self-hosted' runners.
name: PMEM tests
name: PMEM tests part 1

on:
workflow_dispatch:
schedule:
# run this job at 18:00 UTC every day
- cron: '0 18 * * *'
# run this job at 18:00 UTC every other day (even-numbered)
- cron: '0 18 2-31/2 * *'

permissions: {}

Expand All @@ -26,31 +26,12 @@ jobs:
valgrind: ${{ matrix.VALGRIND }}


# Test the default build with force-enabled Valgrind tooling for (persistent)
# memory error detection.
Memory:
uses: ./.github/workflows/pmem_test_matrix.yml
with:
force_enable: '["pmemcheck", "memcheck"]'
valgrind: 1


# Test the default build with force-enabled Valgrind tooling for thread error
# detection.
Thread:
uses: ./.github/workflows/pmem_test_matrix.yml
with:
force_enable: '["drd", "helgrind"]'
valgrind: 1
# 9h = 7h20m (the longest workflow execution time) + ~20% leeway.
timeout_minutes: 540


# Static builds are tested in this limited scope only.
static:
name: Static
if: github.repository == 'pmem/pmdk'
runs-on: [self-hosted, rhel]
if: github.repository_owner == 'daos-stack'
runs-on: [self-hosted, pmdk, rhel, icx]
timeout-minutes: 1440 # 24h
strategy:
fail-fast: false
matrix:
Expand All @@ -74,8 +55,8 @@ jobs:
# at compile time.
fault_injection:
name: Fault injection
if: github.repository == 'pmem/pmdk'
runs-on: [self-hosted, rhel]
if: github.repository_owner == 'daos-stack'
runs-on: [self-hosted, pmdk, rhel]

steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
Expand All @@ -100,8 +81,8 @@ jobs:
# https://github.com/daos-stack/pmdk/pull/35
ndctl_enable_n:
name: Without ndctl
if: github.repository == 'pmem/pmdk'
runs-on: [self-hosted, rhel]
if: github.repository_owner == 'daos-stack'
runs-on: [self-hosted, pmdk, rhel]

steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/pmem_tests_2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Run all tests on PMEM.
#
# This workflow is run on 'self-hosted' runners.
name: PMEM tests part 2

on:
workflow_dispatch:
schedule:
# run this job at 18:00 UTC every other day (odd-numbered)
- cron: '0 18 */2 * *'

permissions: {}

jobs:
# Test the default build with force-enabled Valgrind tooling for (persistent)
# memory error detection.
Memory:
uses: ./.github/workflows/pmem_test_matrix.yml
with:
force_enable: '["pmemcheck", "memcheck"]'
valgrind: 1
# 12h = 720m (arbitrarily picked in hope it will be enough).
timeout_minutes: 720


# Test the default build with force-enabled Valgrind tooling for thread error
# detection.
Thread:
uses: ./.github/workflows/pmem_test_matrix.yml
with:
force_enable: '["drd", "helgrind"]'
valgrind: 1
# 12h = 720m (arbitrarily picked in hope it will be enough).
timeout_minutes: 720
2 changes: 1 addition & 1 deletion .github/workflows/scan_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
env:
# Note: All coverage scans, e.g. on pull requests, should be run in the same
# environment.
GITHUB_REPO: pmem/pmdk
GITHUB_REPO: ${{ github.repository }}
DOCKER_REPO: ghcr.io/pmem/pmdk
HOST_WORKDIR: /home/runner/work/pmdk/pmdk
WORKDIR: utils/docker
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scan_coverity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
required: true

env:
GITHUB_REPO: pmem/pmdk
GITHUB_REPO: ${{ github.repository }}
DOCKER_REPO: ghcr.io/pmem/pmdk
COVERITY_SCAN_NOTIFICATION_EMAIL: ${{ secrets.COVERITY_SCAN_NOTIFICATION_EMAIL }}
COVERITY_SCAN_TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/scan_stack_usage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ jobs:
./make_extra.py
./make_cflow.sh
# The lower limit comes up from the DAOS memory requirements.
# 16kB - 4kB - 752B = 11536B
# 16kB - 4kB - 720B = 11568B
# 16kB = Stack allocated for a single Argobot's ULT
# 4kB = a maximum DAOS' stack usage up to calling a PMDK API calls
# 752B = safety margin
# 720B = safety margin
# ~ = Some OSes, e.g. Ubuntu 22.04, generate call stacks of size
# a little bit over the exact limit which is not deemed a problem at the moment.
./make_call_stacks.py --filter-api-file examples/api_filter.txt --filter-lower-limit 11536
./make_call_stacks.py --filter-api-file examples/api_filter.txt --filter-lower-limit 11568

- name: List per-function stack usage for all call stacks of interest
working-directory: ${{ env.CALL_STACKS_TOOLS_PATH }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scan_ubsan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
workflow_call:

env:
GITHUB_REPO: pmem/pmdk
GITHUB_REPO: ${{ github.repository }}
DOCKER_REPO: ghcr.io/pmem/pmdk
HOST_WORKDIR: /home/runner/work/pmdk/pmdk
WORKDIR: utils/docker
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
workflow_call:

env:
GITHUB_REPO: pmem/pmdk
GITHUB_REPO: ${{ github.repository }}
DOCKER_REPO: ghcr.io/pmem/pmdk

permissions: {}
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Before contributing please remember to run:
```

This will check all C/C++ files in the tree for style issues. To check C++
files you have to have clang-format version 9.0, otherwise they will be
files you have to have clang-format version 14.0, otherwise they will be
skipped. If you want to run this target automatically at build time, you can
pass CSTYLEON=1 to make. If you want cstyle to be run, but not fail the build,
pass CSTYLEON=2 to make.
Expand Down
18 changes: 16 additions & 2 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
XXX
Mon Oct 20 2025 Oksana Sałyk <oksana.salyk@hpe.com>

* Version X.X.X
* Version 2.1.2

- expand the sds.at_create CTL to also cover pmemobj_open() (daos-stack/pmdk#5, DAOS-17449)
- Previously, this CTL affected only pmemobj_create().
- Now, it affects both pmemobj_create() and pmemobj_open().
- pmemobj_open() won't be able to open a pool with SDS enabled if the feature is currently
force-disabled.
- Conversely, pmemobj_open() does not issue a warning when attempting to open a pool with SDS disabled
while the feature is force-disabled.

Wed Feb 19 2025 Oksana Sałyk <oksana.salyk@hpe.com>

* Version 2.1.1

- remove non-Linux support from all compilation paths (OS_KERNEL_NAME)
- add an aarch64 cross-compilation (requested by DAOS)
- mute error messages when transactions are intentionally aborted (#6117)
- mute error message "Cannot find any matching device, no bad blocks found" when PMDK is used without PMem (#6127)

Thu May 23 2024 Oksana Sałyk <oksana.salyk@intel.com>

Expand Down
1 change: 0 additions & 1 deletion GIT_VERSION

This file was deleted.

2 changes: 1 addition & 1 deletion INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ cd pmdk
For a stable version, checkout a [release tag](https://github.com/pmem/pmdk/releases) as follows. Otherwise skip this step to build the latest development release.

```sh
git checkout tags/2.1.0
git checkout tags/2.1.1
```

Once all required [dependencies](#dependencies) are installed, PMDK is built using the
Expand Down
1 change: 1 addition & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Copyright 2014-2024, Intel Corporation
Copyright 2025, Hewlett Packard Enterprise Development LP

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
Expand Down
1 change: 1 addition & 0 deletions LICENSE/BSD-3-Clause
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
BSD 3-Clause "New" or "Revised" License

Copyright 2014-2024, Intel Corporation
Copyright 2025, Hewlett Packard Enterprise Development LP

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
Expand Down
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# **PMDK: Persistent Memory Development Kit**

[![Nightly](https://github.com/pmem/pmdk/actions/workflows/nightly.yml/badge.svg?branch=master)](https://github.com/pmem/pmdk/actions/workflows/nightly.yml)
[![Scans](https://github.com/pmem/pmdk/actions/workflows/scans.yml/badge.svg?branch=master)](https://github.com/pmem/pmdk/actions/workflows/scans.yml)
[![Coverage](https://codecov.io/github/pmem/pmdk/coverage.svg?branch=master)](https://codecov.io/gh/pmem/pmdk/branch/master)
[![PMem test](https://github.com/pmem/pmdk/actions/workflows/pmem_tests.yml/badge.svg?branch=master)](https://github.com/pmem/pmdk/actions/workflows/pmem_tests.yml)
[![Pmem RAS](https://github.com/pmem/pmdk/actions/workflows/pmem_ras.yml/badge.svg?branch=master)](https://github.com/pmem/pmdk/actions/workflows/pmem_ras.yml)
[![Docker rebuild](https://github.com/pmem/pmdk/actions/workflows/docker_rebuild.yml/badge.svg?branch=master)](https://github.com/pmem/pmdk/actions/workflows/docker_rebuild.yml)
[![Main](https://github.com/daos-stack/pmdk/actions/workflows/main.yml/badge.svg)](https://github.com/daos-stack/pmdk/actions/workflows/main.yml)
[![Nightly](https://github.com/daos-stack/pmdk/actions/workflows/nightly.yml/badge.svg?branch=master)](https://github.com/daos-stack/pmdk/actions/workflows/nightly.yml)
[![Scans](https://github.com/daos-stack/pmdk/actions/workflows/scans.yml/badge.svg?branch=master)](https://github.com/daos-stack/pmdk/actions/workflows/scans.yml)
[![PMem test 1](https://github.com/daos-stack/pmdk/workflows/PMEM%20tests%20part%201/badge.svg)](https://github.com/daos-stack/pmdk/actions/workflows/pmem_tests_1.yml)
[![PMem test 2](https://github.com/daos-stack/pmdk/workflows/PMEM%20tests%20part%202/badge.svg)](https://github.com/daos-stack/pmdk/actions/workflows/pmem_tests_2.yml)

The **Persistent Memory Development Kit (PMDK)** is a collection of libraries and tools for System Administrators and Application Developers to simplify managing and accessing persistent memory devices. For more information, see https://pmem.io.

Expand Down
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.1.2-rc1
11 changes: 8 additions & 3 deletions doc/libpmemobj/pmemobj_ctl_get.3.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,14 @@ impact of pagefaults. Affects only the **pmemobj_open**() function.

sds.at_create | rw | global | int | int | - | boolean

If set, force-enables or force-disables SDS feature during pool creation.
Affects only the **pmemobj_create**() function. See **pmempool_feature_query**(3)
for information about SDS (SHUTDOWN_STATE) feature.
If set, this option force-enables or force-disables the SDS feature.
It affects both the **pmemobj_create**() and **pmemobj_open**() functions.
A pool created while SDS is force-disabled will have the feature persistently disabled.
To enable the feature for an existing pool, use **pmempool_feature_enable**(3).
**pmemobj_open**() cannot open a pool with SDS enabled if the feature is currently force-disabled.
Conversely, pmemobj_open() does not issue a warning when attempting to open a pool with SDS disabled
while the feature is force-disabled.
For more information about the SDS (SHUTDOWN_STATE) feature, see **pmempool_feature_query**(3).

copy_on_write.at_open | rw | global | int | int | - | boolean

Expand Down
5 changes: 3 additions & 2 deletions src/common.inc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2014-2023, Intel Corporation
# Copyright 2025, Hewlett Packard Enterprise Development LP
#
# src/common.inc -- common Makefile rules for PMDK
#
Expand Down Expand Up @@ -39,8 +40,8 @@ $(error Cannot evaluate version)
endif

ifeq ($(CLANG_FORMAT),)
ifeq ($(shell command -v clang-format-9 > /dev/null && echo y || echo n), y)
export CLANG_FORMAT ?= clang-format-9
ifeq ($(shell command -v clang-format-14 > /dev/null && echo y || echo n), y)
export CLANG_FORMAT ?= clang-format-14
else
export CLANG_FORMAT ?= clang-format
endif
Expand Down
5 changes: 5 additions & 0 deletions src/common/ctl_sds.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2018-2021, Intel Corporation */
/* Copyright 2025, Hewlett Packard Enterprise Development LP */

/*
* ctl_sds.c -- implementation of the sds CTL namespace
Expand Down Expand Up @@ -32,6 +33,10 @@ CTL_WRITE_HANDLER(at_create)(void *ctx, enum ctl_query_source source,

int arg_in = *(int *)arg;

if (SDS_at_create != arg_in && arg_in == 0) {
CORE_LOG_HARK("PMEM feature disabled: SDS_at_create=0");
}

SDS_at_create = arg_in;

return 0;
Expand Down
Loading
Loading