From 9d7dcdd4798d75e50281284c4896946afa5fe97a Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Wed, 20 May 2026 00:17:18 +0200 Subject: [PATCH] If skip_access is enabled, don't call fsinfo on the device --- cmdline/state.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/cmdline/state.c b/cmdline/state.c index a9bafd44..5dac9a9a 100644 --- a/cmdline/state.c +++ b/cmdline/state.c @@ -310,9 +310,7 @@ static void state_config_check(struct snapraid_state* state, const char* path, t } } - /* skip data disks that are not accessible */ - if (disk->skip_access) - continue; + if (!state->opt.skip_parity_access) { for (l = 0; l < state->level; ++l) { @@ -1802,6 +1800,9 @@ void state_refresh(struct snapraid_state* state) /* LCOV_EXCL_STOP */ } + if (disk->skip_access) + continue; + ret = fsinfo(disk->dir, 0, 0, &total_space, &free_space, disk->fstype, sizeof(disk->fstype), disk->fslabel, sizeof(disk->fslabel)); if (ret != 0) { /* LCOV_EXCL_START */ @@ -1828,6 +1829,9 @@ void state_refresh(struct snapraid_state* state) state->parity[l].total_blocks = 0; state->parity[l].free_blocks = 0; + if (state->parity[l].skip_access) + continue; + for (s = 0; s < state->parity[l].split_mac; ++s) { struct snapraid_split* split = &state->parity[l].split_map[s]; uint64_t total_space;