Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DAOS-14476 dfs: update root stbuf on lookup of root #13597

Merged
merged 1 commit into from
Jan 22, 2024

Conversation

mchaarawi
Copy link
Contributor

  • In order to avoid stale root stat data, update the root stbuf on lookup.
  • add mtime/ctime proper querying for dfs_lookup()

Required-githooks: true

Before requesting gatekeeper:

  • Two review approvals and any prior change requests have been resolved.
  • Testing is complete and all tests passed or there is a reason documented in the PR why it should be force landed and forced-landing tag is set.
  • Features: (or Test-tag*) commit pragma was used or there is a reason documented that there are no appropriate tags for this PR.
  • Commit messages follows the guidelines outlined here.
  • Any tests skipped by the ticket being addressed have been run and passed in the PR.

Gatekeeper:

  • You are the appropriate gatekeeper to be landing the patch.
  • The PR has 2 reviews by people familiar with the code, including appropriate watchers.
  • Githooks were used. If not, request that user install them and check copyright dates.
  • Checkpatch issues are resolved. Pay particular attention to ones that will show up on future PRs.
  • All builds have passed. Check non-required builds for any new compiler warnings.
  • Sufficient testing is done. Check feature pragmas and test tags and that tests skipped for the ticket are run and now pass with the changes.
  • If applicable, the PR has addressed any potential version compatibility issues.
  • Check the target branch. If it is master branch, should the PR go to a feature branch? If it is a release branch, does it have merge approval in the JIRA ticket.
  • Extra checks if forced landing is requested
    • Review comments are sufficiently resolved, particularly by prior reviewers that requested changes.
    • No new NLT or valgrind warnings. Check the classic view.
    • Quick-build or Quick-functional is not used.
  • Fix the commit message upon landing. Check the standard here. Edit it to create a single commit. If necessary, ask submitter for a new summary.

Copy link

Bug-tracker data:
Ticket title is 'dfs_lookup("/") returns stale data.'
Status is 'Open'
Labels: 'triaged'
https://daosio.atlassian.net/browse/DAOS-14476

@mchaarawi mchaarawi force-pushed the mschaara/stale_root_stbuf branch 2 times, most recently from 6271472 to 8b6bd9b Compare January 12, 2024 17:40
@daosbuild1
Copy link
Collaborator

Test stage NLT on EL 8.8 completed with status UNSTABLE. https://build.hpdd.intel.com/job/daos-stack/job/daos//view/change-requests/job/PR-13597/3/testReport/

- In order to avoid stale root stat data, update the root stbuf on lookup.
- add mtime/ctime proper querying for dfs_lookup()
- destroy the uns container after the link is remove since dfuse looks
  up the root if the container of being destroyed.

Features: dfs
Required-githooks: true

Signed-off-by: Mohamad Chaarawi <mohamad.chaarawi@intel.com>
@daosbuild1
Copy link
Collaborator

Test stage Functional Hardware Medium completed with status UNSTABLE. https://build.hpdd.intel.com/job/daos-stack/job/daos//view/change-requests/job/PR-13597/4/testReport/

@mchaarawi mchaarawi marked this pull request as ready for review January 16, 2024 13:35
@mchaarawi mchaarawi requested a review from a team as a code owner January 16, 2024 13:35
rc = fetch_entry(dfs->layout_v, dfs->super_oh, DAOS_TX_NONE, "/", 1, false,
&exists, &entry, 0, NULL, NULL, NULL);
if (rc) {
D_ERROR("fetch_entry() failed: %d (%s)\n", rc, strerror(rc));
Copy link
Contributor

Choose a reason for hiding this comment

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

You could use DS_ERROR here for brevity./

Suggested change
D_ERROR("fetch_entry() failed: %d (%s)\n", rc, strerror(rc));
DS_ERROR(rc, "fetch_entry() failed");

/** Destroy the container */
rc = daos_cont_destroy(poh, dattr.da_cont, 1, NULL);
if (rc) {
D_ERROR("Failed to destroy container (%d)\n", rc);
Copy link
Contributor

Choose a reason for hiding this comment

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

This probably should if you need to re-push.

Suggested change
D_ERROR("Failed to destroy container (%d)\n", rc);
DL_ERROR(rc, "Failed to destroy container");

@mchaarawi mchaarawi merged commit 89f9182 into master Jan 22, 2024
46 of 48 checks passed
@mchaarawi mchaarawi deleted the mschaara/stale_root_stbuf branch January 22, 2024 16:32
mchaarawi added a commit that referenced this pull request Jan 22, 2024
- In order to avoid stale root stat data, update the root stbuf on lookup.
- add mtime/ctime proper querying for dfs_lookup()
- destroy the uns container after the link is remove since dfuse looks
  up the root if the container of being destroyed.

Required-githooks: true

Signed-off-by: Mohamad Chaarawi <mohamad.chaarawi@intel.com>
mchaarawi added a commit that referenced this pull request Jan 26, 2024
* DAOS-14474 dfs: remove unused --evict option from checker (#13616)

The dfs fs check command already allows evicting containers using the
--flags=evict option. the --evict option was added by mistake and does
not do anything today, so remove it.

* DAOS-14219 dfs: checker should not follow symlinks (#13625)

The DFS checker should mark the symlink oid and not dereference the
symlink value. the value can be invalid anyway and if a valid path in
the container, it would be reachable from the hardlink path.

* DAOS-14476 dfs: update root stbuf on lookup of root (#13597)

- In order to avoid stale root stat data, update the root stbuf on lookup.
- add mtime/ctime proper querying for dfs_lookup()
- destroy the uns container after the link is remove since dfuse looks
  up the root if the container of being destroyed.

* DAOS-15049 dfs: fix bug in setattr when mtime and size are being set (#13640)

- in dfs_osetattr(), if user sets both mtime and size, the hlc for the
  mtime is not being update on storage. To fix that, use the hlc
  reported from the array_stat and update that when updating the mtime in
  the entry.

Signed-off-by: Mohamad Chaarawi <mohamad.chaarawi@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants