Skip to content

Commit

Permalink
pmemobj: introduce fuses against ill-considered use of NDCTL_ENABLE=n
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Michalski <jan.michalski@intel.com>
  • Loading branch information
janekmi committed Mar 15, 2024
1 parent 44cd084 commit c24892f
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ XXX
* Version 2.1.0

This release
- introduces fuses against ill-considered use of NDCTL_ENABLE=n
- PMEMOBJ_IGNORE_DIRTY_SHUTDOWN and PMEMOBJ_IGNORE_BAD_BLOCKS are required to acknowledge the understanding of what production-critical functions are missing for the build without NDCTL
- does not allow opening pmem pool without unsafe shoutdown counter if not explicitly disabled
- remove support for build time define NO_LIBPTHREAD

Expand Down
22 changes: 22 additions & 0 deletions src/libpmemobj/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,28 @@ SOURCE +=\

include ../Makefile.inc

ifeq ($(OS_DIMM),none)
NOT_RECOMMENDED = Continuing the build without NDCTL is highly NOT recommended for production quality systems.
RAS_SUFFIX = Please see https://www.intel.com/content/www/us/en/developer/articles/technical/build-pmem-apps-with-ras.html for more info on RAS features.
PMEMOBJ_IGNORE_DIRTY_SHUTDOWN ?= n
ifneq ($(PMEMOBJ_IGNORE_DIRTY_SHUTDOWN),y)
$(info Libpmemobj without NDCTL cannot detect dirty shutdowns. This may result in silent data corruption.)
$(info $(NOT_RECOMMENDED))
$(info If you understand the consequences for consistency of your data please set PMEMOBJ_IGNORE_DIRTY_SHUTDOWN=y to silence this error.)
$(info $(RAS_SUFFIX))
$(error )
endif

PMEMOBJ_IGNORE_BAD_BLOCKS ?= n
ifneq ($(PMEMOBJ_IGNORE_BAD_BLOCKS),y)
$(info Libpmemobj without NDCTL cannot detect bad blocks up front. This may result in SIGBUS at runtime.)
$(info $(NOT_RECOMMENDED))
$(info If you understand the consequences for the behaviour of your application at runtime please set PMEMOBJ_IGNORE_BAD_BLOCKS=y to silence this error.)
$(info $(RAS_SUFFIX))
$(error )
endif
endif

CFLAGS += -DUSE_LIBDL -D_PMEMOBJ_INTRNL $(LIBNDCTL_CFLAGS)

LIBS += -pthread -lpmem $(LIBDL) $(LIBNDCTL_LIBS)

0 comments on commit c24892f

Please sign in to comment.