Merge branch 'master' into fuse-service-container

* master:
  checkpatch.pl: update to linux 7.0
  fuse_lowlevel: disable SPLICE_READ when pipe can't reach bufsize
This commit is contained in:
Bernd Schubert
2026-05-17 20:31:39 +02:00
2 changed files with 190 additions and 70 deletions
+22 -12
View File
@@ -880,6 +880,10 @@ static int fuse_send_data_iov(struct fuse_session *se, struct fuse_chan *ch,
if (llp->can_grow) {
res = fcntl(llp->pipe[0], F_SETPIPE_SZ, pipesize);
if (res == -1) {
/*
* pipesize above is per-request; grow to max so later
* (smaller) splice-write requests can still succeed.
*/
res = grow_pipe_to_max(llp->pipe[0]);
if (res > 0)
llp->size = res;
@@ -4006,20 +4010,12 @@ pipe_retry:
if (llp->size < bufsize) {
if (llp->can_grow) {
res = fcntl(llp->pipe[0], F_SETPIPE_SZ, bufsize);
if (res == -1) {
llp->can_grow = 0;
res = grow_pipe_to_max(llp->pipe[0]);
if (res > 0)
llp->size = res;
fuse_ll_clear_pipe(se);
goto fallback;
}
if (res == -1)
goto disable_splice_read;
llp->size = res;
}
if (llp->size < bufsize) {
fuse_ll_clear_pipe(se);
goto fallback;
}
if (llp->size < bufsize)
goto disable_splice_read;
}
if (se->io != NULL && se->io->splice_receive != NULL) {
@@ -4114,6 +4110,20 @@ pipe_retry:
return res;
disable_splice_read:
llp->can_grow = 0;
fuse_unset_feature_flag(&se->conn, FUSE_CAP_SPLICE_READ);
/* splice read will never work, write _might_ */
if (se->conn.want_ext & FUSE_CAP_SPLICE_WRITE) {
res = grow_pipe_to_max(llp->pipe[0]);
if (res > 0)
llp->size = res;
} else {
/* pipe will not be used */
fuse_ll_clear_pipe(se);
}
fallback:
#endif
bufsize = internal ? buf->mem_size : se->bufsize;