Skip to content
Snippets Groups Projects
Unverified Commit 30446ad8 authored by Piotr Balcer's avatar Piotr Balcer Committed by GitHub
Browse files

Merge pull request #4996 from pbalcer/sds-remove-extraneous-checks

pool: remove sds extraneous
parents c5641264 493ee83f
No related branches found
No related tags found
No related merge requests found
......@@ -26,7 +26,6 @@ enum question {
#define SDS_CHECK_STR "checking shutdown state"
#define SDS_OK_STR "shutdown state correct"
#define SDS_DIRTY_STR "shutdown state is dirty"
#define SDS_NOT_SUPP "shutdown state not supported"
#define ADR_FAILURE_STR \
"an ADR failure was detected - your pool might be corrupted"
......@@ -47,22 +46,6 @@ enum question {
? SDS_DIRTY_STR ".|" ZERO_SDS_STR \
: ADR_FAILURE_STR ".|" RESET_SDS_STR
/*
*
*/
static int
sds_is_supported(location *loc)
{
LOG(3, NULL);
ASSERTne(loc, NULL);
struct pool_replica *rep = REP(loc->set, 0);
ASSERTne(rep, NULL);
ASSERTne(PART(rep, 0)->fd, 0);
return shutdown_state_is_supported(PART(rep, 0)->fd);
}
/*
* sds_check_replica -- (internal) check if replica is healthy
*/
......@@ -106,13 +89,6 @@ sds_check(PMEMpoolcheck *ppc, location *loc)
CHECK_INFO(ppc, "%s" SDS_CHECK_STR, loc->prefix);
/* shutdown state is supported */
if (sds_is_supported(loc)) {
CHECK_INFO(ppc, "%s" SDS_NOT_SUPP, loc->prefix);
loc->step = CHECK_STEP_COMPLETE;
return 0;
}
/* shutdown state is valid */
if (!sds_check_replica(loc)) {
CHECK_INFO(ppc, "%s" SDS_OK_STR, loc->prefix);
......@@ -276,12 +252,6 @@ check_sds(PMEMpoolcheck *ppc)
/* initialize replica 0 for sds check */
loc->replica = 0;
init_location_data(ppc, loc);
if (!sds_is_supported(loc)) {
CHECK_INFO(ppc, "%s" SDS_CHECK_STR,
loc->prefix);
CHECK_INFO(ppc, "%s" SDS_NOT_SUPP, loc->prefix);
return;
}
if (!loc->init_done) {
sds_get_healthy_replicas_num(ppc, loc);
......
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2014-2019, Intel Corporation
# Copyright 2014-2020, Intel Corporation
#
#
# pmempool_check/TEST1 -- test for checking pools
......@@ -20,7 +20,7 @@ echo "PMEMLOG: pool_hdr" > $LOG
expect_normal_exit $PMEMPOOL create log $POOL
check_file $POOL
Invoke-Expression "$PMEMSPOIL -v $POOL pool_hdr.major=0x0 pool_hdr.features.compat=0xfe pool_hdr.features.incompat=0xfe pool_hdr.features.ro_compat=0xfb pool_hdr.shutdown_state.usc=0 pool_hdr.shutdown_state.uuid=0 'pool_hdr.shutdown_state.f:checksum_gen' pool_hdr.unused=ERROR >> $LOG"
Invoke-Expression "$PMEMSPOIL -v $POOL pool_hdr.major=0x0 pool_hdr.features.compat=0xfe pool_hdr.features.incompat=0xfb pool_hdr.features.ro_compat=0xff pool_hdr.shutdown_state.usc=0 pool_hdr.shutdown_state.uuid=0 'pool_hdr.shutdown_state.f:checksum_gen' pool_hdr.unused=ERROR >> $LOG"
expect_normal_exit $PMEMPOOL check -vry $POOL >> $LOG
echo "PMEMLOG: pmemlog" >> $LOG
......
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2017-2019, Intel Corporation
# Copyright 2017-2020, Intel Corporation
#
# pmempool_check/TEST9 -- test for checking pmemobj pool
#
......@@ -23,7 +23,7 @@ expect_normal_exit $PMEMPOOL check -vyr $POOL >> $LOG
&$PMEMSPOIL -v $POOL `
pool_hdr.major=0x0 `
pool_hdr.features.compat=0xfe `
pool_hdr.features.incompat=0xfe `
pool_hdr.features.incompat=0xfb `
pool_hdr.features.ro_compat=0xff `
pool_hdr.shutdown_state.usc=0 `
pool_hdr.shutdown_state.uuid=0 `
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment