-
-
Notifications
You must be signed in to change notification settings - Fork 182
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
document-portal: Make possible to use on systems without splice support #1318
base: main
Are you sure you want to change the base?
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.
What problem is this trying to solve?
@@ -2010,7 +2012,7 @@ xdp_fuse_read (fuse_req_t req, | |||
buf.buf[0].fd = file->fd; | |||
buf.buf[0].pos = off; | |||
|
|||
fuse_reply_data (req, &buf, FUSE_BUF_SPLICE_MOVE); |
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.
From the docs it sounds like FUSE_BUF_SPLICE_MOVE
should be able to fall back to not using splice. Why is this needed?
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.
From what I understand, the docs mean that a splice move may decay to copying in some circumstances, but it still requires that the splice feature is supported by the FUSE server.
A FUSE client should not assume that the server supports some features. The FreeBSD implementation of FUSE doesn't implement that splice stuff which makes the code fail at the early initialization step. |
That seems like information that should be in the commit message and PR description, and/or in an issue report of the form "document-portal: Doesn't start on FreeBSD" that's closed by this PR. |
Code LGTM but I can't judge the details of the FUSE changes. |
Turns out that I'm thinking of a meson option that will set this compile time. Would that be acceptable? |
…pport The FreeBSD implementation of FUSE doesn't have splice features, which makes the code fail at the early initialization step.
I made Meson check for |
Bump. Can we get this in? |
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.
Two small nitpicks, but generally this looks fine to me
if (se == NULL) | ||
{ | ||
g_set_error (&thread_data->error, XDG_DESKTOP_PORTAL_ERROR, | ||
XDG_DESKTOP_PORTAL_ERROR_FAILED, | ||
"Can't create fuse session"); | ||
g_free (fuse_opts); |
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.
Nitpick: g_clear_pointer (&fuse_opts, g_free);
g_debug ("DESTROY"); | ||
|
||
/* Ensure we call this on the main thread */ | ||
g_idle_add ((GSourceFunc) on_fuse_unmount, NULL); | ||
|
||
g_free (fuse_opts); |
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.
Nitpick: g_clear_pointer (&fuse_opts, g_free);
No description provided.