-
Notifications
You must be signed in to change notification settings - Fork 301
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-12751 control: Add a daos filesystem evict command. #12331
Conversation
Bug-tracker data: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. No errors found by checkpatch.
Test stage NLT on EL 8 completed with status UNSTABLE. https://build.hpdd.intel.com/job/daos-stack/job/daos//view/change-requests/job/PR-12331/1/testReport/(root)/ |
80cf5bd
to
58af10b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style warning(s) for job https://build.hpdd.intel.com/job/daos-stack/job/daos/job/PR-12331/2/
Please review https://wiki.hpdd.intel.com/display/DC/Coding+Rules
Test stage checkpatch completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-12331/2/execution/node/146/log |
Add a command to tell dfuse and the kernel to evict a path in dfuse. This is implemented via a ioctl that sets a flag on the file handle, when the file is then closed the kernel is then told the dentry for the file is no longer valid which should cause the kernel to forget the entry and any contents if the entry is a directory. Required-githooks: true Signed-off-by: Ashley Pittman <ashley.m.pittman@intel.com>
58af10b
to
5fdc6a7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. No errors found by checkpatch.
Required-githooks: true Signed-off-by: Ashley Pittman <ashley.m.pittman@intel.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. No errors found by checkpatch.
src/client/dfuse/ops/open.c
Outdated
if (oh->doh_evict_on_close) { | ||
rc = fuse_lowlevel_notify_inval_entry(fs_handle->dpi_info->di_session, | ||
oh->doh_ie->ie_parent, oh->doh_ie->ie_name, | ||
strnlen(oh->doh_ie->ie_name, NAME_MAX)); | ||
|
||
if (rc != 0) | ||
DFUSE_TRA_ERROR(oh->doh_ie, "inval_entry() returned: %d (%s)", rc, | ||
strerror(-rc)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is actually unsafe, once DFUSE_REPLY_ENTRY is called there's no longer a reference on the inode so I will take copies of this before landing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I misunderstand the ioctl stuff, but how would this work in the case of evicting a pool or container handle? For example, to pick up ACL changes
@@ -37,6 +37,7 @@ type fsCmd struct { | |||
ResetAttr fsResetAttrCmd `command:"reset-attr" description:"reset fs attributes"` | |||
ResetChunkSize fsResetChunkSizeCmd `command:"reset-chunk-size" description:"reset fs chunk size"` | |||
ResetObjClass fsResetOclassCmd `command:"reset-oclass" description:"reset fs obj class"` | |||
DfuseEvict fsDfuseEvictCmd `command:"evict" description:"Evict object from dfuse"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is ONLY for dfuse - not DFS - maybe evict
-> dfuse-evict
?
Or maybe it's okay if it only makes sense for dfuse anyway
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the only thing al these commands have in common is they're for POSIX containers and therefore DFS at some level. evict
doesn't mean anything in dfs directly that I'm aware of.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one thing i was thinking about here is that the daos fs options are on the container (server side), but these dfuse commands apply only on the client side (just the node they are running on). so they are just local operations and only executed on the node where this runs.
i don't know if that counts as grounds that we need to split this off into 2 tools or just have an extension to the dfuse command, or just keep it as it is. what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We discussed this extensively in the working group calls, this was your suggestion.
I'd be fine with making a new subcommand for the daos
command other than daos filesystem
but I don't want to do it in this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes i know, and i was just rethinking this. im fine to keeping it that way for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should just add a comment that this is a local client operation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree though, there's a clear distinction between commands that have an effect on the container itself vs commands that change local in-memory state.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something else to keep in mind is that we currently don't guarantee backwards compatibility for the command line, but I wonder if that will/should be a requirement in the future, since changing the command line interface later can be disruptive to deployment, job setup/cleanup, etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. No errors found by checkpatch.
Required-githooks: true Signed-off-by: Ashley Pittman <ashley.m.pittman@intel.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. No errors found by checkpatch.
Test stage NLT on EL 8 completed with status UNSTABLE. https://build.hpdd.intel.com/job/daos-stack/job/daos//view/change-requests/job/PR-12331/5/testReport/ |
Test stage NLT on EL 8 completed with status UNSTABLE. https://build.hpdd.intel.com/job/daos-stack/job/daos//view/change-requests/job/PR-12331/6/testReport/ |
Required-githooks: true Signed-off-by: Ashley Pittman <ashley.m.pittman@intel.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. No errors found by checkpatch.
Required-githooks: true Signed-off-by: Ashley Pittman <ashley.m.pittman@intel.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. No errors found by checkpatch.
Required-githooks: true Signed-off-by: Ashley Pittman <ashley.m.pittman@intel.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. No errors found by checkpatch.
Required-githooks: true Signed-off-by: Ashley Pittman <ashley.m.pittman@intel.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. No errors found by checkpatch.
Test stage Functional Hardware Medium completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-12331/12/execution/node/1276/log |
src/control/cmd/daos/filesystem.go
Outdated
if cmd.Ino != 0 { | ||
if ap.dfuse_mem.found { | ||
cmd.Infof(" Inode %#lx known", cmd.Ino) | ||
} else { | ||
cmd.Infof(" Inode %#lx not known", cmd.Ino) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm. It seems like it would be better UX for the command to show an error for an unknown/invalid inode rather than making the user parse the output to figure it out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not an error either way, it's in effect polling for the operation to have completed. Maybe the text in this output is badly worded but neither of these is an error. See the changes to filesystem.md in this PR for a full explanation.
Required-githooks: true Signed-off-by: Ashley Pittman <ashley.m.pittman@intel.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. No errors found by checkpatch.
Test stage Functional Hardware Medium completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-12331/13/execution/node/1286/log |
Test-tag: dfuse
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. No errors found by checkpatch.
docs/user/filesystem.md
Outdated
Paths can be requested for eviction from dfuse using the `daos filesystem evict` command, this does | ||
not change any data that is stored in DAOS in any way but rather releases local resources. This | ||
command will return the inode number of the path as well as key dfuse metrics. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Paths can be requested for eviction from dfuse using the `daos filesystem evict` command, this does | |
not change any data that is stored in DAOS in any way but rather releases local resources. This | |
command will return the inode number of the path as well as key dfuse metrics. | |
Paths can be requested for eviction from dfuse using the `daos filesystem evict` command. This does | |
not change any data that is stored in DAOS in any way but rather releases local resources. This | |
command will return the inode number of the path as well as key dfuse metrics. |
Test-tag: dfuse Required-githooks: true Signed-off-by: Ashley Pittman <ashley.m.pittman@intel.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. No errors found by checkpatch.
rc = errno; | ||
goto out; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general, shouldn't these use D_GOTO
?
Minor issues, https://github.com/daos-stack/daos/blob/amd/dfuse-evict/src/client/dfuse/ops/ioctl.c#L333 |
Yes, you're right. I've got more PRs to follow in this series, I can fix this up later. |
Multiple cherry-picks to add daos fs query feature for fuse statistics. Helpful for understanding and tuning DAOS performance when dfuse is used. DAOS-13625 dfuse: Merge the info and projection_info structs. (#11881) DAOS-13658 dfuse: Add filesystem query command. (#12367) DAOS-12751 control: Add a daos filesystem evict command. (#12331) DAOS-12751 dfuse: Improve evict command. (#12633) DAOS-13625 dfuse: Remove dfuse_projection_info entirely. (#12796) DAOS-13625 dfuse: Replace fs_handle with dfuse_info. (#12894) DAOS-13625 dfuse: Add core inode_lookup() and inode_decref() functions. (#12573) DAOS-14411 dfuse: Add per-container statistics. (#12819) Signed-off-by: Ashley Pittman <ashley.m.pittman@intel.com>
Multiple cherry-picks to add daos fs query feature for fuse statistics. Helpful for understanding and tuning DAOS performance when dfuse is used. DAOS-13625 dfuse: Merge the info and projection_info structs. (#11881) DAOS-13658 dfuse: Add filesystem query command. (#12367) DAOS-12751 control: Add a daos filesystem evict command. (#12331) DAOS-12751 dfuse: Improve evict command. (#12633) DAOS-13625 dfuse: Remove dfuse_projection_info entirely. (#12796) DAOS-13625 dfuse: Replace fs_handle with dfuse_info. (#12894) DAOS-13625 dfuse: Add core inode_lookup() and inode_decref() functions. (#12573) DAOS-14411 dfuse: Add per-container statistics. (#12819) Features: dfuse Required-githooks: true Change-Id: I8ae3cc743697c2434ae0d54b382ee6c585a3b033 Signed-off-by: Ashley Pittman <ashley.m.pittman@intel.com> Signed-off-by: Jeff Olivier <jeffolivier@google.com>
Multiple cherry-picks to add daos fs query feature for fuse statistics. Helpful for understanding and tuning DAOS performance when dfuse is used. DAOS-13625 dfuse: Merge the info and projection_info structs. (#11881) DAOS-13658 dfuse: Add filesystem query command. (#12367) DAOS-12751 control: Add a daos filesystem evict command. (#12331) DAOS-12751 dfuse: Improve evict command. (#12633) DAOS-13625 dfuse: Remove dfuse_projection_info entirely. (#12796) DAOS-13625 dfuse: Replace fs_handle with dfuse_info. (#12894) DAOS-13625 dfuse: Add core inode_lookup() and inode_decref() functions. (#12573) DAOS-14411 dfuse: Add per-container statistics. (#12819) Features: dfuse Required-githooks: true Change-Id: I8ae3cc743697c2434ae0d54b382ee6c585a3b033 Signed-off-by: Ashley Pittman <ashley.m.pittman@intel.com> Signed-off-by: Jeff Olivier <jeffolivier@google.com>
Multiple cherry-picks to add daos fs query feature for fuse statistics. Helpful for understanding and tuning DAOS performance when dfuse is used. DAOS-13625 dfuse: Merge the info and projection_info structs. (#11881) DAOS-13658 dfuse: Add filesystem query command. (#12367) DAOS-12751 control: Add a daos filesystem evict command. (#12331) DAOS-12751 dfuse: Improve evict command. (#12633) DAOS-13625 dfuse: Remove dfuse_projection_info entirely. (#12796) DAOS-13625 dfuse: Replace fs_handle with dfuse_info. (#12894) DAOS-13625 dfuse: Add core inode_lookup() and inode_decref() functions. (#12573) DAOS-14411 dfuse: Add per-container statistics. (#12819) DAOS-14411 control: Expose dfuse statistics as yaml. (#13876) Features: dfuse Required-githooks: true Change-Id: I8ae3cc743697c2434ae0d54b382ee6c585a3b033 Signed-off-by: Ashley Pittman <ashley.m.pittman@intel.com> Signed-off-by: Jeff Olivier <jeffolivier@google.com>
Multiple cherry-picks to add daos fs query feature for fuse statistics. Helpful for understanding and tuning DAOS performance when dfuse is used. DAOS-13625 dfuse: Merge the info and projection_info structs. (#11881) DAOS-13658 dfuse: Add filesystem query command. (#12367) DAOS-12751 control: Add a daos filesystem evict command. (#12331) DAOS-12751 dfuse: Improve evict command. (#12633) DAOS-13625 dfuse: Remove dfuse_projection_info entirely. (#12796) DAOS-13625 dfuse: Replace fs_handle with dfuse_info. (#12894) DAOS-13625 dfuse: Add core inode_lookup() and inode_decref() functions. (#12573) DAOS-14411 dfuse: Add per-container statistics. (#12819) DAOS-14411 control: Expose dfuse statistics as yaml. (#13876) Changed base branch to google/2.4 for daos_build test Change-Id: I8ae3cc743697c2434ae0d54b382ee6c585a3b033 Signed-off-by: Ashley Pittman <ashley.m.pittman@intel.com> Signed-off-by: Jeff Olivier <jeffolivier@google.com>
Add a command to tell dfuse and the kernel to evict a
path in dfuse. This is implemented via a ioctl that
sets a flag on the file handle, when the file is then
closed the kernel is then told the dentry for the file
is no longer valid which should cause the kernel to
forget the entry and any contents if the entry is
a directory.
Required-githooks: true
Signed-off-by: Ashley Pittman ashley.m.pittman@intel.com