Skip to content

Conversation

janekmi
Copy link
Contributor

@janekmi janekmi commented Sep 5, 2025

@janekmi janekmi requested a review from grom72 September 5, 2025 16:35
@janekmi
Copy link
Contributor Author

janekmi commented Sep 5, 2025

Preview - pool with disabled SDS (MD-on-SSD-like)

$ diff log_create_org.txt log_create_mod.txt 
9a10
> <libpmemobj>: <1> [ctl_sds.c:36 ctl__at_create_write] PMEM feature disabled: SDS_at_create=0
$ diff log_open_org.txt log_open_mod.txt 
9a10
> <libpmemobj>: <1> [ctl_sds.c:36 ctl__at_create_write] PMEM feature disabled: SDS_at_create=0
11,12c12
< <libpmemobj>: <1> [obj.c:1090 pmemobj_createU] cannot create pool or pool set
< <libpmemobj>: <2> [set.c:2794 util_replica_check] Possible silent data corruption. The unsafe shutdown detection (SDS) is not supported in the pool: /tmp/myfile
---
> <libpmemobj>: <1> [obj.c:1096 pmemobj_createU] cannot create pool or pool set

Files

log_create_org.txt
log_create_mod.txt
log_open_org.txt
log_open_mod.txt

@janekmi
Copy link
Contributor Author

janekmi commented Sep 5, 2025

Preview - pool with enabled SDS (MD-on-PMEM-like)

Excuse me for using an SDS-enabled pool on non-PMEM. 😆 Please ignore it. The key bit is how modified PMEMOBJ behaves in case it will open a SDS-enabled pool will

$ diff log_open_sds_enabled_pool_org.txt log_open_sds_enabled_pool_mod.txt 
9a10
> <libpmemobj>: <1> [ctl_sds.c:37 ctl__at_create_write] PMEM feature disabled: SDS_at_create=0
12,13c13,14
< <libpmemobj>: <1> [usc_ndctl.c:54 pmem2_source_device_usc] Unsafe shutdown count is not supported for this source
< <libpmemobj>: <1> [shutdown_state.c:80 shutdown_state_add_part] cannot read unsafe shutdown count for 4
---
> <libpmemobj>: <1> [pool_hdr.c:173 util_feature_check] unsafe to continue due to unknown incompat features: 0x4
> <libpmemobj>: <1> [set.c:2804 util_replica_check] header check failed - part #0
15c16
< /tmp/myfile: No such file or directory
---
> /tmp/myfile: Invalid argument

Files

log_open_sds_enabled_pool_org.txt
log_open_sds_enabled_pool_mod.txt

@janekmi janekmi force-pushed the DAOS-17449-expand_sds_at_create branch from baa475a to 52ea4c4 Compare September 5, 2025 17:19
@janekmi janekmi marked this pull request as ready for review September 5, 2025 17:20
int arg_in = *(int *)arg;

if (SDS_at_create != arg_in && arg_in == 0) {
CORE_LOG_HARK("PMEM feature disabled: SDS_at_create=%d", arg_in);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
CORE_LOG_HARK("PMEM feature disabled: SDS_at_create=%d", arg_in);
CORE_LOG_HARK("PMEM feature disabled: SDS_at_create=0");

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

{
/* force set SDS feature */
if (SDS_at_create) {
attr->features.incompat |= POOL_FEAT_SDS; /* on */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we enable SDS for opening if initially disabled?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@janekmi janekmi force-pushed the DAOS-17449-expand_sds_at_create branch from 52ea4c4 to ac7e950 Compare September 8, 2025 20:45
Copy link
Contributor Author

@janekmi janekmi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@janekmi reviewed 3 of 4 files at r1, 4 of 4 files at r3, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @grom72)

int arg_in = *(int *)arg;

if (SDS_at_create != arg_in && arg_in == 0) {
CORE_LOG_HARK("PMEM feature disabled: SDS_at_create=%d", arg_in);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

{
/* force set SDS feature */
if (SDS_at_create) {
attr->features.incompat |= POOL_FEAT_SDS; /* on */
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@janekmi janekmi force-pushed the DAOS-17449-expand_sds_at_create branch 2 times, most recently from 49fa5c4 to fe9dc2a Compare September 8, 2025 21:14
@janekmi janekmi force-pushed the DAOS-17449-expand_sds_at_create branch from fe9dc2a to 10a7039 Compare September 8, 2025 21:20
@janekmi janekmi requested a review from grom72 September 8, 2025 21:39
@janekmi janekmi changed the title common: expand the sds.at_create CTL to alos cover pmemobj_open() common: expand the sds.at_create CTL to also cover pmemobj_open() Sep 9, 2025
Copy link
Contributor

@grom72 grom72 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

@grom72 reviewed 1 of 4 files at r1, 5 of 7 files at r5, all commit messages.
Reviewable status: 6 of 8 files reviewed, 1 unresolved discussion (waiting on @janekmi)

Copy link
Contributor

@grom72 grom72 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 6 of 8 files reviewed, all discussions resolved (waiting on @janekmi)

Copy link
Contributor Author

@janekmi janekmi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@janekmi reviewed 2 of 7 files at r5, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @janekmi)

@janekmi janekmi merged commit 0bf7f8a into daos-stack:stable-2.1.0-daos Sep 9, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants