-
Notifications
You must be signed in to change notification settings - Fork 203
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
[LibOS] chroot fs: remove redundant arg in chroot_temp_open()
#1816
Conversation
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.
Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion, not enough approvals from maintainers (1 more required), not enough approvals from different teams (1 more required, approved so far: Intel) (waiting on @dimakuv)
a discussion (no related file):
What about
Line 55 in 0ee48ee
static int shm_do_open(struct libos_handle* hdl, struct libos_dentry* dent, mode_t type, |
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.
Reviewable status: all files reviewed, 1 unresolved discussion, not enough approvals from maintainers (1 more required), not enough approvals from different teams (1 more required, approved so far: Intel) (waiting on @kailun-qin)
a discussion (no related file):
Previously, kailun-qin (Kailun Qin) wrote…
What about
?Line 55 in 0ee48ee
static int shm_do_open(struct libos_handle* hdl, struct libos_dentry* dent, mode_t type,
That's different. In the _do_open()
functions we can't remove the type
argument.
Please note that we have a similar function here, chroot_do_open()
, where I also do not remove the type
argument.
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.
Reviewable status: all files reviewed, 1 unresolved discussion, not enough approvals from maintainers (1 more required), not enough approvals from different teams (1 more required, approved so far: Intel) (waiting on @kailun-qin)
a discussion (no related file):
Previously, dimakuv (Dmitrii Kuvaiskii) wrote…
That's different. In the
_do_open()
functions we can't remove thetype
argument.Please note that we have a similar function here,
chroot_do_open()
, where I also do not remove thetype
argument.
An additional explanation that may help understand the difference:
chroot_temp_open()
is used to open a definitely-existing file, just to get a handle on this file. This is needed because many PAL functions operate only on opened handles, not on filenames.chroot_do_open()
is used to open or create a file, getting the handle on this file as a by-effect. Since the file may not exist (thus there is no inode to extract the info from), we need to know the type explicitly.
shm_do_open()
is related to the second kind of helper functions. So not applicable to 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.
Reviewable status: all files reviewed, all discussions resolved, not enough approvals from different teams (1 more required, approved so far: Intel)
a discussion (no related file):
Previously, dimakuv (Dmitrii Kuvaiskii) wrote…
An additional explanation that may help understand the difference:
chroot_temp_open()
is used to open a definitely-existing file, just to get a handle on this file. This is needed because many PAL functions operate only on opened handles, not on filenames.chroot_do_open()
is used to open or create a file, getting the handle on this file as a by-effect. Since the file may not exist (thus there is no inode to extract the info from), we need to know the type explicitly.
shm_do_open()
is related to the second kind of helper functions. So not applicable to this PR.
Indeed -- I misread it. Thanks for the great explanation!
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.
Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved
Signed-off-by: Dmitrii Kuvaiskii <[email protected]>
869b694
to
1d9d9b3
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.
Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved
Jenkins, retest this please (unrelated Jenkins maintenance issues) |
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.
Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved
Jenkins, retest this please (unrelated Jenkins maintenance issues) |
Description of the changes
As in title. Tiny change.
Extracted from #1812.
How to test this PR?
N/A.
This change is