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

Allow users to modify connection properties in init #49

Open
SupraSummus opened this issue Oct 30, 2021 · 4 comments
Open

Allow users to modify connection properties in init #49

SupraSummus opened this issue Oct 30, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@SupraSummus
Copy link

SupraSummus commented Oct 30, 2021

Hi,

I'd like to limit maximum size of read requests incoming to my FS. I tried using max_read=N option (with N = 4096), but then I get an error from libfuse:

fuse: error: init() and fuse_session_new() requested different maximum read size (0 vs 4096)

To illustrate the problem I modified test case - SupraSummus@ce20b49

As far as I understand I need to pass max_read option to libfuse's init(). How do I do that?

Thanks and have a nice day!
Jan Rydzewski

@Nikratio
Copy link
Contributor

Thanks for your interest in libfuse! As far as I can tell, this is a question about how to use fuse rather than a bug report. Could you please send your question to the FUSE mailing list (https://lists.sourceforge.net/lists/listinfo/fuse-devel), instead of using the issue tracker? I'd like to reserve use of the latter to actually track issues and not use it for discussion.

@SupraSummus
Copy link
Author

I wasn't clear enough, sorry for that. I believe there is no possibility to modify fuse_conn_info.max_read field in operation.init() handler, which is required to use max_read option. This means that it is impossible to use max_read=N via python binding for libfuse.

I've added simple support for that in SupraSummus@2e128ca. I might open a PR with that change, I'm just not sure if my modifications are correct, because I'm new to cython and C-level libfuse. Anyway, tests seem to pass.

@Nikratio
Copy link
Contributor

Nikratio commented Nov 1, 2021

Apologies, now I see. That pull request looks mostly good, but please model it a bit more after the existing wrapper objects (e.g. StatvfsData).

@Nikratio Nikratio reopened this Nov 1, 2021
@Nikratio Nikratio changed the title How to use max_read=N option? Allow users to modify connection properties in init Nov 1, 2021
@Nikratio Nikratio added the enhancement New feature or request label Nov 1, 2021
@ThomasWaldmann
Copy link
Collaborator

Related: #50 (which was closed back then because it missed a test).

@SupraSummus are you interested in finishing this? If not, guess we can close this issue also.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants