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

extra memory copy? #222

Closed
luanshaotong opened this issue Nov 2, 2022 · 2 comments
Closed

extra memory copy? #222

luanshaotong opened this issue Nov 2, 2022 · 2 comments

Comments

@luanshaotong
Copy link

I am confused why there is no data buffer in parameters of read(). Does this mean that there is an extra memory copy when reading?

fn read(

let mut buffer = vec![0; read_size as usize];

@cberner
Copy link
Owner

cberner commented Nov 3, 2022

I didn't write that code (it was there before I forked fuse into fuser), so I'm not entirely sure. However, no I don't think there is an unnecessary copy, if you trace the reply method you'll find that it bottoms out in a write to the file descriptor that goes back to the kernel

@luanshaotong
Copy link
Author

@cberner Thank you for your answer, I didn't figure it out before, this is indeed a feature(or shortcoming?) of fuse.

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

No branches or pull requests

2 participants