Skip to content

Fix: unable to perform sync on directory #205

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

Merged
merged 2 commits into from
Apr 14, 2025

Conversation

zyfjeff
Copy link
Contributor

@zyfjeff zyfjeff commented Apr 14, 2025

when no_open=false, no_opendir=true, we can't execute the sync command on the directory, because fsyncdir uses get_data to get the handle of the directory, but no_open=false, so it will go to the handle map to find it, but in fact this is a directory, and the no_opendir is true, so it is not in the handle map, It needs to be reopened.

#204

zyfjeff added 2 commits April 14, 2025 15:29
when no_open=false, no_opendir=true, we can't execute the sync
command on the directory, because fsyncdir uses get_data to get
the handle of the directory, but no_open=false, so it will go to
the handle map to find it, but in fact this is a directory, and
the no_opendir is true, so it is not in the handle map, It needs
to be reopened. we should use get_dirdata replace get_data

Signed-off-by: tianqian.zyf <tianqian.zyf@alibaba-inc.com>
Signed-off-by: tianqian.zyf <tianqian.zyf@alibaba-inc.com>
Copy link
Contributor

@eryugey eryugey left a comment

Choose a reason for hiding this comment

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

LGTM

@imeoer imeoer merged commit 22cf6a6 into cloud-hypervisor:master Apr 14, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants