Skip to content

feat(posixfs): #3182 add basepath option in the "posixfs scan" command - #3191

Open
pbleser-oc wants to merge 3 commits into
opencloud-eu:mainfrom
pbleser-oc:feat/#3182-posixfs-scan-subtree
Open

feat(posixfs): #3182 add basepath option in the "posixfs scan" command#3191
pbleser-oc wants to merge 3 commits into
opencloud-eu:mainfrom
pbleser-oc:feat/#3182-posixfs-scan-subtree

Conversation

@pbleser-oc

Copy link
Copy Markdown
Member

Description

Adds support for specifying a basepath using -p when running the posixfs scan command, to indicate a directory under which to start scanning, or a singular file to scan, as opposed to scanning from the storage root directory as is the default behaviour

Related Issue

Motivation and Context

In some scenarios, a system administrator might want to run the posixfs scan command under a specific subdirectory of the storage root instead of the whole tree under the storage root. This is made possible by specifying the basepath introduced with this change.

How Has This Been Tested?

Tested manually in a local environment, by disabling posixfs watching (with STORAGE_USERS_POSIX_WATCH_FS set to false) and then copying files into the storage, checking that they had no xattrs set on them (using getfattr -d), running the posixfs scan command on them, both on individual files and on the containing directory, and then checking that OpenCloud posixfs metadata has been set on those files afterwards (again using getfattr -d).

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation added

When events occur in the supervisor, log them as FATAL when appropriate
(panic and termination when not restarting) instead of always using
INFO, and include more information such as the service name and the
current failures, etc..., rather than the generic message that was used
so far.
…scan" command

 * add support for specifying a basepath using -p when running the
   posixfs scan command, to indicate a directory under which to start
   scanning, or a singular file to scan, as opposed to scanning from the
   storage root directory as is the default behaviour

 * implements opencloud-eu#3182
@codacy-production

codacy-production Bot commented Jul 29, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 duplication

Metric Results
Duplication 0

View in Codacy

🟢 Coverage 28.07% diff coverage · +0.02% coverage variation

Metric Results
Coverage variation +0.02% coverage variation (-1.00%)
Diff coverage 28.07% diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (7438990) 82331 19130 23.24%
Head commit (ade9631) 82386 (+55) 19163 (+33) 23.26% (+0.02%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#3191) 57 16 28.07%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant