Linux EXT4 FS development
 help / color / mirror / Atom feed
* Re: [GIT PULL v5.1] libfuse: run fuse servers as a contained service
From: Bernd Schubert @ 2026-05-02 16:26 UTC (permalink / raw)
  To: Darrick J. Wong
  Cc: fuse-devel, joannelkoong, linux-ext4, linux-fsdevel, miklos, neal
In-Reply-To: <2f2ba053-53a7-43e5-969a-32d185e9c7b7@bsbernd.com>



On 5/2/26 17:59, Bernd Schubert wrote:
> 
> 
> On 5/1/26 00:49, Darrick J. Wong wrote:
>> On Thu, Apr 30, 2026 at 11:34:06PM +0200, Bernd Schubert wrote:
>>> Hi Darrick,
>>>
>>> On 4/30/26 23:18, Darrick J. Wong wrote:
>>>> Hi Bernd,
>>>>
>>>> Please pull this branch with changes for libfuse.
>>>>
>>>> As usual, I did a test-merge with the main upstream branch as of a few
>>>> minutes ago, and didn't see any conflicts.  Please let me know if you
>>>> encounter any problems.
>>>
>>> pushed to my github branch. BSD build fails with
>>>
>>> 2026-04-30T21:25:16.3874802Z FAILED: [code=1] lib/libfuse3.so.3.19.0 
>>> 2026-04-30T21:25:16.3906762Z cc  -o lib/libfuse3.so.3.19.0 lib/libfuse3.so.3.19.0.p/fuse.c.o lib/libfuse3.so.3.19.0.p/fuse_loop.c.o lib/libfuse3.so.3.19.0.p/fuse_loop_mt.c.o lib/libfuse3.so.3.19.0.p/fuse_lowlevel.c.o lib/libfuse3.so.3.19.0.p/fuse_opt.c.o lib/libfuse3.so.3.19.0.p/fuse_signals.c.o lib/libfuse3.so.3.19.0.p/buffer.c.o lib/libfuse3.so.3.19.0.p/cuse_lowlevel.c.o lib/libfuse3.so.3.19.0.p/helper.c.o lib/libfuse3.so.3.19.0.p/modules_subdir.c.o lib/libfuse3.so.3.19.0.p/mount_util.c.o lib/libfuse3.so.3.19.0.p/fuse_log.c.o lib/libfuse3.so.3.19.0.p/compat.c.o lib/libfuse3.so.3.19.0.p/util.c.o lib/libfuse3.so.3.19.0.p/mount_bsd.c.o lib/libfuse3.so.3.19.0.p/fuse_service_stub.c.o lib/libfuse3.so.3.19.0.p/modules_iconv.c.o -Wl,--as-needed -Wl,--no-undefined -shared -fPIC -Wl,-soname,libfuse3.so.4 -Wl,--version-script,/home/runner/work/libfuse/libfuse/lib/fuse_versionscript -pthread -Wl,--start-group -ldl -lrt -Wl,--end-group
>>> 2026-04-30T21:25:16.3939590Z ld: error: version script assignment of 'FUSE_3.19' to symbol 'fuse_service_can_allow_other' failed: symbol not defined
>>
>> Aha, that function got left out of the stub. :(
>>
>> Annoyingly, on Linux the build succeeds despite the missing symbol
>> when I tweak meson so that it doesn't build the service stuff.  I would
>> have thought that --no-undefined would have done that, but alas.
>>
>> Sorry about that too.  The following patch fixes it.
>>
>> diff --git i/lib/fuse_service_stub.c w/lib/fuse_service_stub.c
>> index d34df3891a6e31..231b98423df628 100644
>> --- i/lib/fuse_service_stub.c
>> +++ w/lib/fuse_service_stub.c
>> @@ -49,12 +49,17 @@ int fuse_service_send_goodbye(struct fuse_service *sf, int error)
>>  int fuse_service_accept(struct fuse_service **sfp)
>>  {
>>  	*sfp = NULL;
>>  	return 0;
>>  }
>>  
>> +bool fuse_service_can_allow_other(struct fuse_service *sf)
>> +{
>> +	return false;
>> +}
>> +
>>  int fuse_service_append_args(struct fuse_service *sf,
>>  			     struct fuse_args *existing_args)
>>  {
>>  	return -EOPNOTSUPP;
>>  }
>>  
>>
>>> 2026-04-30T21:25:16.3951874Z cc: error: linker command failed with exit code 1 (use -v to see invocation)
>>> 2026-04-30T21:25:16.4291582Z [44/82] cc -Itest/test_teardown_watchdog.p -Itest -I../test -Iinclude -I../include -Ilib -I../lib -I. -I.. -fdiagnostics-color=always -
>>>
>>>
>>> checkpatch, CodeChecker-cppcheck, CodeChecker-gcc also all fail. This CodeQL
>>
>> Not sure why checkpatch fails, this is what I got (Debian 13):
>>
>> $ git diff origin/master.. | ./checkpatch.pl --max-line-length=100 --no-tree --ignore MAINTAINERS,SPDX_LICENSE_TAG,COMMIT_MESSAGE,FILE_PATH_CHANGES,EMAIL_SUBJECT,AVOID_EXTERNS,GIT_COMMIT_ID,ENOSYS_SYSCALL,ENOSYS,FROM_SIGN_OFF_MISMATCH,QUOTED_COMMIT_ID,,PREFER_ATTRIBUTE_ALWAYS_UNUSED,PREFER_DEFINED_ATTRIBUTE_MACRO,STRCPY,STRNCPY -
>> No typos will be found - file '/storage/home/djwong/cdev/work/libfuse/spelling.txt': No such file or directory
>> No structs that should be const will be found - file '/storage/home/djwong/cdev/work/libfuse/const_structs.checkpatch': No such file or directory
>> total: 0 errors, 0 warnings, 3908 lines checked
>>
>> Your patch has no obvious style problems and is ready for submission.
>>
>> NOTE: Ignored message types: AVOID_EXTERNS COMMIT_MESSAGE EMAIL_SUBJECT ENOSYS ENOSYS_SYSCALL FILE_PATH_CHANGES FROM_SIGN_OFF_MISMATCH GIT_COMMIT_ID MAINTAINERS PREFER_ATTRIBUTE_ALWAYS_UNUSED PREFER_DEFINED_ATTRIBUTE_MACRO QUOTED_COMMIT_ID SPDX_LICENSE_TAG STRCPY STRNCPY
>>
>> cppcheck had a few things to say, but none of it was about the changed
>> lines.
>>
>>> report is funny
>>>
>>>> int mount_service_main(int argc, char *argv[])
>>>> Warning
>>>> Poorly documented large function
>>>> Poorly documented function: fewer than 2% comments for a function of 113 lines.
>>>> CodeQL
>>
>> Hrmm.  I guess I'll have to figure out how to get those things running.
>> That said, the stuff in mount_service.c is internal to libfuse (i.e.
>> it's not public library API) so I didn't comment them as intensely.
>> Would you like more?
>>
>>> I think I'm going to merge my sync fuse init series tomorrow.
>>
>> Yay!
>>
>>> Are you ok if skip posting another version of the series?
>>
>>                ^ is there an "I" here?  e.g. "...if I skip posting..."?
>>
>> /My/ normal practice (from xfs) was to repost the series as it was
>> merged, followed by an announcement.  That way the mailing list is a
>> complete record of what was merged.  However, very very few people
>> actually do that, even in the kernel.
>>
>> I'm ok with you not posting another version of the series.
>>
>>> Or do you prefer to review the recent changes and last piece I'm going
>>> to do tomorrow?
>>
>> Nah, just merge it.  I'll look over the changes once it's in the branch
>> and if there's anything weird, you or I or anyone else can send patches.
>> As long as you're not planning to tag it as a release, nothing's set in
>> stone.
>>
>>> Basically my goal is to rebase your series against it immediately and
>>> to merge your series during the next few days.
>>
>> <nod> Let me know what you want changed, I'll be around since I am not
>> travelling anywhere for a couple of weeks. :)
>>
>> I can reflow changes into the patchset, or if you'd prefer, I can add
>> them as new patches that would go on the end of the series.
>>
> 
> Hi Darrick,
> 
> eventually merged my patches and made a quick rebase and conflict 
> resolving with your branch. Github still reports plenty of issues ;)
> 
> Could you fix all of the checkpatch isssues? This one shows plenty
> "util: hoist the fuse.conf parsing and setuid mode enforcement code"
> 
> bschubert2@imesrv6 libfuse.git>stg series
> + mount_service-add-systemd
> + mount_service-create-high
> + mount_service-use-the-new
> + mount_service-update-mtab
>> util-hoist-the-fuse.conf
> - util-fix-checkpatch-complaints
> - mount_service-enable
> - mount.fuse3-integrate-systemd
> - mount_service-allow
> - example-service_ll-create-a
> - example-service-create-a
> - nullfs-support-fuse-systemd
> - meson-show-feature-summary
> bschubert2@imesrv6 libfuse.git>.github/workflows/run-checkpatch.sh 
> No typos will be found - file '/home/bschubert2/src/libfuse/libfuse.git/spelling.txt': No such file or directory
> No structs that should be const will be found - file '/home/bschubert2/src/libfuse/libfuse.git/const_structs.checkpatch': No such file or directory
> ERROR:GLOBAL_INITIALISERS: do not initialise globals to 0
> #61: FILE: util/fuser_conf.c:33:
> +int user_allow_other = 0;
> 
> WARNING:LINE_SPACING: Missing a blank line after declarations
> #74: FILE: util/fuser_conf.c:46:
> +	char *dest = buf;
> +	while (1) {
> 
> ...
> 
> I don't have a strong opinion about these two above - feel 
> free to disable them. However, in order to merge it, it would
> be good to run without any checkpatch report.
> And everything that cppcheck and gcc-checker reports, definitely 
> need to be fixed.

Basically

cd <$FUSEDIR>
BUILDDIR="build-without-examples"
mkdir -p ${BUILDDIR}
meson setup ${BUILDDIR} -Dexamples=false 
ninja -C ${BUILDDIR}
./.github/workflows/codechecker.sh --gcc --codechecker --build-dir ${BUILDDIR}

gcc reports are starting here

bschubert2@imesrv6 libfuse.git>stg series
+ mount_service-add-systemd
+ mount_service-create-high
+ mount_service-use-the-new
+ mount_service-update-mtab
+ util-hoist-the-fuse.conf
+ util-fix-checkpatch-complaints
+ mount_service-enable
> mount.fuse3-integrate-systemd


bschubert2@imesrv6 libfuse.git>git show |head -n5
commit f908bb1504eca167e156671dde957c2e7192b7d2
Author: Darrick J. Wong <djwong@kernel.org>
Date:   Wed Mar 4 13:48:55 2026 -0800

    mount.fuse3: integrate systemd service startup


---==== Severity Statistics ====----
----------------------------
Severity | Number of reports
----------------------------
MEDIUM   |                 1
----------------------------
----=================----

----==== Checker Statistics ====----
-----------------------------------------------------
Checker name           | Severity | Number of reports
-----------------------------------------------------
gcc-deref-before-check | MEDIUM   |                 1
-----------------------------------------------------
----=================----

----==== File Statistics ====----
--------------------------------
File name    | Number of reports
--------------------------------
mount.fuse.c |                 1
--------------------------------
----=================----

----======== Summary ========----
----------------------------------------------
Number of processed analyzer result files | 45
Number of analyzer reports                | 1 
----------------------------------------------
----=================----

To view statistics in a browser run:
> firefox /home/bschubert2/src/libfuse/libfuse.git/build-without-examples/codechecker-html/statistics.html

To view the results in a browser run:
> firefox /home/bschubert2/src/libfuse/libfuse.git/build-without-examples/codechecker-html/index.html
[INFO 2026-05-02 18:25] - ----==== Summary ====----
[INFO 2026-05-02 18:25] - Up-to-date analysis results
[INFO 2026-05-02 18:25] -   gcc: 37
[INFO 2026-05-02 18:25] - Outdated analysis results
[INFO 2026-05-02 18:25] - Failed to analyze
[INFO 2026-05-02 18:25] - Missing analysis results
[INFO 2026-05-02 18:25] -   clangsa: 37
[INFO 2026-05-02 18:25] -   clang-tidy: 37
[INFO 2026-05-02 18:25] -   cppcheck: 37
[INFO 2026-05-02 18:25] -   infer: 37
[INFO 2026-05-02 18:25] - Total analyzed compilation commands: 45
[INFO 2026-05-02 18:25] - Total available compilation commands: 45
[INFO 2026-05-02 18:25] - ----=================----
bschubert2@imesrv6 libfuse.git>




^ permalink raw reply

* Re: [GIT PULL v5.1] libfuse: run fuse servers as a contained service
From: Darrick J. Wong @ 2026-05-02 16:30 UTC (permalink / raw)
  To: Bernd Schubert
  Cc: fuse-devel, joannelkoong, linux-ext4, linux-fsdevel, miklos, neal
In-Reply-To: <2f2ba053-53a7-43e5-969a-32d185e9c7b7@bsbernd.com>

On Sat, May 02, 2026 at 05:59:06PM +0200, Bernd Schubert wrote:
> 
> 
> On 5/1/26 00:49, Darrick J. Wong wrote:
> > On Thu, Apr 30, 2026 at 11:34:06PM +0200, Bernd Schubert wrote:
> >> Hi Darrick,
> >>
> >> On 4/30/26 23:18, Darrick J. Wong wrote:
> >>> Hi Bernd,
> >>>
> >>> Please pull this branch with changes for libfuse.
> >>>
> >>> As usual, I did a test-merge with the main upstream branch as of a few
> >>> minutes ago, and didn't see any conflicts.  Please let me know if you
> >>> encounter any problems.
> >>
> >> pushed to my github branch. BSD build fails with
> >>
> >> 2026-04-30T21:25:16.3874802Z FAILED: [code=1] lib/libfuse3.so.3.19.0 
> >> 2026-04-30T21:25:16.3906762Z cc  -o lib/libfuse3.so.3.19.0 lib/libfuse3.so.3.19.0.p/fuse.c.o lib/libfuse3.so.3.19.0.p/fuse_loop.c.o lib/libfuse3.so.3.19.0.p/fuse_loop_mt.c.o lib/libfuse3.so.3.19.0.p/fuse_lowlevel.c.o lib/libfuse3.so.3.19.0.p/fuse_opt.c.o lib/libfuse3.so.3.19.0.p/fuse_signals.c.o lib/libfuse3.so.3.19.0.p/buffer.c.o lib/libfuse3.so.3.19.0.p/cuse_lowlevel.c.o lib/libfuse3.so.3.19.0.p/helper.c.o lib/libfuse3.so.3.19.0.p/modules_subdir.c.o lib/libfuse3.so.3.19.0.p/mount_util.c.o lib/libfuse3.so.3.19.0.p/fuse_log.c.o lib/libfuse3.so.3.19.0.p/compat.c.o lib/libfuse3.so.3.19.0.p/util.c.o lib/libfuse3.so.3.19.0.p/mount_bsd.c.o lib/libfuse3.so.3.19.0.p/fuse_service_stub.c.o lib/libfuse3.so.3.19.0.p/modules_iconv.c.o -Wl,--as-needed -Wl,--no-undefined -shared -fPIC -Wl,-soname,libfuse3.so.4 -Wl,--version-script,/home/runner/work/libfuse/libfuse/lib/fuse_versionscript -pthread -Wl,--start-group -ldl -lrt -Wl,--end-group
> >> 2026-04-30T21:25:16.3939590Z ld: error: version script assignment of 'FUSE_3.19' to symbol 'fuse_service_can_allow_other' failed: symbol not defined
> > 
> > Aha, that function got left out of the stub. :(
> > 
> > Annoyingly, on Linux the build succeeds despite the missing symbol
> > when I tweak meson so that it doesn't build the service stuff.  I would
> > have thought that --no-undefined would have done that, but alas.
> > 
> > Sorry about that too.  The following patch fixes it.
> > 
> > diff --git i/lib/fuse_service_stub.c w/lib/fuse_service_stub.c
> > index d34df3891a6e31..231b98423df628 100644
> > --- i/lib/fuse_service_stub.c
> > +++ w/lib/fuse_service_stub.c
> > @@ -49,12 +49,17 @@ int fuse_service_send_goodbye(struct fuse_service *sf, int error)
> >  int fuse_service_accept(struct fuse_service **sfp)
> >  {
> >  	*sfp = NULL;
> >  	return 0;
> >  }
> >  
> > +bool fuse_service_can_allow_other(struct fuse_service *sf)
> > +{
> > +	return false;
> > +}
> > +
> >  int fuse_service_append_args(struct fuse_service *sf,
> >  			     struct fuse_args *existing_args)
> >  {
> >  	return -EOPNOTSUPP;
> >  }
> >  
> > 
> >> 2026-04-30T21:25:16.3951874Z cc: error: linker command failed with exit code 1 (use -v to see invocation)
> >> 2026-04-30T21:25:16.4291582Z [44/82] cc -Itest/test_teardown_watchdog.p -Itest -I../test -Iinclude -I../include -Ilib -I../lib -I. -I.. -fdiagnostics-color=always -
> >>
> >>
> >> checkpatch, CodeChecker-cppcheck, CodeChecker-gcc also all fail. This CodeQL
> > 
> > Not sure why checkpatch fails, this is what I got (Debian 13):
> > 
> > $ git diff origin/master.. | ./checkpatch.pl --max-line-length=100 --no-tree --ignore MAINTAINERS,SPDX_LICENSE_TAG,COMMIT_MESSAGE,FILE_PATH_CHANGES,EMAIL_SUBJECT,AVOID_EXTERNS,GIT_COMMIT_ID,ENOSYS_SYSCALL,ENOSYS,FROM_SIGN_OFF_MISMATCH,QUOTED_COMMIT_ID,,PREFER_ATTRIBUTE_ALWAYS_UNUSED,PREFER_DEFINED_ATTRIBUTE_MACRO,STRCPY,STRNCPY -
> > No typos will be found - file '/storage/home/djwong/cdev/work/libfuse/spelling.txt': No such file or directory
> > No structs that should be const will be found - file '/storage/home/djwong/cdev/work/libfuse/const_structs.checkpatch': No such file or directory
> > total: 0 errors, 0 warnings, 3908 lines checked
> > 
> > Your patch has no obvious style problems and is ready for submission.
> > 
> > NOTE: Ignored message types: AVOID_EXTERNS COMMIT_MESSAGE EMAIL_SUBJECT ENOSYS ENOSYS_SYSCALL FILE_PATH_CHANGES FROM_SIGN_OFF_MISMATCH GIT_COMMIT_ID MAINTAINERS PREFER_ATTRIBUTE_ALWAYS_UNUSED PREFER_DEFINED_ATTRIBUTE_MACRO QUOTED_COMMIT_ID SPDX_LICENSE_TAG STRCPY STRNCPY
> > 
> > cppcheck had a few things to say, but none of it was about the changed
> > lines.
> > 
> >> report is funny
> >>
> >>> int mount_service_main(int argc, char *argv[])
> >>> Warning
> >>> Poorly documented large function
> >>> Poorly documented function: fewer than 2% comments for a function of 113 lines.
> >>> CodeQL
> > 
> > Hrmm.  I guess I'll have to figure out how to get those things running.
> > That said, the stuff in mount_service.c is internal to libfuse (i.e.
> > it's not public library API) so I didn't comment them as intensely.
> > Would you like more?
> > 
> >> I think I'm going to merge my sync fuse init series tomorrow.
> > 
> > Yay!
> > 
> >> Are you ok if skip posting another version of the series?
> > 
> >                ^ is there an "I" here?  e.g. "...if I skip posting..."?
> > 
> > /My/ normal practice (from xfs) was to repost the series as it was
> > merged, followed by an announcement.  That way the mailing list is a
> > complete record of what was merged.  However, very very few people
> > actually do that, even in the kernel.
> > 
> > I'm ok with you not posting another version of the series.
> > 
> >> Or do you prefer to review the recent changes and last piece I'm going
> >> to do tomorrow?
> > 
> > Nah, just merge it.  I'll look over the changes once it's in the branch
> > and if there's anything weird, you or I or anyone else can send patches.
> > As long as you're not planning to tag it as a release, nothing's set in
> > stone.
> > 
> >> Basically my goal is to rebase your series against it immediately and
> >> to merge your series during the next few days.
> > 
> > <nod> Let me know what you want changed, I'll be around since I am not
> > travelling anywhere for a couple of weeks. :)
> > 
> > I can reflow changes into the patchset, or if you'd prefer, I can add
> > them as new patches that would go on the end of the series.
> > 
> 
> Hi Darrick,
> 
> eventually merged my patches and made a quick rebase and conflict 
> resolving with your branch. Github still reports plenty of issues ;)
> 
> Could you fix all of the checkpatch isssues? This one shows plenty
> "util: hoist the fuse.conf parsing and setuid mode enforcement code"
> 
> bschubert2@imesrv6 libfuse.git>stg series
> + mount_service-add-systemd
> + mount_service-create-high
> + mount_service-use-the-new
> + mount_service-update-mtab
> > util-hoist-the-fuse.conf
> - util-fix-checkpatch-complaints
> - mount_service-enable
> - mount.fuse3-integrate-systemd
> - mount_service-allow
> - example-service_ll-create-a
> - example-service-create-a
> - nullfs-support-fuse-systemd
> - meson-show-feature-summary
> bschubert2@imesrv6 libfuse.git>.github/workflows/run-checkpatch.sh 
> No typos will be found - file '/home/bschubert2/src/libfuse/libfuse.git/spelling.txt': No such file or directory
> No structs that should be const will be found - file '/home/bschubert2/src/libfuse/libfuse.git/const_structs.checkpatch': No such file or directory
> ERROR:GLOBAL_INITIALISERS: do not initialise globals to 0
> #61: FILE: util/fuser_conf.c:33:
> +int user_allow_other = 0;
> 
> WARNING:LINE_SPACING: Missing a blank line after declarations
> #74: FILE: util/fuser_conf.c:46:
> +	char *dest = buf;
> +	while (1) {

Oh!  The checkpatch fixes are all in the next commit
"util-fix-checkpatch-complaints".  I kept the checkpatch fixes as a
separate commit so that the hoist change can be inspected more easily.

(XFS practice is to have separate patches for moving the code and
cleaning it up)

> ...
> 
> I don't have a strong opinion about these two above - feel 
> free to disable them. However, in order to merge it, it would
> be good to run without any checkpatch report.
> And everything that cppcheck and gcc-checker reports, definitely 
> need to be fixed.

Hrm, should I try to fix the things that cppcheck complains about in
HEAD?  There's an awful lot of them...

(oh, I see you pushed to master, I'll go rebase now)

--D

Checking build-aarch64/meson-private/sanitycheckc.c ...
Checking build-aarch64/meson-private/sanitycheckc.c: FUSE_USE_VERSION=319...
1/75 files checked 0% done
Checking build-aarch64/fuse_config.h ...
Checking build-aarch64/fuse_config.h: FUSE_USE_VERSION=319...
2/75 files checked 0% done
Checking build-aarch64/libfuse_config.h ...
Checking build-aarch64/libfuse_config.h: FUSE_USE_VERSION=319...
3/75 files checked 0% done
Checking example/cuse.c ...
Checking example/cuse.c: FUSE_USE_VERSION=319...
example/cuse.c:75:18: portability: 'new_buf' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
  memset(new_buf + cusexmp_size, 0, new_size - cusexmp_size);
                 ^
example/cuse.c:113:34: portability: 'cusexmp_buf' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
 fuse_reply_buf(req, cusexmp_buf + off, size);
                                 ^
example/cuse.c:126:21: portability: 'cusexmp_buf' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
 memcpy(cusexmp_buf + off, buf, size);
                    ^
example/cuse.c:145:9: portability: 'in_buf' is of type 'const void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
 in_buf += sizeof(*arg);
        ^
example/cuse.c:150:8: portability: 'addr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
  addr + offsetof(struct fioc_rw_arg, prev_size);
       ^
example/cuse.c:154:8: portability: 'addr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
  addr + offsetof(struct fioc_rw_arg, new_size);
       ^
example/cuse.c:191:33: portability: 'cusexmp_buf' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
  iov[2].iov_base = cusexmp_buf + off;
                                ^
example/cuse.c:200:22: portability: 'cusexmp_buf' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
  memcpy(cusexmp_buf + arg->offset, in_buf, in_bufsz);
                     ^
Checking example/cuse.c: FUSE_USE_VERSION=319;FUSE_H_;FUSE_LOWLEVEL_H_...
Checking example/cuse.c: FUSE_USE_VERSION=319;HAVE_LIBFUSE_PRIVATE_CONFIG_H...
Checking example/cuse.c: FUSE_USE_VERSION=319;__STDC_VERSION__...
4/75 files checked 0% done
Checking example/cuse_client.c ...
Checking example/cuse_client.c: FUSE_USE_VERSION=319...
5/75 files checked 1% done
Checking example/hello.c ...
Checking example/hello.c: FUSE_USE_VERSION=319...
Checking example/hello.c: FUSE_USE_VERSION=319;FUSE_LOWLEVEL_H_...
Checking example/hello.c: FUSE_USE_VERSION=319;HAVE_LIBFUSE_PRIVATE_CONFIG_H...
Checking example/hello.c: FUSE_USE_VERSION=319;__STDC_VERSION__...
6/75 files checked 1% done
Checking example/hello_ll_uds.c ...
Checking example/hello_ll_uds.c: FUSE_USE_VERSION=319...
example/hello_ll_uds.c:212:3: error: Resource leak: sfd [resourceLeak]
  return -1;
  ^
example/hello_ll_uds.c:216:3: error: Resource leak: sfd [resourceLeak]
  return -1;
  ^
example/hello_ll_uds.c:223:3: error: Resource leak: sfd [resourceLeak]
  return -1;
  ^
example/hello_ll_uds.c:227:2: error: Resource leak: sfd [resourceLeak]
 return cfd;
 ^
Checking example/hello_ll_uds.c: FUSE_USE_VERSION=319;FUSE_H_;FUSE_LOWLEVEL_H_...
Checking example/hello_ll_uds.c: FUSE_USE_VERSION=319;HAVE_LIBFUSE_PRIVATE_CONFIG_H...
Checking example/hello_ll_uds.c: FUSE_USE_VERSION=319;__KERNEL__...
Checking example/hello_ll_uds.c: FUSE_USE_VERSION=319;__STDC_VERSION__...
7/75 files checked 2% done
Checking example/invalidate_path.c ...
Checking example/invalidate_path.c: FUSE_USE_VERSION=319...
example/invalidate_path.c:169:8: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [localtimeCalled]
 now = localtime(&t);
       ^
example/invalidate_path.c:166:13: style: Variable 'now' can be declared as pointer to const [constVariablePointer]
 struct tm *now;
            ^
Checking example/invalidate_path.c: FUSE_USE_VERSION=319;FUSE_LOWLEVEL_H_...
Checking example/invalidate_path.c: FUSE_USE_VERSION=319;HAVE_LIBFUSE_PRIVATE_CONFIG_H...
Checking example/invalidate_path.c: FUSE_USE_VERSION=319;__STDC_VERSION__...
8/75 files checked 3% done
Checking example/ioctl.c ...
Checking example/ioctl.c: FUSE_USE_VERSION=319...
example/ioctl.c:60:18: portability: 'new_buf' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
  memset(new_buf + fioc_size, 0, new_size - fioc_size);
                 ^
example/ioctl.c:126:23: portability: 'fioc_buf' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
 memcpy(buf, fioc_buf + offset, size);
                      ^
example/ioctl.c:147:18: portability: 'fioc_buf' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
 memcpy(fioc_buf + offset, buf, size);
                 ^
Checking example/ioctl.c: FUSE_USE_VERSION=319;FUSE_LOWLEVEL_H_...
Checking example/ioctl.c: FUSE_USE_VERSION=319;HAVE_LIBFUSE_PRIVATE_CONFIG_H...
Checking example/ioctl.c: FUSE_USE_VERSION=319;__STDC_VERSION__...
9/75 files checked 3% done
Checking example/ioctl.h ...
Checking example/ioctl.h: FUSE_USE_VERSION=319...
10/75 files checked 3% done
Checking example/ioctl_client.c ...
Checking example/ioctl_client.c: FUSE_USE_VERSION=319...
11/75 files checked 4% done
Checking example/notify_inval_entry.c ...
Checking example/notify_inval_entry.c: FUSE_USE_VERSION=319...
example/notify_inval_entry.c:264:11: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [localtimeCalled]
    now = localtime(&t);
          ^
example/notify_inval_entry.c:141:34: style: Operator '|' with one operand equal to zero is redundant. [badBitmaskCheck]
        stbuf->st_mode = S_IFREG | 0000;
                                 ^
example/notify_inval_entry.c:274:11: style: The scope of the variable 'old_name' can be reduced. [variableScope]
    char *old_name;
          ^
example/notify_inval_entry.c:260:16: style: Variable 'now' can be declared as pointer to const [constVariablePointer]
    struct tm *now;
               ^
Checking example/notify_inval_entry.c: FUSE_USE_VERSION=319;FUSE_H_;FUSE_LOWLEVEL_H_...
Checking example/notify_inval_entry.c: FUSE_USE_VERSION=319;HAVE_LIBFUSE_PRIVATE_CONFIG_H...
Checking example/notify_inval_entry.c: FUSE_USE_VERSION=319;__STDC_VERSION__...
12/75 files checked 5% done
Checking example/notify_inval_inode.c ...
Checking example/notify_inval_inode.c: FUSE_USE_VERSION=319...
example/notify_inval_inode.c:274:11: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [localtimeCalled]
    now = localtime(&t);
          ^
example/notify_inval_inode.c:271:16: style: Variable 'now' can be declared as pointer to const [constVariablePointer]
    struct tm *now;
               ^
Checking example/notify_inval_inode.c: FUSE_USE_VERSION=319;FUSE_H_;FUSE_LOWLEVEL_H_...
Checking example/notify_inval_inode.c: FUSE_USE_VERSION=319;HAVE_LIBFUSE_PRIVATE_CONFIG_H...
Checking example/notify_inval_inode.c: FUSE_USE_VERSION=319;__STDC_VERSION__...
13/75 files checked 6% done
Checking example/notify_store_retrieve.c ...
Checking example/notify_store_retrieve.c: FUSE_USE_VERSION=319...
example/notify_store_retrieve.c:329:11: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [localtimeCalled]
    now = localtime(&t);
          ^
example/notify_store_retrieve.c:326:16: style: Variable 'now' can be declared as pointer to const [constVariablePointer]
    struct tm *now;
               ^
example/notify_store_retrieve.c:297:20: error: Uninitialized variable: buf [uninitvar]
    assert(strncmp(buf, expected, ret) == 0);
                   ^
Checking example/notify_store_retrieve.c: FUSE_USE_VERSION=319;FUSE_H_;FUSE_LOWLEVEL_H_...
Checking example/notify_store_retrieve.c: FUSE_USE_VERSION=319;HAVE_LIBFUSE_PRIVATE_CONFIG_H...
Checking example/notify_store_retrieve.c: FUSE_USE_VERSION=319;__STDC_VERSION__...
14/75 files checked 7% done
Checking example/passthrough.c ...
Checking example/passthrough.c: FUSE_USE_VERSION=319...
example/passthrough.c:134:15: portability: Non reentrant function 'readdir' called. For threadsafe applications it is recommended to use the reentrant replacement function 'readdir_r'. [readdirCalled]
 while ((de = readdir(dp)) != NULL) {
              ^
example/passthrough_helpers.h:119:2: error: Returning/dereferencing 'res' after it is deallocated / released [deallocret]
 return res;
 ^
example/passthrough_helpers.h:82:10: note: Returning/dereferencing 'res' after it is deallocated / released
   res = close(res);
         ^
example/passthrough_helpers.h:119:2: note: Returning/dereferencing 'res' after it is deallocated / released
 return res;
 ^
Checking example/passthrough.c: FUSE_USE_VERSION=319;FUSE_LOWLEVEL_H_...
Checking example/passthrough.c: FUSE_USE_VERSION=319;HAVE_COPY_FILE_RANGE...
Checking example/passthrough.c: FUSE_USE_VERSION=319;HAVE_FSPACECTL...
Checking example/passthrough.c: FUSE_USE_VERSION=319;HAVE_LIBFUSE_PRIVATE_CONFIG_H...
Checking example/passthrough.c: FUSE_USE_VERSION=319;HAVE_SETXATTR...
Checking example/passthrough.c: FUSE_USE_VERSION=319;HAVE_STATX...
Checking example/passthrough.c: FUSE_USE_VERSION=319;HAVE_UTIMENSAT...
Checking example/passthrough.c: FUSE_USE_VERSION=319;__FreeBSD__...
Checking example/passthrough.c: FUSE_USE_VERSION=319;__STDC_VERSION__...
Checking example/passthrough.c: FUSE_USE_VERSION=319;linux...
15/75 files checked 8% done
Checking example/passthrough_fh.c ...
Checking example/passthrough_fh.c: FUSE_USE_VERSION=319...
example/passthrough_fh.c:175:15: portability: Non reentrant function 'readdir' called. For threadsafe applications it is recommended to use the reentrant replacement function 'readdir_r'. [readdirCalled]
   d->entry = readdir(d->dp);
              ^
example/passthrough_fh.c:143:2: error: Resource leak: d.dp [resourceLeak]
 return 0;
 ^
example/passthrough_fh.c:128:6: style: The scope of the variable 'res' can be reduced. [variableScope]
 int res;
     ^
example/passthrough_fh.c:146:64: style: Parameter 'fi' can be declared as pointer to const [constParameterPointer]
static inline struct xmp_dirp *get_dirp(struct fuse_file_info *fi)
                                                               ^
Checking example/passthrough_fh.c: FUSE_USE_VERSION=319;FUSE_LOWLEVEL_H_...
Checking example/passthrough_fh.c: FUSE_USE_VERSION=319;HAVE_COPY_FILE_RANGE...
Checking example/passthrough_fh.c: FUSE_USE_VERSION=319;HAVE_FDATASYNC...
Checking example/passthrough_fh.c: FUSE_USE_VERSION=319;HAVE_FSPACECTL...
Checking example/passthrough_fh.c: FUSE_USE_VERSION=319;HAVE_FSTATAT...
Checking example/passthrough_fh.c: FUSE_USE_VERSION=319;HAVE_LIBFUSE_PRIVATE_CONFIG_H...
Checking example/passthrough_fh.c: FUSE_USE_VERSION=319;HAVE_LIBULOCKMGR...
Checking example/passthrough_fh.c: FUSE_USE_VERSION=319;HAVE_SETXATTR...
Checking example/passthrough_fh.c: FUSE_USE_VERSION=319;HAVE_STATX...
Checking example/passthrough_fh.c: FUSE_USE_VERSION=319;HAVE_UTIMENSAT...
Checking example/passthrough_fh.c: FUSE_USE_VERSION=319;__FreeBSD__...
Checking example/passthrough_fh.c: FUSE_USE_VERSION=319;__STDC_VERSION__...
16/75 files checked 10% done
Checking example/passthrough_helpers.h ...
Checking example/passthrough_helpers.h: FUSE_USE_VERSION=319...
Checking example/passthrough_helpers.h: FUSE_USE_VERSION=319;HAVE_FALLOCATE...
Checking example/passthrough_helpers.h: FUSE_USE_VERSION=319;HAVE_FSPACECTL...
Checking example/passthrough_helpers.h: FUSE_USE_VERSION=319;HAVE_POSIX_FALLOCATE...
Checking example/passthrough_helpers.h: FUSE_USE_VERSION=319;__FreeBSD__...
17/75 files checked 10% done
Checking example/passthrough_ll.c ...
Checking example/passthrough_ll.c: FUSE_USE_VERSION=319...
example/passthrough_ll.c:705:15: portability: Non reentrant function 'readdir' called. For threadsafe applications it is recommended to use the reentrant replacement function 'readdir_r'. [readdirCalled]
   d->entry = readdir(d->dp);
              ^
example/passthrough_ll.c:656:2: error: Resource leak: d.dp [resourceLeak]
 return;
 ^
example/passthrough_ll.c:167:18: style: Variable 'lo' can be declared as pointer to const [constVariablePointer]
 struct lo_data *lo = (struct lo_data *)userdata;
                 ^
example/passthrough_ll.c:204:18: style: Variable 'lo' can be declared as pointer to const [constVariablePointer]
 struct lo_data *lo = lo_data(req);
                 ^
example/passthrough_ll.c:221:19: style: Variable 'inode' can be declared as pointer to const [constVariablePointer]
 struct lo_inode *inode = lo_inode(req, ino);
                  ^
example/passthrough_ll.c:291:66: style: Parameter 'st' can be declared as pointer to const [constParameterPointer]
static struct lo_inode *lo_find(struct lo_data *lo, struct stat *st)
                                                                 ^
example/passthrough_ll.c:425:19: style: Variable 'dir' can be declared as pointer to const [constVariablePointer]
 struct lo_inode *dir = lo_inode(req, parent);
                  ^
example/passthrough_ll.c:631:18: style: Variable 'lo' can be declared as pointer to const [constVariablePointer]
 struct lo_data *lo = lo_data(req);
                 ^
example/passthrough_ll.c:793:18: style: Variable 'lo' can be declared as pointer to const [constVariablePointer]
 struct lo_data *lo = lo_data(req);
                 ^
example/passthrough_ll.c:828:18: style: Variable 'lo' can be declared as pointer to const [constVariablePointer]
 struct lo_data *lo = lo_data(req);
                 ^
example/passthrough_ll.c:876:18: style: Variable 'lo' can be declared as pointer to const [constVariablePointer]
 struct lo_data *lo = lo_data(req);
                 ^
example/passthrough_ll.c:1029:19: style: Variable 'inode' can be declared as pointer to const [constVariablePointer]
 struct lo_inode *inode = lo_inode(req, ino);
                  ^
example/passthrough_ll.c:1079:19: style: Variable 'inode' can be declared as pointer to const [constVariablePointer]
 struct lo_inode *inode = lo_inode(req, ino);
                  ^
example/passthrough_ll.c:1129:19: style: Variable 'inode' can be declared as pointer to const [constVariablePointer]
 struct lo_inode *inode = lo_inode(req, ino);
                  ^
example/passthrough_ll.c:1154:19: style: Variable 'inode' can be declared as pointer to const [constVariablePointer]
 struct lo_inode *inode = lo_inode(req, ino);
                  ^
example/passthrough_ll.c:382:9: style: Variable 'newfd' is assigned a value that is never used. [unreadVariable]
  newfd = -1;
        ^
Checking example/passthrough_ll.c: FUSE_USE_VERSION=319;FUSE_H_;FUSE_LOWLEVEL_H_...
Checking example/passthrough_ll.c: FUSE_USE_VERSION=319;HAVE_COPY_FILE_RANGE...
Checking example/passthrough_ll.c: FUSE_USE_VERSION=319;HAVE_FSPACECTL...
Checking example/passthrough_ll.c: FUSE_USE_VERSION=319;HAVE_LIBFUSE_PRIVATE_CONFIG_H...
example/passthrough_ll.c:1220:18: style: Variable 'lo' can be declared as pointer to const [constVariablePointer]
 struct lo_data *lo = lo_data(req);
                 ^
Checking example/passthrough_ll.c: FUSE_USE_VERSION=319;HAVE_STATX...
Checking example/passthrough_ll.c: FUSE_USE_VERSION=319;__FreeBSD__...
Checking example/passthrough_ll.c: FUSE_USE_VERSION=319;__GNUC__...
Checking example/passthrough_ll.c: FUSE_USE_VERSION=319;__STDC_VERSION__...
18/75 files checked 14% done
Checking example/poll.c ...
Checking example/poll.c: FUSE_USE_VERSION=319...
Checking example/poll.c: FUSE_USE_VERSION=319;FUSE_LOWLEVEL_H_...
Checking example/poll.c: FUSE_USE_VERSION=319;HAVE_LIBFUSE_PRIVATE_CONFIG_H...
Checking example/poll.c: FUSE_USE_VERSION=319;__STDC_VERSION__...
19/75 files checked 14% done
Checking example/poll_client.c ...
Checking example/poll_client.c: FUSE_USE_VERSION=319...
example/poll_client.c:43:8: style: Variable 'name' can be declared as const array [constVariable]
  char name[] = { hex_map[i], '\0' };
       ^
20/75 files checked 14% done
Checking example/ioctl_ll.c ...
Checking example/ioctl_ll.c: FUSE_USE_VERSION=319...
Checking example/ioctl_ll.c: FUSE_USE_VERSION=319;FUSE_H_;FUSE_LOWLEVEL_H_...
Checking example/ioctl_ll.c: FUSE_USE_VERSION=319;HAVE_LIBFUSE_PRIVATE_CONFIG_H...
Checking example/ioctl_ll.c: FUSE_USE_VERSION=319;__STDC_VERSION__...
21/75 files checked 16% done
Checking example/ioctl_ll_client.c ...
Checking example/ioctl_ll_client.c: FUSE_USE_VERSION=319...
22/75 files checked 16% done
Checking example/notify_prune.c ...
Checking example/notify_prune.c: FUSE_USE_VERSION=319...
example/notify_prune.c:108:8: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [localtimeCalled]
 now = localtime(&t);
       ^
example/notify_prune.c:105:13: style: Variable 'now' can be declared as pointer to const [constVariablePointer]
 struct tm *now;
            ^
Checking example/notify_prune.c: FUSE_USE_VERSION=319;FUSE_H_;FUSE_LOWLEVEL_H_...
Checking example/notify_prune.c: FUSE_USE_VERSION=319;HAVE_LIBFUSE_PRIVATE_CONFIG_H...
Checking example/notify_prune.c: FUSE_USE_VERSION=319;__STDC_VERSION__...
23/75 files checked 17% done
Checking example/hello_ll.c ...
Checking example/hello_ll.c: FUSE_USE_VERSION=319...
Checking example/hello_ll.c: FUSE_USE_VERSION=319;FUSE_H_;FUSE_LOWLEVEL_H_...
Checking example/hello_ll.c: FUSE_USE_VERSION=319;HAVE_LIBFUSE_PRIVATE_CONFIG_H...
Checking example/hello_ll.c: FUSE_USE_VERSION=319;__STDC_VERSION__...
24/75 files checked 18% done
Checking example/null.c ...
Checking example/null.c: FUSE_USE_VERSION=319...
Checking example/null.c: FUSE_USE_VERSION=319;FUSE_LOWLEVEL_H_...
Checking example/null.c: FUSE_USE_VERSION=319;HAVE_LIBFUSE_PRIVATE_CONFIG_H...
Checking example/null.c: FUSE_USE_VERSION=319;__STDC_VERSION__...
25/75 files checked 18% done
Checking example/printcap.c ...
Checking example/printcap.c: FUSE_USE_VERSION=319...
example/printcap.c:88:2: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint]
 printf("Protocol version: %d.%d\n", conn->proto_major,
 ^
example/printcap.c:88:2: warning: %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint]
 printf("Protocol version: %d.%d\n", conn->proto_major,
 ^
example/printcap.c:108:3: error: Memory leak: mountpoint [memleak]
  return 1;
  ^
example/printcap.c:106:13: warning: If memory allocation fails, then there is a possible null pointer dereference: mountpoint [nullPointerOutOfMemory]
 if(mkdtemp(mountpoint) == NULL) {
            ^
example/printcap.c:105:21: note: Assuming allocation function fails
 mountpoint = strdup("/tmp/fuse_printcap_XXXXXX");
                    ^
example/printcap.c:105:21: note: Assignment 'mountpoint=strdup("/tmp/fuse_printcap_XXXXXX")', assigned value is 0
 mountpoint = strdup("/tmp/fuse_printcap_XXXXXX");
                    ^
example/printcap.c:106:13: note: Null pointer dereference
 if(mkdtemp(mountpoint) == NULL) {
            ^
example/printcap.c:74:55: style: Parameter 'conn' can be declared as pointer to const [constParameterPointer]
static void print_capabilities(struct fuse_conn_info *conn)
                                                      ^
Checking example/printcap.c: FUSE_USE_VERSION=319;FUSE_H_;FUSE_LOWLEVEL_H_...
Checking example/printcap.c: FUSE_USE_VERSION=319;HAVE_LIBFUSE_PRIVATE_CONFIG_H...
Checking example/printcap.c: FUSE_USE_VERSION=319;__STDC_VERSION__...
26/75 files checked 18% done
Checking include/cuse_lowlevel.h ...
Checking include/cuse_lowlevel.h: FUSE_USE_VERSION=319...
Checking include/cuse_lowlevel.h: FUSE_USE_VERSION=319;FUSE_H_;FUSE_LOWLEVEL_H_...
Checking include/cuse_lowlevel.h: FUSE_USE_VERSION=319;HAVE_LIBFUSE_PRIVATE_CONFIG_H...
Checking include/cuse_lowlevel.h: FUSE_USE_VERSION=319;__STDC_VERSION__...
27/75 files checked 19% done
Checking include/fuse_log.h ...
Checking include/fuse_log.h: FUSE_USE_VERSION=319...
28/75 files checked 19% done
Checking include/fuse_mount_compat.h ...
Checking include/fuse_mount_compat.h: FUSE_USE_VERSION=319...
29/75 files checked 19% done
Checking include/fuse_opt.h ...
Checking include/fuse_opt.h: FUSE_USE_VERSION=319...
30/75 files checked 20% done
Checking include/fuse.h ...
Checking include/fuse.h: FUSE_USE_VERSION=319...
Checking include/fuse.h: FUSE_USE_VERSION=319;FUSE_LOWLEVEL_H_...
Checking include/fuse.h: FUSE_USE_VERSION=319;FUSE_USE_VERSION=30...
Checking include/fuse.h: FUSE_USE_VERSION=319;HAVE_LIBFUSE_PRIVATE_CONFIG_H...
Checking include/fuse.h: FUSE_USE_VERSION=319;LIBFUSE_BUILT_WITH_VERSIONED_SYMBOLS...
Checking include/fuse.h: FUSE_USE_VERSION=319;__STDC_VERSION__...
31/75 files checked 25% done
Checking include/fuse_common.h ...
Checking include/fuse_common.h: FUSE_USE_VERSION=319;FUSE_H_;FUSE_LOWLEVEL_H_...
32/75 files checked 29% done
Checking include/fuse_kernel.h ...
Checking include/fuse_kernel.h: FUSE_USE_VERSION=319...
Checking include/fuse_kernel.h: FUSE_USE_VERSION=319;__KERNEL__...
33/75 files checked 32% done
Checking include/fuse_lowlevel.h ...
Checking include/fuse_lowlevel.h: FUSE_USE_VERSION=319...
Checking include/fuse_lowlevel.h: FUSE_USE_VERSION=319;FUSE_LOWLEVEL_H_...
Checking include/fuse_lowlevel.h: FUSE_USE_VERSION=319;HAVE_LIBFUSE_PRIVATE_CONFIG_H...
Checking include/fuse_lowlevel.h: FUSE_USE_VERSION=319;LIBFUSE_BUILT_WITH_VERSIONED_SYMBOLS...
Checking include/fuse_lowlevel.h: FUSE_USE_VERSION=319;__STDC_VERSION__...
34/75 files checked 41% done
Checking lib/modules/iconv.c ...
Checking lib/modules/iconv.c: FUSE_USE_VERSION=319...
lib/modules/iconv.c:673:3: warning: If memory allocation fails, then there is a possible null pointer dereference: charmap [nullPointerOutOfMemory]
  charmap);
  ^
lib/modules/iconv.c:664:18: note: Assuming allocation function fails
 charmap = strdup(nl_langinfo(CODESET));
                 ^
lib/modules/iconv.c:664:18: note: Assignment 'charmap=strdup(nl_langinfo(CODESET))', assigned value is 0
 charmap = strdup(nl_langinfo(CODESET));
                 ^
lib/modules/iconv.c:673:3: note: Null pointer dereference
  charmap);
  ^
Checking lib/modules/iconv.c: FUSE_USE_VERSION=319;FUSE_LOWLEVEL_H_...
Checking lib/modules/iconv.c: FUSE_USE_VERSION=319;FUSE_USE_VERSION=30...
Checking lib/modules/iconv.c: FUSE_USE_VERSION=319;HAVE_LIBFUSE_PRIVATE_CONFIG_H...
Checking lib/modules/iconv.c: FUSE_USE_VERSION=319;HAVE_STATX...
Checking lib/modules/iconv.c: FUSE_USE_VERSION=319;__STDC_VERSION__...
35/75 files checked 42% done
Checking lib/modules/subdir.c ...
Checking lib/modules/subdir.c: FUSE_USE_VERSION=319...
lib/modules/subdir.c:104:46: style: Parameter 'd' can be declared as pointer to const [constParameterPointer]
static void transform_symlink(struct subdir *d, const char *path,
                                             ^
Checking lib/modules/subdir.c: FUSE_USE_VERSION=319;FUSE_LOWLEVEL_H_...
Checking lib/modules/subdir.c: FUSE_USE_VERSION=319;FUSE_USE_VERSION=30...
Checking lib/modules/subdir.c: FUSE_USE_VERSION=319;HAVE_LIBFUSE_PRIVATE_CONFIG_H...
Checking lib/modules/subdir.c: FUSE_USE_VERSION=319;HAVE_STATX...
Checking lib/modules/subdir.c: FUSE_USE_VERSION=319;__STDC_VERSION__...
36/75 files checked 44% done
Checking lib/buffer.c ...
Checking lib/buffer.c: FUSE_USE_VERSION=319...
Checking lib/buffer.c: FUSE_USE_VERSION=319;FUSE_LOWLEVEL_H_;FUSE_USE_VERSION...
Checking lib/buffer.c: FUSE_USE_VERSION=319;FUSE_USE_VERSION=30...
Checking lib/buffer.c: FUSE_USE_VERSION=319;HAVE_LIBFUSE_PRIVATE_CONFIG_H;FUSE_USE_VERSION...
Checking lib/buffer.c: FUSE_USE_VERSION=319;HAVE_SPLICE;FUSE_USE_VERSION...
Checking lib/buffer.c: FUSE_USE_VERSION=319;__STDC_VERSION__;FUSE_USE_VERSION...
37/75 files checked 45% done
Checking lib/compat.c ...
Checking lib/compat.c: FUSE_USE_VERSION=319...
Checking lib/compat.c: FUSE_USE_VERSION=319;LIBFUSE_BUILT_WITH_VERSIONED_SYMBOLS...
Checking lib/compat.c: FUSE_USE_VERSION=319;LIBFUSE_BUILT_WITH_VERSIONED_SYMBOLS;fuse_parse_cmdline...
38/75 files checked 45% done
Checking lib/cuse_lowlevel.c ...
Checking lib/cuse_lowlevel.c: FUSE_USE_VERSION=319...
Checking lib/cuse_lowlevel.c: FUSE_USE_VERSION=319;FUSE_LOWLEVEL_H_...
Checking lib/cuse_lowlevel.c: FUSE_USE_VERSION=319;HAVE_LIBFUSE_PRIVATE_CONFIG_H...
Checking lib/cuse_lowlevel.c: FUSE_USE_VERSION=319;__KERNEL__...
Checking lib/cuse_lowlevel.c: FUSE_USE_VERSION=319;__STDC_VERSION__...
39/75 files checked 46% done
Checking lib/fuse_log.c ...
Checking lib/fuse_log.c: FUSE_USE_VERSION=319...
40/75 files checked 46% done
Checking lib/fuse_loop.c ...
Checking lib/fuse_loop.c: FUSE_USE_VERSION=319...
Checking lib/fuse_loop.c: FUSE_USE_VERSION=319;FUSE_LOWLEVEL_H_;FUSE_USE_VERSION...
Checking lib/fuse_loop.c: FUSE_USE_VERSION=319;FUSE_USE_VERSION=30...
Checking lib/fuse_loop.c: FUSE_USE_VERSION=319;HAVE_LIBFUSE_PRIVATE_CONFIG_H;FUSE_USE_VERSION...
Checking lib/fuse_loop.c: FUSE_USE_VERSION=319;__KERNEL__;FUSE_USE_VERSION...
Checking lib/fuse_loop.c: FUSE_USE_VERSION=319;__STDC_VERSION__;FUSE_USE_VERSION...
41/75 files checked 46% done
Checking lib/fuse_loop_mt.c ...
Checking lib/fuse_loop_mt.c: FUSE_USE_VERSION=319...
Checking lib/fuse_loop_mt.c: FUSE_USE_VERSION=319;FUSE_LOWLEVEL_H_;FUSE_USE_VERSION...
Checking lib/fuse_loop_mt.c: FUSE_USE_VERSION=319;FUSE_USE_VERSION=30...
Checking lib/fuse_loop_mt.c: FUSE_USE_VERSION=319;HAVE_LIBFUSE_PRIVATE_CONFIG_H;FUSE_USE_VERSION...
Checking lib/fuse_loop_mt.c: FUSE_USE_VERSION=319;HAVE_STRUCT_STAT_ST_ATIMESPEC...
Checking lib/fuse_loop_mt.c: FUSE_USE_VERSION=319;HAVE_SYMVER_ATTRIBUTE...
Checking lib/fuse_loop_mt.c: FUSE_USE_VERSION=319;__KERNEL__;FUSE_USE_VERSION...
Checking lib/fuse_loop_mt.c: FUSE_USE_VERSION=319;__STDC_VERSION__;FUSE_USE_VERSION...
42/75 files checked 47% done
Checking lib/fuse_misc.h ...
Checking lib/fuse_misc.h: FUSE_USE_VERSION=319...
Checking lib/fuse_misc.h: FUSE_USE_VERSION=319;HAVE_STRUCT_STAT_ST_ATIM...
Checking lib/fuse_misc.h: FUSE_USE_VERSION=319;HAVE_STRUCT_STAT_ST_ATIMESPEC...
Checking lib/fuse_misc.h: FUSE_USE_VERSION=319;HAVE_SYMVER_ATTRIBUTE;LIBFUSE_BUILT_WITH_VERSIONED_SYMBOLS...
Checking lib/fuse_misc.h: FUSE_USE_VERSION=319;LIBFUSE_BUILT_WITH_VERSIONED_SYMBOLS...
43/75 files checked 48% done
Checking lib/fuse_opt.c ...
Checking lib/fuse_opt.c: FUSE_USE_VERSION=319...
Checking lib/fuse_opt.c: FUSE_USE_VERSION=319;FUSE_LOWLEVEL_H_;FUSE_USE_VERSION...
Checking lib/fuse_opt.c: FUSE_USE_VERSION=319;FUSE_USE_VERSION=30...
Checking lib/fuse_opt.c: FUSE_USE_VERSION=319;HAVE_LIBFUSE_PRIVATE_CONFIG_H;FUSE_USE_VERSION...
Checking lib/fuse_opt.c: FUSE_USE_VERSION=319;HAVE_STRUCT_STAT_ST_ATIMESPEC...
Checking lib/fuse_opt.c: FUSE_USE_VERSION=319;HAVE_SYMVER_ATTRIBUTE...
Checking lib/fuse_opt.c: FUSE_USE_VERSION=319;__STDC_VERSION__;FUSE_USE_VERSION...
44/75 files checked 48% done
Checking lib/fuse_signals.c ...
Checking lib/fuse_signals.c: FUSE_USE_VERSION=319...
Checking lib/fuse_signals.c: FUSE_USE_VERSION=319;FUSE_LOWLEVEL_H_;FUSE_USE_VERSION...
Checking lib/fuse_signals.c: FUSE_USE_VERSION=319;FUSE_USE_VERSION=30...
Checking lib/fuse_signals.c: FUSE_USE_VERSION=319;HAVE_BACKTRACE;FUSE_USE_VERSION...
Checking lib/fuse_signals.c: FUSE_USE_VERSION=319;HAVE_LIBFUSE_PRIVATE_CONFIG_H;FUSE_USE_VERSION...
Checking lib/fuse_signals.c: FUSE_USE_VERSION=319;__STDC_VERSION__;FUSE_USE_VERSION...
45/75 files checked 49% done
Checking lib/fuse_uring_i.h ...
Checking lib/fuse_uring_i.h: FUSE_USE_VERSION=319...
Checking lib/fuse_uring_i.h: FUSE_USE_VERSION=319;FUSE_H_;FUSE_LOWLEVEL_H_;FUSE_USE_VERSION...
Checking lib/fuse_uring_i.h: FUSE_USE_VERSION=319;HAVE_LIBFUSE_PRIVATE_CONFIG_H;FUSE_USE_VERSION...
Checking lib/fuse_uring_i.h: FUSE_USE_VERSION=319;HAVE_URING;FUSE_USE_VERSION...
Checking lib/fuse_uring_i.h: FUSE_USE_VERSION=319;__KERNEL__;FUSE_USE_VERSION...
Checking lib/fuse_uring_i.h: FUSE_USE_VERSION=319;__STDC_VERSION__;FUSE_USE_VERSION...
46/75 files checked 49% done
Checking lib/mount_bsd.c ...
Checking lib/mount_bsd.c: FUSE_USE_VERSION=319...
lib/mount_bsd.c:190:8: style: The scope of the variable 'ret' can be reduced. [variableScope]
   int ret = -1;
       ^
lib/mount_bsd.c:138:16: style: Variable 'dev' can be declared as pointer to const [constVariablePointer]
 char *fdnam, *dev;
               ^
lib/mount_bsd.c:261:64: style: Parameter 'mo' can be declared as pointer to const [constParameterPointer]
int fuse_kern_mount(const char *mountpoint, struct mount_opts *mo)
                                                               ^
lib/mount_bsd.c:190:12: style: Variable 'ret' is assigned a value that is never used. [unreadVariable]
   int ret = -1;
           ^
Checking lib/mount_bsd.c: FUSE_USE_VERSION=319;FUSE_LOWLEVEL_H_;FUSE_USE_VERSION...
Checking lib/mount_bsd.c: FUSE_USE_VERSION=319;FUSE_USE_VERSION=30...
Checking lib/mount_bsd.c: FUSE_USE_VERSION=319;HAVE_LIBFUSE_PRIVATE_CONFIG_H;FUSE_USE_VERSION...
Checking lib/mount_bsd.c: FUSE_USE_VERSION=319;HAVE_STRUCT_STAT_ST_ATIMESPEC...
Checking lib/mount_bsd.c: FUSE_USE_VERSION=319;HAVE_SYMVER_ATTRIBUTE...
Checking lib/mount_bsd.c: FUSE_USE_VERSION=319;__STDC_VERSION__;FUSE_USE_VERSION...
47/75 files checked 50% done
Checking lib/usdt.h ...
Checking lib/usdt.h: FUSE_USE_VERSION=319...
Checking lib/usdt.h: FUSE_USE_VERSION=319;__LP64__...
Checking lib/usdt.h: FUSE_USE_VERSION=319;__STDC_VERSION__...
Checking lib/usdt.h: FUSE_USE_VERSION=319;__arm__...
Checking lib/usdt.h: FUSE_USE_VERSION=319;__i386__...
Checking lib/usdt.h: FUSE_USE_VERSION=319;__ia64__;__s390__;__s390x__...
Checking lib/usdt.h: FUSE_USE_VERSION=319;__loongarch__...
Checking lib/usdt.h: FUSE_USE_VERSION=319;__powerpc64__;__powerpc__...
Checking lib/usdt.h: FUSE_USE_VERSION=319;__powerpc__...
48/75 files checked 52% done
Checking lib/util.c ...
Checking lib/util.c: FUSE_USE_VERSION=319...
Checking lib/util.c: FUSE_USE_VERSION=319;FUSE_H_;FUSE_LOWLEVEL_H_...
Checking lib/util.c: FUSE_USE_VERSION=319;HAVE_LIBFUSE_PRIVATE_CONFIG_H...
Checking lib/util.c: FUSE_USE_VERSION=319;HAVE_PTHREAD_SETNAME_NP...
Checking lib/util.c: FUSE_USE_VERSION=319;__STDC_VERSION__...
49/75 files checked 52% done
Checking lib/fuse.c ...
Checking lib/fuse.c: FUSE_USE_VERSION=319...
lib/fuse.c:5025:30: style: Parameter 'version' can be declared as pointer to const [constParameterPointer]
     struct libfuse_version *version, void *user_data)
                             ^
Checking lib/fuse.c: FUSE_USE_VERSION=319;FUSE_LOWLEVEL_H_;FUSE_USE_VERSION...
lib/fuse.c:2971:19: warning: Uninitialized variable: &e [uninitvar]
 reply_entry(req, &e, err);
                  ^
lib/fuse.c:2945:6: note: Assuming condition is false
 if (!err) {
     ^
lib/fuse.c:2971:19: note: Uninitialized variable: &e
 reply_entry(req, &e, err);
                  ^
lib/fuse.c:2993:19: warning: Uninitialized variable: &e [uninitvar]
 reply_entry(req, &e, err);
                  ^
lib/fuse.c:2983:6: note: Assuming condition is false
 if (!err) {
     ^
lib/fuse.c:2993:19: note: Uninitialized variable: &e
 reply_entry(req, &e, err);
                  ^
lib/fuse.c:3076:19: warning: Uninitialized variable: &e [uninitvar]
 reply_entry(req, &e, err);
                  ^
lib/fuse.c:3066:6: note: Assuming condition is false
 if (!err) {
     ^
lib/fuse.c:3076:19: note: Uninitialized variable: &e
 reply_entry(req, &e, err);
                  ^
lib/fuse.c:3139:19: warning: Uninitialized variable: &e [uninitvar]
 reply_entry(req, &e, err);
                  ^
lib/fuse.c:3128:6: note: Assuming condition is false
 if (!err) {
     ^
lib/fuse.c:3139:19: note: Uninitialized variable: &e
 reply_entry(req, &e, err);
                  ^
Checking lib/fuse.c: FUSE_USE_VERSION=319;FUSE_USE_VERSION=30...
Checking lib/fuse.c: FUSE_USE_VERSION=319;HAVE_ICONV;FUSE_USE_VERSION...
Checking lib/fuse.c: FUSE_USE_VERSION=319;HAVE_LIBFUSE_PRIVATE_CONFIG_H;FUSE_USE_VERSION...
Checking lib/fuse.c: FUSE_USE_VERSION=319;HAVE_STATX;FUSE_USE_VERSION...
Checking lib/fuse.c: FUSE_USE_VERSION=319;HAVE_STRUCT_STAT_ST_ATIMESPEC...
Checking lib/fuse.c: FUSE_USE_VERSION=319;HAVE_SYMVER_ATTRIBUTE...
Checking lib/fuse.c: FUSE_USE_VERSION=319;HAVE_UTIMENSAT;FUSE_USE_VERSION...
Checking lib/fuse.c: FUSE_USE_VERSION=319;__FreeBSD__;FUSE_USE_VERSION...
Checking lib/fuse.c: FUSE_USE_VERSION=319;__FreeBSD__;__NetBSD__;FUSE_USE_VERSION...
Checking lib/fuse.c: FUSE_USE_VERSION=319;__KERNEL__;FUSE_USE_VERSION...
Checking lib/fuse.c: FUSE_USE_VERSION=319;__STDC_VERSION__;FUSE_USE_VERSION...
50/75 files checked 65% done
Checking lib/fuse_i.h ...
Checking lib/fuse_i.h: FUSE_USE_VERSION=319...
Checking lib/fuse_i.h: FUSE_USE_VERSION=319;FUSE_LOWLEVEL_H_;FUSE_USE_VERSION...
Checking lib/fuse_i.h: FUSE_USE_VERSION=319;FUSE_USE_VERSION=30...
Checking lib/fuse_i.h: FUSE_USE_VERSION=319;HAVE_LIBFUSE_PRIVATE_CONFIG_H;FUSE_USE_VERSION...
Checking lib/fuse_i.h: FUSE_USE_VERSION=319;__STDC_VERSION__;FUSE_USE_VERSION...
51/75 files checked 66% done
Checking lib/fuse_lowlevel.c ...
Checking lib/fuse_lowlevel.c: FUSE_USE_VERSION=319...
lib/fuse_lowlevel.c:1336:15: style: The scope of the variable 'i' can be reduced. [variableScope]
 unsigned int i;
              ^
lib/fuse_lowlevel.c:1445:31: style: The scope of the variable 'arg' can be reduced. [variableScope]
 const struct fuse_access_in *arg = op_in;
                              ^
lib/fuse_lowlevel.c:1481:14: style: The scope of the variable 'name' can be reduced. [variableScope]
 const char *name = in_payload;
             ^
lib/fuse_lowlevel.c:1506:14: style: The scope of the variable 'name' can be reduced. [variableScope]
 const char *name = in_payload;
             ^
lib/fuse_lowlevel.c:1530:14: style: The scope of the variable 'name' can be reduced. [variableScope]
 const char *name = in_payload;
             ^
lib/fuse_lowlevel.c:1548:14: style: The scope of the variable 'name' can be reduced. [variableScope]
 const char *name = in_payload;
             ^
lib/fuse_lowlevel.c:1606:32: style: The scope of the variable 'arg' can be reduced. [variableScope]
 const struct fuse_rename2_in *arg = op_in;
                               ^
lib/fuse_lowlevel.c:1676:14: style: The scope of the variable 'name' can be reduced. [variableScope]
 const char *name = in_payload;
             ^
lib/fuse_lowlevel.c:1761:14: style: The scope of the variable 'buf' can be reduced. [variableScope]
 const char *buf = in_payload;
             ^
lib/fuse_lowlevel.c:2094:33: style: The scope of the variable 'arg' can be reduced. [variableScope]
 const struct fuse_getxattr_in *arg = op_in;
                                ^
lib/fuse_lowlevel.c:2115:33: style: The scope of the variable 'arg' can be reduced. [variableScope]
 const struct fuse_getxattr_in *arg = inarg;
                                ^
lib/fuse_lowlevel.c:2132:14: style: The scope of the variable 'name' can be reduced. [variableScope]
 const char *name = in_payload;
             ^
lib/fuse_lowlevel.c:2342:29: style: The scope of the variable 'arg' can be reduced. [variableScope]
 const struct fuse_bmap_in *arg = op_in;
                            ^
lib/fuse_lowlevel.c:2359:14: style: The scope of the variable 'in_buf' can be reduced. [variableScope]
 const void *in_buf = in_payload;
             ^
Checking lib/fuse_lowlevel.c: FUSE_USE_VERSION=319;FUSE_LOWLEVEL_H_;FUSE_USE_VERSION...
Checking lib/fuse_lowlevel.c: FUSE_USE_VERSION=319;FUSE_USE_VERSION=30...
Checking lib/fuse_lowlevel.c: FUSE_USE_VERSION=319;HAVE_LIBFUSE_PRIVATE_CONFIG_H;FUSE_USE_VERSION...
Checking lib/fuse_lowlevel.c: FUSE_USE_VERSION=319;HAVE_PIPE2;O_CLOEXEC;HAVE_SPLICE;FUSE_USE_VERSION...
Checking lib/fuse_lowlevel.c: FUSE_USE_VERSION=319;HAVE_SPLICE;FUSE_USE_VERSION...
Checking lib/fuse_lowlevel.c: FUSE_USE_VERSION=319;HAVE_SPLICE;HAVE_VMSPLICE;FUSE_USE_VERSION...
Checking lib/fuse_lowlevel.c: FUSE_USE_VERSION=319;HAVE_STATX;FUSE_USE_VERSION...
Checking lib/fuse_lowlevel.c: FUSE_USE_VERSION=319;HAVE_STRUCT_STAT_ST_ATIMESPEC...
Checking lib/fuse_lowlevel.c: FUSE_USE_VERSION=319;HAVE_SYMVER_ATTRIBUTE...
Checking lib/fuse_lowlevel.c: FUSE_USE_VERSION=319;USDT_ENABLED;FUSE_USE_VERSION...
Checking lib/fuse_lowlevel.c: FUSE_USE_VERSION=319;__KERNEL__;FUSE_USE_VERSION...
Checking lib/fuse_lowlevel.c: FUSE_USE_VERSION=319;__LP64__...
Checking lib/fuse_lowlevel.c: FUSE_USE_VERSION=319;__STDC_VERSION__...
Checking lib/fuse_lowlevel.c: FUSE_USE_VERSION=319;__STDC_VERSION__;FUSE_USE_VERSION...
Checking lib/fuse_lowlevel.c: FUSE_USE_VERSION=319;__arm__...
Checking lib/fuse_lowlevel.c: FUSE_USE_VERSION=319;__i386__...
Checking lib/fuse_lowlevel.c: FUSE_USE_VERSION=319;__ia64__;__s390__;__s390x__...
Checking lib/fuse_lowlevel.c: FUSE_USE_VERSION=319;__loongarch__...
Checking lib/fuse_lowlevel.c: FUSE_USE_VERSION=319;__powerpc64__;__powerpc__...
Checking lib/fuse_lowlevel.c: FUSE_USE_VERSION=319;__powerpc__...
Checking lib/fuse_lowlevel.c: FUSE_USE_VERSION=319;linux;FUSE_USE_VERSION...
52/75 files checked 78% done
Checking lib/helper.c ...
Checking lib/helper.c: FUSE_USE_VERSION=319...
Checking lib/helper.c: FUSE_USE_VERSION=319;FUSE_LOWLEVEL_H_;FUSE_USE_VERSION...
Checking lib/helper.c: FUSE_USE_VERSION=319;FUSE_USE_VERSION=30...
Checking lib/helper.c: FUSE_USE_VERSION=319;HAVE_LIBFUSE_PRIVATE_CONFIG_H;FUSE_USE_VERSION...
Checking lib/helper.c: FUSE_USE_VERSION=319;HAVE_STRUCT_STAT_ST_ATIMESPEC...
Checking lib/helper.c: FUSE_USE_VERSION=319;HAVE_SYMVER_ATTRIBUTE...
Checking lib/helper.c: FUSE_USE_VERSION=319;__FreeBSD__;FUSE_USE_VERSION...
Checking lib/helper.c: FUSE_USE_VERSION=319;__STDC_VERSION__;FUSE_USE_VERSION...
53/75 files checked 80% done
Checking lib/fuse_uring.c ...
Checking lib/fuse_uring.c: FUSE_USE_VERSION=319...
Checking lib/fuse_uring.c: FUSE_USE_VERSION=319;FUSE_LOWLEVEL_H_;FUSE_USE_VERSION...
Checking lib/fuse_uring.c: FUSE_USE_VERSION=319;FUSE_USE_VERSION=30...
Checking lib/fuse_uring.c: FUSE_USE_VERSION=319;HAVE_LIBFUSE_PRIVATE_CONFIG_H;FUSE_USE_VERSION...
Checking lib/fuse_uring.c: FUSE_USE_VERSION=319;__KERNEL__;FUSE_USE_VERSION...
Checking lib/fuse_uring.c: FUSE_USE_VERSION=319;__STDC_VERSION__;FUSE_USE_VERSION...
54/75 files checked 82% done
Checking lib/mount.c ...
Checking lib/mount.c: FUSE_USE_VERSION=319...
lib/mount.c:130:63: style: Parameter 'action' can be declared as pointer to const [constParameterPointer]
static int fusermount_posix_spawn(posix_spawn_file_actions_t *action,
                                                              ^
Checking lib/mount.c: FUSE_USE_VERSION=319;FUSE_LOWLEVEL_H_;FUSE_USE_VERSION...
Checking lib/mount.c: FUSE_USE_VERSION=319;FUSE_USE_VERSION=30...
Checking lib/mount.c: FUSE_USE_VERSION=319;HAVE_LIBFUSE_PRIVATE_CONFIG_H;FUSE_USE_VERSION...
Checking lib/mount.c: FUSE_USE_VERSION=319;HAVE_STRUCT_STAT_ST_ATIMESPEC...
Checking lib/mount.c: FUSE_USE_VERSION=319;HAVE_SYMVER_ATTRIBUTE...
Checking lib/mount.c: FUSE_USE_VERSION=319;__NetBSD__;FUSE_USE_VERSION...
Checking lib/mount.c: FUSE_USE_VERSION=319;__STDC_VERSION__;FUSE_USE_VERSION...
55/75 files checked 84% done
Checking lib/mount_util.c ...
Checking lib/mount_util.c: FUSE_USE_VERSION=319...
Checking lib/mount_util.c: FUSE_USE_VERSION=319;__ANDROID__;__DragonFly__;__FreeBSD__;__NetBSD__...
Checking lib/mount_util.c: FUSE_USE_VERSION=319;__DragonFly__;__FreeBSD__;__FreeBSD_kernel__;__NetBSD__...
56/75 files checked 85% done
Checking lib/mount_util.h ...
Checking lib/mount_util.h: FUSE_USE_VERSION=319...
57/75 files checked 85% done
Checking lib/util.h ...
Checking lib/util.h: FUSE_USE_VERSION=319...
58/75 files checked 85% done
Checking test/hello.c ...
Checking test/hello.c: FUSE_USE_VERSION=319...
Checking test/hello.c: FUSE_USE_VERSION=319;FUSE_LOWLEVEL_H_...
Checking test/hello.c: FUSE_USE_VERSION=319;HAVE_LIBFUSE_PRIVATE_CONFIG_H...
Checking test/hello.c: FUSE_USE_VERSION=319;__STDC_VERSION__...
59/75 files checked 86% done
Checking test/readdir_inode.c ...
Checking test/readdir_inode.c: FUSE_USE_VERSION=319...
test/readdir_inode.c:31:12: portability: Non reentrant function 'readdir' called. For threadsafe applications it is recommended to use the reentrant replacement function 'readdir_r'. [readdirCalled]
    dent = readdir(dirp);
           ^
test/readdir_inode.c:47:16: portability: Non reentrant function 'readdir' called. For threadsafe applications it is recommended to use the reentrant replacement function 'readdir_r'. [readdirCalled]
        dent = readdir(dirp);
               ^
test/readdir_inode.c:17:20: style: Variable 'dent' can be declared as pointer to const [constVariablePointer]
    struct dirent* dent;
                   ^
60/75 files checked 86% done
Checking test/release_unlink_race.c ...
Checking test/release_unlink_race.c: FUSE_USE_VERSION=319...
test/release_unlink_race.c:66:56: style: Obsolescent function 'usleep' called. It is recommended to use 'nanosleep' or 'setitimer' instead. [usleepCalled]
        if(!getenv("RELEASEUNLINKRACE_DELAY_DISABLE")) usleep(100000);
                                                       ^
test/release_unlink_race.c:91:56: style: Obsolescent function 'usleep' called. It is recommended to use 'nanosleep' or 'setitimer' instead. [usleepCalled]
        if(!getenv("RELEASEUNLINKRACE_DELAY_DISABLE")) usleep(100000);
                                                       ^
Checking test/release_unlink_race.c: FUSE_USE_VERSION=319;FUSE_LOWLEVEL_H_...
Checking test/release_unlink_race.c: FUSE_USE_VERSION=319;HAVE_LIBFUSE_PRIVATE_CONFIG_H...
Checking test/release_unlink_race.c: FUSE_USE_VERSION=319;__STDC_VERSION__...
61/75 files checked 86% done
Checking test/stracedecode.c ...
Checking test/stracedecode.c: FUSE_USE_VERSION=319...
test/stracedecode.c:68:3: warning: %i in format string (no. 3) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint]
  printf("unique: %llu, opcode: %s (%i), nodeid: %lu, len: %i, insize: %i\n",
  ^
test/stracedecode.c:68:3: warning: %i in format string (no. 5) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint]
  printf("unique: %llu, opcode: %s (%i), nodeid: %lu, len: %i, insize: %i\n",
  ^
test/stracedecode.c:76:4: warning: %llu in format string (no. 1) requires 'unsigned long long' but the argument type is 'unsigned long'. [invalidPrintfArgType_uint]
   printf("-READ fh:%llu off:%llu siz:%u rfl:%u own:%llu fl:%u\n",
   ^
test/stracedecode.c:76:4: warning: %llu in format string (no. 2) requires 'unsigned long long' but the argument type is 'unsigned long'. [invalidPrintfArgType_uint]
   printf("-READ fh:%llu off:%llu siz:%u rfl:%u own:%llu fl:%u\n",
   ^
test/stracedecode.c:76:4: warning: %llu in format string (no. 5) requires 'unsigned long long' but the argument type is 'unsigned long'. [invalidPrintfArgType_uint]
   printf("-READ fh:%llu off:%llu siz:%u rfl:%u own:%llu fl:%u\n",
   ^
test/stracedecode.c:83:4: warning: %llu in format string (no. 1) requires 'unsigned long long' but the argument type is 'unsigned long'. [invalidPrintfArgType_uint]
   printf("-WRITE fh:%llu off:%llu siz:%u wfl:%u own:%llu fl:%u\n",
   ^
test/stracedecode.c:83:4: warning: %llu in format string (no. 2) requires 'unsigned long long' but the argument type is 'unsigned long'. [invalidPrintfArgType_uint]
   printf("-WRITE fh:%llu off:%llu siz:%u wfl:%u own:%llu fl:%u\n",
   ^
test/stracedecode.c:83:4: warning: %llu in format string (no. 5) requires 'unsigned long long' but the argument type is 'unsigned long'. [invalidPrintfArgType_uint]
   printf("-WRITE fh:%llu off:%llu siz:%u wfl:%u own:%llu fl:%u\n",
   ^
test/stracedecode.c:95:3: warning: %i in format string (no. 4) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint]
  printf("   unique: %llu, error: %i (%s), len: %i, outsize: %i\n",
  ^
test/stracedecode.c:103:5: warning: %llu in format string (no. 1) requires 'unsigned long long' but the argument type is 'unsigned long'. [invalidPrintfArgType_uint]
    printf("+ATTR v:%llu.%09u i:%llu s:%llu b:%llu\n",
    ^
test/stracedecode.c:103:5: warning: %llu in format string (no. 3) requires 'unsigned long long' but the argument type is 'unsigned long'. [invalidPrintfArgType_uint]
    printf("+ATTR v:%llu.%09u i:%llu s:%llu b:%llu\n",
    ^
test/stracedecode.c:103:5: warning: %llu in format string (no. 4) requires 'unsigned long long' but the argument type is 'unsigned long'. [invalidPrintfArgType_uint]
    printf("+ATTR v:%llu.%09u i:%llu s:%llu b:%llu\n",
    ^
test/stracedecode.c:103:5: warning: %llu in format string (no. 5) requires 'unsigned long long' but the argument type is 'unsigned long'. [invalidPrintfArgType_uint]
    printf("+ATTR v:%llu.%09u i:%llu s:%llu b:%llu\n",
    ^
test/stracedecode.c:110:5: warning: %llu in format string (no. 1) requires 'unsigned long long' but the argument type is 'unsigned long'. [invalidPrintfArgType_uint]
    printf("+ENTRY nodeid:%llu v:%llu.%09u i:%llu s:%llu b:%llu\n",
    ^
test/stracedecode.c:110:5: warning: %llu in format string (no. 2) requires 'unsigned long long' but the argument type is 'unsigned long'. [invalidPrintfArgType_uint]
    printf("+ENTRY nodeid:%llu v:%llu.%09u i:%llu s:%llu b:%llu\n",
    ^
test/stracedecode.c:110:5: warning: %llu in format string (no. 4) requires 'unsigned long long' but the argument type is 'unsigned long'. [invalidPrintfArgType_uint]
    printf("+ENTRY nodeid:%llu v:%llu.%09u i:%llu s:%llu b:%llu\n",
    ^
test/stracedecode.c:110:5: warning: %llu in format string (no. 5) requires 'unsigned long long' but the argument type is 'unsigned long'. [invalidPrintfArgType_uint]
    printf("+ENTRY nodeid:%llu v:%llu.%09u i:%llu s:%llu b:%llu\n",
    ^
test/stracedecode.c:110:5: warning: %llu in format string (no. 6) requires 'unsigned long long' but the argument type is 'unsigned long'. [invalidPrintfArgType_uint]
    printf("+ENTRY nodeid:%llu v:%llu.%09u i:%llu s:%llu b:%llu\n",
    ^
test/stracedecode.c:178:14: warning: %x in format string (no. 1) requires 'unsigned int *' but the argument type is 'signed int *'. [invalidScanfArgType_int]
       res = scanf("%x", &val);
             ^
test/stracedecode.c:65:26: style: Variable 'in' can be declared as pointer to const [constVariablePointer]
  struct fuse_in_header *in = (struct fuse_in_header *) buf;
                         ^
test/stracedecode.c:75:25: style: Variable 'arg' can be declared as pointer to const [constVariablePointer]
   struct fuse_read_in *arg = (struct fuse_read_in *) buf;
                        ^
test/stracedecode.c:82:26: style: Variable 'arg' can be declared as pointer to const [constVariablePointer]
   struct fuse_write_in *arg = (struct fuse_write_in *) buf;
                         ^
test/stracedecode.c:92:27: style: Variable 'out' can be declared as pointer to const [constVariablePointer]
  struct fuse_out_header *out = (struct fuse_out_header *) buf;
                          ^
test/stracedecode.c:102:27: style: Variable 'arg' can be declared as pointer to const [constVariablePointer]
    struct fuse_attr_out *arg = (struct fuse_attr_out *) buf;
                          ^
test/stracedecode.c:109:28: style: Variable 'arg' can be declared as pointer to const [constVariablePointer]
    struct fuse_entry_out *arg = (struct fuse_entry_out *) buf;
                           ^
Checking test/stracedecode.c: FUSE_USE_VERSION=319;__KERNEL__...
62/75 files checked 86% done
Checking test/test_abi.c ...
Checking test/test_abi.c: FUSE_USE_VERSION=319...
Checking test/test_abi.c: FUSE_USE_VERSION=319;FUSE_LOWLEVEL_H_...
Checking test/test_abi.c: FUSE_USE_VERSION=319;HAVE_LIBFUSE_PRIVATE_CONFIG_H...
Checking test/test_abi.c: FUSE_USE_VERSION=319;__STDC_VERSION__...
63/75 files checked 86% done
Checking test/test_setattr.c ...
Checking test/test_setattr.c: FUSE_USE_VERSION=319...
test/test_setattr.c:142:12: warning: Assert statement calls a function which may have desired side effects: 'snprintf'. [assertWithSideEffect]
    assert(snprintf(fname, PATH_MAX, "%s/" FILE_NAME,
           ^
test/test_setattr.c:150:12: warning: Assert statement calls a function which may have desired side effects: 'fchmod'. [assertWithSideEffect]
    assert(fchmod(fd, 0600) == 0);
           ^
test/test_setattr.c:171:12: warning: Assert statement calls a function which may have desired side effects: 'pthread_create'. [assertWithSideEffect]
    assert(pthread_create(&fs_thread, NULL, run_fs, (void *)se) == 0);
           ^
test/test_setattr.c:150:19: warning: Either the condition 'fd==-1' is redundant or fchmod() argument nr 1 can have invalid value. The value is -1 but the valid values are '0:'. [invalidFunctionArg]
    assert(fchmod(fd, 0600) == 0);
                  ^
test/test_setattr.c:145:12: note: Assuming that condition 'fd==-1' is not redundant
    if (fd == -1) {
           ^
test/test_setattr.c:150:19: note: Invalid argument
    assert(fchmod(fd, 0600) == 0);
                  ^
test/test_setattr.c:151:11: warning: Either the condition 'fd==-1' is redundant or close() argument nr 1 can have invalid value. The value is -1 but the valid values are '0:'. [invalidFunctionArg]
    close(fd);
          ^
test/test_setattr.c:145:12: note: Assuming that condition 'fd==-1' is not redundant
    if (fd == -1) {
           ^
test/test_setattr.c:151:11: note: Invalid argument
    close(fd);
          ^
Checking test/test_setattr.c: FUSE_USE_VERSION=319;FUSE_LOWLEVEL_H_...
Checking test/test_setattr.c: FUSE_USE_VERSION=319;HAVE_LIBFUSE_PRIVATE_CONFIG_H...
Checking test/test_setattr.c: FUSE_USE_VERSION=319;__STDC_VERSION__...
Checking test/test_setattr.c: FUSE_USE_VERSION=319;__linux__...
64/75 files checked 87% done
Checking test/test_signals.c ...
Checking test/test_signals.c: FUSE_USE_VERSION=319...
test/test_signals.c:56:2: style: Obsolescent function 'usleep' called. It is recommended to use 'nanosleep' or 'setitimer' instead. [usleepCalled]
 usleep(2 * 1000 * 1000);
 ^
test/test_signals.c:56:18: error: Invalid usleep() argument nr 1. The value is 2000000 but the valid values are '0:999999'. [invalidFunctionArg]
 usleep(2 * 1000 * 1000);
                 ^
Checking test/test_signals.c: FUSE_USE_VERSION=319;FUSE_LOWLEVEL_H_...
Checking test/test_signals.c: FUSE_USE_VERSION=319;HAVE_LIBFUSE_PRIVATE_CONFIG_H...
Checking test/test_signals.c: FUSE_USE_VERSION=319;__STDC_VERSION__...
65/75 files checked 87% done
Checking test/test_syscalls.c ...
Checking test/test_syscalls.c: FUSE_USE_VERSION=319...
test/test_syscalls.c:420:8: portability: Non reentrant function 'readdir' called. For threadsafe applications it is recommended to use the reentrant replacement function 'readdir_r'. [readdirCalled]
  de = readdir(dp);
       ^
test/test_syscalls.c:794:8: portability: Non reentrant function 'readdir' called. For threadsafe applications it is recommended to use the reentrant replacement function 'readdir_r'. [readdirCalled]
  de = readdir(dp);
       ^
test/test_syscalls.c:806:8: portability: Non reentrant function 'readdir' called. For threadsafe applications it is recommended to use the reentrant replacement function 'readdir_r'. [readdirCalled]
  de = readdir(dp);
       ^
test/test_syscalls.c:811:8: portability: Non reentrant function 'readdir' called. For threadsafe applications it is recommended to use the reentrant replacement function 'readdir_r'. [readdirCalled]
  de = readdir(dp);
       ^
test/test_syscalls.c:984:8: style: Obsolescent function 'utime' called. It is recommended to use 'utimensat' instead. [utimeCalled]
 res = utime(testfile, &utm);
       ^
test/test_syscalls.c:1934:3: error: Resource leak: fd [resourceLeak]
  return -1;
  ^
test/test_syscalls.c:2038:3: error: Resource leak: fd [resourceLeak]
  return -1;
  ^
test/test_syscalls.c:2072:3: error: Resource leak: fd [resourceLeak]
  return -1;
  ^
test/test_syscalls.c:2083:3: error: Resource leak: fd [resourceLeak]
  return -1;
  ^
test/test_syscalls.c:2088:3: error: Resource leak: fd [resourceLeak]
  return -1;
  ^
test/test_syscalls.c:275:56: style: Parameter 'st' can be declared as pointer to const [constParameterPointer]
static int fcheck_stat(int fd, int flags, struct stat *st)
                                                       ^
Checking test/test_syscalls.c: FUSE_USE_VERSION=319;HAVE_COPY_FILE_RANGE...
Checking test/test_syscalls.c: FUSE_USE_VERSION=319;HAVE_STATX...
66/75 files checked 92% done
Checking test/test_want_conversion.c ...
Checking test/test_want_conversion.c: FUSE_USE_VERSION=319...
Checking test/test_want_conversion.c: FUSE_USE_VERSION=319;FUSE_LOWLEVEL_H_...
Checking test/test_want_conversion.c: FUSE_USE_VERSION=319;HAVE_LIBFUSE_PRIVATE_CONFIG_H...
Checking test/test_want_conversion.c: FUSE_USE_VERSION=319;__STDC_VERSION__...
67/75 files checked 93% done
Checking test/test_write_cache.c ...
Checking test/test_write_cache.c: FUSE_USE_VERSION=319...
test/test_write_cache.c:232:9: warning: Assert statement calls a function which may have desired side effects: 'read'. [assertWithSideEffect]
 assert(read(fd, buf, dsize) == dsize);
        ^
test/test_write_cache.c:235:9: warning: Assert statement calls a function which may have desired side effects: 'snprintf'. [assertWithSideEffect]
 assert(snprintf(fname, PATH_MAX, "%s/" FILE_NAME, mountpoint) > 0);
        ^
test/test_write_cache.c:245:10: warning: Assert statement calls a function which may have desired side effects: 'pthread_create'. [assertWithSideEffect]
  assert(pthread_create(&rofd_thread, NULL, close_rofd,
         ^
test/test_write_cache.c:252:10: warning: Assert statement calls a function which may have desired side effects: 'pwrite'. [assertWithSideEffect]
  assert(pwrite(fd, buf + off, iosize, off) == iosize);
         ^
test/test_write_cache.c:262:10: warning: Assert statement calls a function which may have desired side effects: 'pthread_join'. [assertWithSideEffect]
  assert(pthread_join(rofd_thread, NULL) == 0);
         ^
test/test_write_cache.c:285:9: warning: Assert statement calls a function which may have desired side effects: 'pthread_create'. [assertWithSideEffect]
 assert(pthread_create(&fs_thread, NULL, run_fs, (void *)se) == 0);
        ^
test/test_write_cache.c:294:9: warning: Assert statement calls a function which may have desired side effects: 'pthread_join'. [assertWithSideEffect]
 assert(pthread_join(fs_thread, NULL) == 0);
        ^
test/test_write_cache.c:170:3: style: Obsolescent function 'usleep' called. It is recommended to use 'nanosleep' or 'setitimer' instead. [usleepCalled]
  usleep(options.delay_ms * 1000);
  ^
test/test_write_cache.c:248:3: style: Obsolescent function 'usleep' called. It is recommended to use 'nanosleep' or 'setitimer' instead. [usleepCalled]
  usleep(options.delay_ms * 1000);
  ^
test/test_write_cache.c:249:2: error: Resource leak: rofd [resourceLeak]
 }
 ^
Checking test/test_write_cache.c: FUSE_USE_VERSION=319;FUSE_LOWLEVEL_H_...
Checking test/test_write_cache.c: FUSE_USE_VERSION=319;HAVE_LIBFUSE_PRIVATE_CONFIG_H...
Checking test/test_write_cache.c: FUSE_USE_VERSION=319;__STDC_VERSION__...
Checking test/test_write_cache.c: FUSE_USE_VERSION=319;__linux__...
68/75 files checked 93% done
Checking test/wrong_command.c ...
Checking test/wrong_command.c: FUSE_USE_VERSION=319...
Checking test/wrong_command.c: FUSE_USE_VERSION=319;MESON_IS_SUBPROJECT...
69/75 files checked 93% done
Checking test/test_teardown_watchdog.c ...
Checking test/test_teardown_watchdog.c: FUSE_USE_VERSION=319...
test/test_teardown_watchdog.c:71:2: style: Obsolescent function 'usleep' called. It is recommended to use 'nanosleep' or 'setitimer' instead. [usleepCalled]
 usleep(uta->delay_ms * 1000);
 ^
test/test_teardown_watchdog.c:165:2: style: Obsolescent function 'usleep' called. It is recommended to use 'nanosleep' or 'setitimer' instead. [usleepCalled]
 usleep(500 * 1000);
 ^
test/test_teardown_watchdog.c:180:3: style: Obsolescent function 'usleep' called. It is recommended to use 'nanosleep' or 'setitimer' instead. [usleepCalled]
  usleep(100 * 1000);
  ^
Checking test/test_teardown_watchdog.c: FUSE_USE_VERSION=319;FUSE_LOWLEVEL_H_...
Checking test/test_teardown_watchdog.c: FUSE_USE_VERSION=319;HAVE_LIBFUSE_PRIVATE_CONFIG_H...
Checking test/test_teardown_watchdog.c: FUSE_USE_VERSION=319;__STDC_VERSION__...
70/75 files checked 94% done
Checking util/fusermount.c ...
Checking util/fusermount.c: FUSE_USE_VERSION=319...
util/fusermount.c:185:22: portability: Non reentrant function 'getpwuid' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getpwuid_r'. [getpwuidCalled]
 struct passwd *pw = getpwuid(getuid());
                     ^
util/fusermount.c:1328:12: warning: If memory allocation fails, then there is a possible null pointer dereference: x_mnt_opts [nullPointerOutOfMemory]
   strncat(x_mnt_opts, x_opts,
           ^
util/fusermount.c:1321:29: note: Assuming allocation function fails
   char *x_mnt_opts = calloc(1, x_mnt_opts_len);
                            ^
util/fusermount.c:1321:29: note: Assignment 'x_mnt_opts=calloc(1,x_mnt_opts_len)', assigned value is 0
   char *x_mnt_opts = calloc(1, x_mnt_opts_len);
                            ^
util/fusermount.c:1328:12: note: Null pointer dereference
   strncat(x_mnt_opts, x_opts,
           ^
util/fusermount.c:357:14: style: The scope of the variable 'mnt' can be reduced. [variableScope]
 const char *mnt = a[1];
             ^
util/fusermount.c:602:6: style: The scope of the variable 'n_mounts' can be reduced. [variableScope]
 int n_mounts = 0;
     ^
util/fusermount.c:609:20: style: Variable 'sm' can be declared as pointer to const [constVariablePointer]
 struct statmount *sm;
                   ^
util/fusermount.c:602:15: style: Variable 'n_mounts' is assigned a value that is never used. [unreadVariable]
 int n_mounts = 0;
              ^
util/fusermount.c:603:10: style: Variable 'ret' is assigned a value that is never used. [unreadVariable]
 int ret = 0;
         ^
Checking util/fusermount.c: FUSE_USE_VERSION=319;GETMNTENT_NEEDS_UNESCAPING...
Checking util/fusermount.c: FUSE_USE_VERSION=319;HAVE_CLOSE_RANGE...
Checking util/fusermount.c: FUSE_USE_VERSION=319;HAVE_CLOSE_RANGE;linux...
Checking util/fusermount.c: FUSE_USE_VERSION=319;HAVE_LISTMOUNT...
Checking util/fusermount.c: FUSE_USE_VERSION=319;IGNORE_MTAB...
Checking util/fusermount.c: FUSE_USE_VERSION=319;__ia64__...
71/75 files checked 98% done
Checking util/mount.fuse.c ...
Checking util/mount.fuse.c: FUSE_USE_VERSION=319...
util/mount.fuse.c:314:10: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [strtokCalled]
   opt = strtok(opts, ",");
         ^
util/mount.fuse.c:348:11: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [strtokCalled]
    opt = strtok(NULL, ",");
          ^
util/mount.fuse.c:409:24: portability: Non reentrant function 'getpwnam' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getpwnam_r'. [getpwnamCalled]
  struct passwd *pwd = getpwnam(setuid_name);
                       ^
util/mount.fuse.c:409:18: style: Variable 'pwd' can be declared as pointer to const [constVariablePointer]
  struct passwd *pwd = getpwnam(setuid_name);
                 ^
Checking util/mount.fuse.c: FUSE_USE_VERSION=319;FUSE_LOWLEVEL_H_...
Checking util/mount.fuse.c: FUSE_USE_VERSION=319;FUSE_USE_VERSION=30...
Checking util/mount.fuse.c: FUSE_USE_VERSION=319;HAVE_LIBFUSE_PRIVATE_CONFIG_H...
Checking util/mount.fuse.c: FUSE_USE_VERSION=319;SECBIT_KEEP_CAPS;SECURE_KEEP_CAPS;linux...
util/mount.fuse.c:212:4: warning: %u in format string (no. 2) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint]
   fprintf(stderr,
   ^
util/mount.fuse.c:218:4: warning: %u in format string (no. 2) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint]
   fprintf(stderr,
   ^
Checking util/mount.fuse.c: FUSE_USE_VERSION=319;SECBIT_KEEP_CAPS_LOCKED;SECURE_KEEP_CAPS_LOCKED;linux...
Checking util/mount.fuse.c: FUSE_USE_VERSION=319;SECBIT_NOROOT;SECURE_NOROOT;linux...
Checking util/mount.fuse.c: FUSE_USE_VERSION=319;SECBIT_NOROOT_LOCKED;SECURE_NOROOT_LOCKED;linux...
Checking util/mount.fuse.c: FUSE_USE_VERSION=319;SECBIT_NO_SETUID_FIXUP;SECURE_NO_SETUID_FIXUP;linux...
Checking util/mount.fuse.c: FUSE_USE_VERSION=319;SECBIT_NO_SETUID_FIXUP_LOCKED;SECURE_NO_SETUID_FIXUP_LOCKED;linux...
Checking util/mount.fuse.c: FUSE_USE_VERSION=319;__STDC_VERSION__...
Checking util/mount.fuse.c: FUSE_USE_VERSION=319;linux...
72/75 files checked 99% done
Checking build-x86_64/meson-private/sanitycheckc.c ...
Checking build-x86_64/meson-private/sanitycheckc.c: FUSE_USE_VERSION=319...
73/75 files checked 99% done
Checking build-x86_64/fuse_config.h ...
Checking build-x86_64/fuse_config.h: FUSE_USE_VERSION=319...
74/75 files checked 99% done
Checking build-x86_64/libfuse_config.h ...
Checking build-x86_64/libfuse_config.h: FUSE_USE_VERSION=319...
75/75 files checked 100% done
include/fuse.h:923:0: style: The function 'fuse_main_real' is never used. [unusedFunction]
static inline int fuse_main_real(int argc, char *argv[],
^
lib/fuse.c:370:0: style: The function 'list_add_head' is never used. [unusedFunction]
static inline void list_add_head(struct list_head *new, struct list_head *head)
^
lib/fuse.c:1819:0: style: The function 'fuse_fs_read' is never used. [unusedFunction]
int fuse_fs_read(struct fuse_fs *fs, const char *path, char *mem, size_t size,
^
lib/fuse.c:1924:0: style: The function 'fuse_fs_write' is never used. [unusedFunction]
int fuse_fs_write(struct fuse_fs *fs, const char *path, const char *mem,
^
lib/fuse.c:4718:0: style: The function 'fuse_loop_mt_31' is never used. [unusedFunction]
int fuse_loop_mt_31(struct fuse *f, int clone_fd)
^
lib/fuse.c:4735:0: style: The function 'fuse_exit' is never used. [unusedFunction]
void fuse_exit(struct fuse *f)
^
lib/fuse.c:4750:0: style: The function 'fuse_getgroups' is never used. [unusedFunction]
int fuse_getgroups(int size, gid_t list[])
^
lib/fuse.c:4759:0: style: The function 'fuse_interrupted' is never used. [unusedFunction]
int fuse_interrupted(void)
^
lib/fuse.c:5213:0: style: The function 'fuse_new_30' is never used. [unusedFunction]
struct fuse *fuse_new_30(struct fuse_args *args,
^
lib/fuse.c:5299:0: style: The function 'fuse_version' is never used. [unusedFunction]
int fuse_version(void)
^
lib/fuse_log.c:32:0: style: The function 'fuse_set_log_func' is never used. [unusedFunction]
void fuse_set_log_func(fuse_log_func_t func)
^
lib/fuse_log.c:49:0: style: The function 'fuse_log_enable_syslog' is never used. [unusedFunction]
void fuse_log_enable_syslog(const char *ident, int option, int facility)
^
lib/fuse_log.c:56:0: style: The function 'fuse_log_close_syslog' is never used. [unusedFunction]
void fuse_log_close_syslog(void)
^
lib/fuse_loop_mt.c:439:0: style: The function 'fuse_session_loop_mt_32' is never used. [unusedFunction]
int fuse_session_loop_mt_32(struct fuse_session *se, const struct fuse_loop_config_v1 *config_v1)
^
lib/fuse_loop_mt.c:463:0: style: The function 'fuse_session_loop_mt_31' is never used. [unusedFunction]
int fuse_session_loop_mt_31(struct fuse_session *se, int clone_fd)
^
lib/fuse_lowlevel.c:365:0: style: The function 'fuse_reply_iov' is never used. [unusedFunction]
int fuse_reply_iov(fuse_req_t req, const struct iovec *iov, int count)
^
lib/fuse_lowlevel.c:580:0: style: The function 'fuse_passthrough_open' is never used. [unusedFunction]
int fuse_passthrough_open(fuse_req_t req, int fd)
^
lib/fuse_lowlevel.c:594:0: style: The function 'fuse_passthrough_close' is never used. [unusedFunction]
int fuse_passthrough_close(fuse_req_t req, int backing_id)
^
lib/fuse_lowlevel.c:3240:0: style: The function 'fuse_lowlevel_notify_delete' is never used. [unusedFunction]
int fuse_lowlevel_notify_delete(struct fuse_session *se,
^
lib/fuse_lowlevel.c:3450:0: style: The function 'fuse_req_is_uring' is never used. [unusedFunction]
bool fuse_req_is_uring(fuse_req_t req)
^
lib/fuse_lowlevel.c:4177:0: style: The function 'fuse_session_receive_buf' is never used. [unusedFunction]
int fuse_session_receive_buf(struct fuse_session *se, struct fuse_buf *buf)
^
lib/fuse_lowlevel.c:4397:0: style: The function 'fuse_session_custom_io_30' is never used. [unusedFunction]
int fuse_session_custom_io_30(struct fuse_session *se,
^
lib/fuse_lowlevel.c:4464:0: style: The function 'fuse_session_fd' is never used. [unusedFunction]
int fuse_session_fd(const struct fuse_session *se)
^
lib/fuse_lowlevel.c:4561:0: style: The function 'fuse_session_reset' is never used. [unusedFunction]
void fuse_session_reset(struct fuse_session *se)
^
lib/fuse_opt.c:201:0: style: The function 'fuse_opt_match' is never used. [unusedFunction]
int fuse_opt_match(const struct fuse_opt *opts, const char *opt)
^
lib/fuse_signals.c:175:0: style: The function 'fuse_set_fail_signal_handlers' is never used. [unusedFunction]
int fuse_set_fail_signal_handlers(struct fuse_session *se)
^
lib/fuse_uring.c:209:0: style: The function 'fuse_req_get_payload' is never used. [unusedFunction]
int fuse_req_get_payload(fuse_req_t req, char **payload, size_t *payload_sz,
^
lib/helper.c:237:0: style: The function 'fuse_parse_cmdline_30' is never used. [unusedFunction]
int fuse_parse_cmdline_30(struct fuse_args *args,
^
lib/helper.c:422:0: style: The function 'fuse_apply_conn_info_opts' is never used. [unusedFunction]
void fuse_apply_conn_info_opts(const struct fuse_conn_info_opts *opts,
^
lib/helper.c:476:0: style: The function 'fuse_parse_conn_info_opts' is never used. [unusedFunction]
struct fuse_conn_info_opts* fuse_parse_conn_info_opts(struct fuse_args *args)
^
lib/cuse_lowlevel.c:147:0: style: The function 'cuse_lowlevel_new' should have static linkage since it is not used outside of its translation unit. [staticFunction]
struct fuse_session *cuse_lowlevel_new(struct fuse_args *args,
^
lib/cuse_lowlevel.c:273:0: style: The function 'cuse_lowlevel_setup' should have static linkage since it is not used outside of its translation unit. [staticFunction]
struct fuse_session *cuse_lowlevel_setup(int argc, char *argv[],
^
lib/cuse_lowlevel.c:344:0: style: The function 'cuse_lowlevel_teardown' should have static linkage since it is not used outside of its translation unit. [staticFunction]
void cuse_lowlevel_teardown(struct fuse_session *se)
^
lib/fuse.c:2253:0: style: The function 'fuse_fs_ioctl' should have static linkage since it is not used outside of its translation unit. [staticFunction]
int fuse_fs_ioctl(struct fuse_fs *fs, const char *path, unsigned int cmd,
^
lib/fuse.c:2267:0: style: The function 'fuse_fs_poll' should have static linkage since it is not used outside of its translation unit. [staticFunction]
int fuse_fs_poll(struct fuse_fs *fs, const char *path,
^
lib/fuse.c:2290:0: style: The function 'fuse_fs_fallocate' should have static linkage since it is not used outside of its translation unit. [staticFunction]
int fuse_fs_fallocate(struct fuse_fs *fs, const char *path, int mode,
^
lib/fuse.c:2306:0: style: The function 'fuse_fs_copy_file_range' should have static linkage since it is not used outside of its translation unit. [staticFunction]
ssize_t fuse_fs_copy_file_range(struct fuse_fs *fs, const char *path_in,
^
lib/fuse.c:2377:0: style: The function 'fuse_fs_syncfs' should have static linkage since it is not used outside of its translation unit. [staticFunction]
int fuse_fs_syncfs(struct fuse_fs *fs, const char *path)
^
lib/fuse.c:4526:0: style: The function 'fuse_clean_cache' should have static linkage since it is not used outside of its translation unit. [staticFunction]
int fuse_clean_cache(struct fuse *f)
^
lib/fuse.c:4685:0: style: The function 'fuse_loop_mt_312' should have static linkage since it is not used outside of its translation unit. [staticFunction]
int fuse_loop_mt_312(struct fuse *f, struct fuse_loop_config *config)
^
lib/fuse.c:5001:0: style: The function 'fuse_start_cleanup_thread' should have static linkage since it is not used outside of its translation unit. [staticFunction]
int fuse_start_cleanup_thread(struct fuse *f)
^
lib/fuse.c:5009:0: style: The function 'fuse_stop_cleanup_thread' should have static linkage since it is not used outside of its translation unit. [staticFunction]
void fuse_stop_cleanup_thread(struct fuse *f)
^
lib/fuse.c:5196:0: style: The function 'fuse_new_31' should have static linkage since it is not used outside of its translation unit. [staticFunction]
struct fuse *fuse_new_31(struct fuse_args *args,
^
lib/fuse_loop_mt.c:497:0: style: The function 'fuse_loop_cfg_verify' should have static linkage since it is not used outside of its translation unit. [staticFunction]
int fuse_loop_cfg_verify(const struct fuse_loop_config *config)
^
lib/fuse_opt.c:95:0: style: The function 'fuse_opt_insert_arg' should have static linkage since it is not used outside of its translation unit. [staticFunction]
int fuse_opt_insert_arg(struct fuse_args *args, int pos, const char *arg)
^
lib/helper.c:208:0: style: The function 'fuse_parse_cmdline_312' should have static linkage since it is not used outside of its translation unit. [staticFunction]
int fuse_parse_cmdline_312(struct fuse_args *args,
^
nofile:0:0: information: Active checkers: 109/856 (use --checkers-report=<filename> to see details) [checkersReport]


^ permalink raw reply

* Re: [GIT PULL v5.1] libfuse: run fuse servers as a contained service
From: Bernd Schubert @ 2026-05-02 16:58 UTC (permalink / raw)
  To: Darrick J. Wong
  Cc: fuse-devel, joannelkoong, linux-ext4, linux-fsdevel, miklos, neal
In-Reply-To: <20260502163027.GO7765@frogsfrogsfrogs>



On 5/2/26 18:30, Darrick J. Wong wrote:
> On Sat, May 02, 2026 at 05:59:06PM +0200, Bernd Schubert wrote:
>>
>>
>> On 5/1/26 00:49, Darrick J. Wong wrote:
>>> On Thu, Apr 30, 2026 at 11:34:06PM +0200, Bernd Schubert wrote:
>>>> Hi Darrick,
>>>>
>>>> On 4/30/26 23:18, Darrick J. Wong wrote:
>>>>> Hi Bernd,
>>>>>
>>>>> Please pull this branch with changes for libfuse.
>>>>>
>>>>> As usual, I did a test-merge with the main upstream branch as of a few
>>>>> minutes ago, and didn't see any conflicts.  Please let me know if you
>>>>> encounter any problems.
>>>>
>>>> pushed to my github branch. BSD build fails with
>>>>
>>>> 2026-04-30T21:25:16.3874802Z FAILED: [code=1] lib/libfuse3.so.3.19.0 
>>>> 2026-04-30T21:25:16.3906762Z cc  -o lib/libfuse3.so.3.19.0 lib/libfuse3.so.3.19.0.p/fuse.c.o lib/libfuse3.so.3.19.0.p/fuse_loop.c.o lib/libfuse3.so.3.19.0.p/fuse_loop_mt.c.o lib/libfuse3.so.3.19.0.p/fuse_lowlevel.c.o lib/libfuse3.so.3.19.0.p/fuse_opt.c.o lib/libfuse3.so.3.19.0.p/fuse_signals.c.o lib/libfuse3.so.3.19.0.p/buffer.c.o lib/libfuse3.so.3.19.0.p/cuse_lowlevel.c.o lib/libfuse3.so.3.19.0.p/helper.c.o lib/libfuse3.so.3.19.0.p/modules_subdir.c.o lib/libfuse3.so.3.19.0.p/mount_util.c.o lib/libfuse3.so.3.19.0.p/fuse_log.c.o lib/libfuse3.so.3.19.0.p/compat.c.o lib/libfuse3.so.3.19.0.p/util.c.o lib/libfuse3.so.3.19.0.p/mount_bsd.c.o lib/libfuse3.so.3.19.0.p/fuse_service_stub.c.o lib/libfuse3.so.3.19.0.p/modules_iconv.c.o -Wl,--as-needed -Wl,--no-undefined -shared -fPIC -Wl,-soname,libfuse3.so.4 -Wl,--version-script,/home/runner/work/libfuse/libfuse/lib/fuse_versionscript -pthread -Wl,--start-group -ldl -lrt -Wl,--end-group
>>>> 2026-04-30T21:25:16.3939590Z ld: error: version script assignment of 'FUSE_3.19' to symbol 'fuse_service_can_allow_other' failed: symbol not defined
>>>
>>> Aha, that function got left out of the stub. :(
>>>
>>> Annoyingly, on Linux the build succeeds despite the missing symbol
>>> when I tweak meson so that it doesn't build the service stuff.  I would
>>> have thought that --no-undefined would have done that, but alas.
>>>
>>> Sorry about that too.  The following patch fixes it.
>>>
>>> diff --git i/lib/fuse_service_stub.c w/lib/fuse_service_stub.c
>>> index d34df3891a6e31..231b98423df628 100644
>>> --- i/lib/fuse_service_stub.c
>>> +++ w/lib/fuse_service_stub.c
>>> @@ -49,12 +49,17 @@ int fuse_service_send_goodbye(struct fuse_service *sf, int error)
>>>  int fuse_service_accept(struct fuse_service **sfp)
>>>  {
>>>  	*sfp = NULL;
>>>  	return 0;
>>>  }
>>>  
>>> +bool fuse_service_can_allow_other(struct fuse_service *sf)
>>> +{
>>> +	return false;
>>> +}
>>> +
>>>  int fuse_service_append_args(struct fuse_service *sf,
>>>  			     struct fuse_args *existing_args)
>>>  {
>>>  	return -EOPNOTSUPP;
>>>  }
>>>  
>>>
>>>> 2026-04-30T21:25:16.3951874Z cc: error: linker command failed with exit code 1 (use -v to see invocation)
>>>> 2026-04-30T21:25:16.4291582Z [44/82] cc -Itest/test_teardown_watchdog.p -Itest -I../test -Iinclude -I../include -Ilib -I../lib -I. -I.. -fdiagnostics-color=always -
>>>>
>>>>
>>>> checkpatch, CodeChecker-cppcheck, CodeChecker-gcc also all fail. This CodeQL
>>>
>>> Not sure why checkpatch fails, this is what I got (Debian 13):
>>>
>>> $ git diff origin/master.. | ./checkpatch.pl --max-line-length=100 --no-tree --ignore MAINTAINERS,SPDX_LICENSE_TAG,COMMIT_MESSAGE,FILE_PATH_CHANGES,EMAIL_SUBJECT,AVOID_EXTERNS,GIT_COMMIT_ID,ENOSYS_SYSCALL,ENOSYS,FROM_SIGN_OFF_MISMATCH,QUOTED_COMMIT_ID,,PREFER_ATTRIBUTE_ALWAYS_UNUSED,PREFER_DEFINED_ATTRIBUTE_MACRO,STRCPY,STRNCPY -
>>> No typos will be found - file '/storage/home/djwong/cdev/work/libfuse/spelling.txt': No such file or directory
>>> No structs that should be const will be found - file '/storage/home/djwong/cdev/work/libfuse/const_structs.checkpatch': No such file or directory
>>> total: 0 errors, 0 warnings, 3908 lines checked
>>>
>>> Your patch has no obvious style problems and is ready for submission.
>>>
>>> NOTE: Ignored message types: AVOID_EXTERNS COMMIT_MESSAGE EMAIL_SUBJECT ENOSYS ENOSYS_SYSCALL FILE_PATH_CHANGES FROM_SIGN_OFF_MISMATCH GIT_COMMIT_ID MAINTAINERS PREFER_ATTRIBUTE_ALWAYS_UNUSED PREFER_DEFINED_ATTRIBUTE_MACRO QUOTED_COMMIT_ID SPDX_LICENSE_TAG STRCPY STRNCPY
>>>
>>> cppcheck had a few things to say, but none of it was about the changed
>>> lines.
>>>
>>>> report is funny
>>>>
>>>>> int mount_service_main(int argc, char *argv[])
>>>>> Warning
>>>>> Poorly documented large function
>>>>> Poorly documented function: fewer than 2% comments for a function of 113 lines.
>>>>> CodeQL
>>>
>>> Hrmm.  I guess I'll have to figure out how to get those things running.
>>> That said, the stuff in mount_service.c is internal to libfuse (i.e.
>>> it's not public library API) so I didn't comment them as intensely.
>>> Would you like more?
>>>
>>>> I think I'm going to merge my sync fuse init series tomorrow.
>>>
>>> Yay!
>>>
>>>> Are you ok if skip posting another version of the series?
>>>
>>>                ^ is there an "I" here?  e.g. "...if I skip posting..."?
>>>
>>> /My/ normal practice (from xfs) was to repost the series as it was
>>> merged, followed by an announcement.  That way the mailing list is a
>>> complete record of what was merged.  However, very very few people
>>> actually do that, even in the kernel.
>>>
>>> I'm ok with you not posting another version of the series.
>>>
>>>> Or do you prefer to review the recent changes and last piece I'm going
>>>> to do tomorrow?
>>>
>>> Nah, just merge it.  I'll look over the changes once it's in the branch
>>> and if there's anything weird, you or I or anyone else can send patches.
>>> As long as you're not planning to tag it as a release, nothing's set in
>>> stone.
>>>
>>>> Basically my goal is to rebase your series against it immediately and
>>>> to merge your series during the next few days.
>>>
>>> <nod> Let me know what you want changed, I'll be around since I am not
>>> travelling anywhere for a couple of weeks. :)
>>>
>>> I can reflow changes into the patchset, or if you'd prefer, I can add
>>> them as new patches that would go on the end of the series.
>>>
>>
>> Hi Darrick,
>>
>> eventually merged my patches and made a quick rebase and conflict 
>> resolving with your branch. Github still reports plenty of issues ;)
>>
>> Could you fix all of the checkpatch isssues? This one shows plenty
>> "util: hoist the fuse.conf parsing and setuid mode enforcement code"
>>
>> bschubert2@imesrv6 libfuse.git>stg series
>> + mount_service-add-systemd
>> + mount_service-create-high
>> + mount_service-use-the-new
>> + mount_service-update-mtab
>>> util-hoist-the-fuse.conf
>> - util-fix-checkpatch-complaints
>> - mount_service-enable
>> - mount.fuse3-integrate-systemd
>> - mount_service-allow
>> - example-service_ll-create-a
>> - example-service-create-a
>> - nullfs-support-fuse-systemd
>> - meson-show-feature-summary
>> bschubert2@imesrv6 libfuse.git>.github/workflows/run-checkpatch.sh 
>> No typos will be found - file '/home/bschubert2/src/libfuse/libfuse.git/spelling.txt': No such file or directory
>> No structs that should be const will be found - file '/home/bschubert2/src/libfuse/libfuse.git/const_structs.checkpatch': No such file or directory
>> ERROR:GLOBAL_INITIALISERS: do not initialise globals to 0
>> #61: FILE: util/fuser_conf.c:33:
>> +int user_allow_other = 0;
>>
>> WARNING:LINE_SPACING: Missing a blank line after declarations
>> #74: FILE: util/fuser_conf.c:46:
>> +	char *dest = buf;
>> +	while (1) {
> 
> Oh!  The checkpatch fixes are all in the next commit
> "util-fix-checkpatch-complaints".  I kept the checkpatch fixes as a
> separate commit so that the hoist change can be inspected more easily.

That is not going to work, the script it set up to check every commit in
the PR branch.

> 
> (XFS practice is to have separate patches for moving the code and
> cleaning it up)
> 
>> ...
>>
>> I don't have a strong opinion about these two above - feel 
>> free to disable them. However, in order to merge it, it would
>> be good to run without any checkpatch report.
>> And everything that cppcheck and gcc-checker reports, definitely 
>> need to be fixed.
> 
> Hrm, should I try to fix the things that cppcheck complains about in
> HEAD?  There's an awful lot of them...
> 
> (oh, I see you pushed to master, I'll go rebase now)

I had already rebased:

https://github.com/bsbernd/libfuse/tree/fuse-service-container





^ permalink raw reply

* Re: [GIT PULL v5.1] libfuse: run fuse servers as a contained service
From: Darrick J. Wong @ 2026-05-02 18:57 UTC (permalink / raw)
  To: Bernd Schubert
  Cc: fuse-devel, joannelkoong, linux-ext4, linux-fsdevel, miklos, neal
In-Reply-To: <c88d39e4-0a67-4de6-9d7d-353f8c950c81@bsbernd.com>

On Sat, May 02, 2026 at 06:58:30PM +0200, Bernd Schubert wrote:
> 
> 
> On 5/2/26 18:30, Darrick J. Wong wrote:
> > On Sat, May 02, 2026 at 05:59:06PM +0200, Bernd Schubert wrote:
> >>
> >>
> >> On 5/1/26 00:49, Darrick J. Wong wrote:
> >>> On Thu, Apr 30, 2026 at 11:34:06PM +0200, Bernd Schubert wrote:
> >>>> Hi Darrick,
> >>>>
> >>>> On 4/30/26 23:18, Darrick J. Wong wrote:
> >>>>> Hi Bernd,
> >>>>>
> >>>>> Please pull this branch with changes for libfuse.
> >>>>>
> >>>>> As usual, I did a test-merge with the main upstream branch as of a few
> >>>>> minutes ago, and didn't see any conflicts.  Please let me know if you
> >>>>> encounter any problems.
> >>>>
> >>>> pushed to my github branch. BSD build fails with
> >>>>
> >>>> 2026-04-30T21:25:16.3874802Z FAILED: [code=1] lib/libfuse3.so.3.19.0 
> >>>> 2026-04-30T21:25:16.3906762Z cc  -o lib/libfuse3.so.3.19.0 lib/libfuse3.so.3.19.0.p/fuse.c.o lib/libfuse3.so.3.19.0.p/fuse_loop.c.o lib/libfuse3.so.3.19.0.p/fuse_loop_mt.c.o lib/libfuse3.so.3.19.0.p/fuse_lowlevel.c.o lib/libfuse3.so.3.19.0.p/fuse_opt.c.o lib/libfuse3.so.3.19.0.p/fuse_signals.c.o lib/libfuse3.so.3.19.0.p/buffer.c.o lib/libfuse3.so.3.19.0.p/cuse_lowlevel.c.o lib/libfuse3.so.3.19.0.p/helper.c.o lib/libfuse3.so.3.19.0.p/modules_subdir.c.o lib/libfuse3.so.3.19.0.p/mount_util.c.o lib/libfuse3.so.3.19.0.p/fuse_log.c.o lib/libfuse3.so.3.19.0.p/compat.c.o lib/libfuse3.so.3.19.0.p/util.c.o lib/libfuse3.so.3.19.0.p/mount_bsd.c.o lib/libfuse3.so.3.19.0.p/fuse_service_stub.c.o lib/libfuse3.so.3.19.0.p/modules_iconv.c.o -Wl,--as-needed -Wl,--no-undefined -shared -fPIC -Wl,-soname,libfuse3.so.4 -Wl,--version-script,/home/runner/work/libfuse/libfuse/lib/fuse_versionscript -pthread -Wl,--start-group -ldl -lrt -Wl,--end-group
> >>>> 2026-04-30T21:25:16.3939590Z ld: error: version script assignment of 'FUSE_3.19' to symbol 'fuse_service_can_allow_other' failed: symbol not defined
> >>>
> >>> Aha, that function got left out of the stub. :(
> >>>
> >>> Annoyingly, on Linux the build succeeds despite the missing symbol
> >>> when I tweak meson so that it doesn't build the service stuff.  I would
> >>> have thought that --no-undefined would have done that, but alas.
> >>>
> >>> Sorry about that too.  The following patch fixes it.
> >>>
> >>> diff --git i/lib/fuse_service_stub.c w/lib/fuse_service_stub.c
> >>> index d34df3891a6e31..231b98423df628 100644
> >>> --- i/lib/fuse_service_stub.c
> >>> +++ w/lib/fuse_service_stub.c
> >>> @@ -49,12 +49,17 @@ int fuse_service_send_goodbye(struct fuse_service *sf, int error)
> >>>  int fuse_service_accept(struct fuse_service **sfp)
> >>>  {
> >>>  	*sfp = NULL;
> >>>  	return 0;
> >>>  }
> >>>  
> >>> +bool fuse_service_can_allow_other(struct fuse_service *sf)
> >>> +{
> >>> +	return false;
> >>> +}
> >>> +
> >>>  int fuse_service_append_args(struct fuse_service *sf,
> >>>  			     struct fuse_args *existing_args)
> >>>  {
> >>>  	return -EOPNOTSUPP;
> >>>  }
> >>>  
> >>>
> >>>> 2026-04-30T21:25:16.3951874Z cc: error: linker command failed with exit code 1 (use -v to see invocation)
> >>>> 2026-04-30T21:25:16.4291582Z [44/82] cc -Itest/test_teardown_watchdog.p -Itest -I../test -Iinclude -I../include -Ilib -I../lib -I. -I.. -fdiagnostics-color=always -
> >>>>
> >>>>
> >>>> checkpatch, CodeChecker-cppcheck, CodeChecker-gcc also all fail. This CodeQL
> >>>
> >>> Not sure why checkpatch fails, this is what I got (Debian 13):
> >>>
> >>> $ git diff origin/master.. | ./checkpatch.pl --max-line-length=100 --no-tree --ignore MAINTAINERS,SPDX_LICENSE_TAG,COMMIT_MESSAGE,FILE_PATH_CHANGES,EMAIL_SUBJECT,AVOID_EXTERNS,GIT_COMMIT_ID,ENOSYS_SYSCALL,ENOSYS,FROM_SIGN_OFF_MISMATCH,QUOTED_COMMIT_ID,,PREFER_ATTRIBUTE_ALWAYS_UNUSED,PREFER_DEFINED_ATTRIBUTE_MACRO,STRCPY,STRNCPY -
> >>> No typos will be found - file '/storage/home/djwong/cdev/work/libfuse/spelling.txt': No such file or directory
> >>> No structs that should be const will be found - file '/storage/home/djwong/cdev/work/libfuse/const_structs.checkpatch': No such file or directory
> >>> total: 0 errors, 0 warnings, 3908 lines checked
> >>>
> >>> Your patch has no obvious style problems and is ready for submission.
> >>>
> >>> NOTE: Ignored message types: AVOID_EXTERNS COMMIT_MESSAGE EMAIL_SUBJECT ENOSYS ENOSYS_SYSCALL FILE_PATH_CHANGES FROM_SIGN_OFF_MISMATCH GIT_COMMIT_ID MAINTAINERS PREFER_ATTRIBUTE_ALWAYS_UNUSED PREFER_DEFINED_ATTRIBUTE_MACRO QUOTED_COMMIT_ID SPDX_LICENSE_TAG STRCPY STRNCPY
> >>>
> >>> cppcheck had a few things to say, but none of it was about the changed
> >>> lines.
> >>>
> >>>> report is funny
> >>>>
> >>>>> int mount_service_main(int argc, char *argv[])
> >>>>> Warning
> >>>>> Poorly documented large function
> >>>>> Poorly documented function: fewer than 2% comments for a function of 113 lines.
> >>>>> CodeQL
> >>>
> >>> Hrmm.  I guess I'll have to figure out how to get those things running.
> >>> That said, the stuff in mount_service.c is internal to libfuse (i.e.
> >>> it's not public library API) so I didn't comment them as intensely.
> >>> Would you like more?
> >>>
> >>>> I think I'm going to merge my sync fuse init series tomorrow.
> >>>
> >>> Yay!
> >>>
> >>>> Are you ok if skip posting another version of the series?
> >>>
> >>>                ^ is there an "I" here?  e.g. "...if I skip posting..."?
> >>>
> >>> /My/ normal practice (from xfs) was to repost the series as it was
> >>> merged, followed by an announcement.  That way the mailing list is a
> >>> complete record of what was merged.  However, very very few people
> >>> actually do that, even in the kernel.
> >>>
> >>> I'm ok with you not posting another version of the series.
> >>>
> >>>> Or do you prefer to review the recent changes and last piece I'm going
> >>>> to do tomorrow?
> >>>
> >>> Nah, just merge it.  I'll look over the changes once it's in the branch
> >>> and if there's anything weird, you or I or anyone else can send patches.
> >>> As long as you're not planning to tag it as a release, nothing's set in
> >>> stone.
> >>>
> >>>> Basically my goal is to rebase your series against it immediately and
> >>>> to merge your series during the next few days.
> >>>
> >>> <nod> Let me know what you want changed, I'll be around since I am not
> >>> travelling anywhere for a couple of weeks. :)
> >>>
> >>> I can reflow changes into the patchset, or if you'd prefer, I can add
> >>> them as new patches that would go on the end of the series.
> >>>
> >>
> >> Hi Darrick,
> >>
> >> eventually merged my patches and made a quick rebase and conflict 
> >> resolving with your branch. Github still reports plenty of issues ;)
> >>
> >> Could you fix all of the checkpatch isssues? This one shows plenty
> >> "util: hoist the fuse.conf parsing and setuid mode enforcement code"
> >>
> >> bschubert2@imesrv6 libfuse.git>stg series
> >> + mount_service-add-systemd
> >> + mount_service-create-high
> >> + mount_service-use-the-new
> >> + mount_service-update-mtab
> >>> util-hoist-the-fuse.conf
> >> - util-fix-checkpatch-complaints
> >> - mount_service-enable
> >> - mount.fuse3-integrate-systemd
> >> - mount_service-allow
> >> - example-service_ll-create-a
> >> - example-service-create-a
> >> - nullfs-support-fuse-systemd
> >> - meson-show-feature-summary
> >> bschubert2@imesrv6 libfuse.git>.github/workflows/run-checkpatch.sh 
> >> No typos will be found - file '/home/bschubert2/src/libfuse/libfuse.git/spelling.txt': No such file or directory
> >> No structs that should be const will be found - file '/home/bschubert2/src/libfuse/libfuse.git/const_structs.checkpatch': No such file or directory
> >> ERROR:GLOBAL_INITIALISERS: do not initialise globals to 0
> >> #61: FILE: util/fuser_conf.c:33:
> >> +int user_allow_other = 0;
> >>
> >> WARNING:LINE_SPACING: Missing a blank line after declarations
> >> #74: FILE: util/fuser_conf.c:46:
> >> +	char *dest = buf;
> >> +	while (1) {
> > 
> > Oh!  The checkpatch fixes are all in the next commit
> > "util-fix-checkpatch-complaints".  I kept the checkpatch fixes as a
> > separate commit so that the hoist change can be inspected more easily.
> 
> That is not going to work, the script it set up to check every commit in
> the PR branch.

In that case, please just squash them together with:

$ stg squash -n util-hoist-the-fuse.conf util-hoist-the-fuse.conf util-fix-checkpatch-complaints

> > 
> > (XFS practice is to have separate patches for moving the code and
> > cleaning it up)
> > 
> >> ...
> >>
> >> I don't have a strong opinion about these two above - feel 
> >> free to disable them. However, in order to merge it, it would
> >> be good to run without any checkpatch report.
> >> And everything that cppcheck and gcc-checker reports, definitely 
> >> need to be fixed.
> > 
> > Hrm, should I try to fix the things that cppcheck complains about in
> > HEAD?  There's an awful lot of them...
> > 
> > (oh, I see you pushed to master, I'll go rebase now)
> 
> I had already rebased:
> 
> https://github.com/bsbernd/libfuse/tree/fuse-service-container

Oh!  Ok, I'll rebase against that, then.

--D

^ permalink raw reply

* Re: [GIT PULL v5.1] libfuse: run fuse servers as a contained service
From: Darrick J. Wong @ 2026-05-02 19:05 UTC (permalink / raw)
  To: Bernd Schubert
  Cc: fuse-devel, joannelkoong, linux-ext4, linux-fsdevel, miklos, neal
In-Reply-To: <1d2c00d0-255f-44cd-9757-d7418373cdcd@bsbernd.com>

On Sat, May 02, 2026 at 06:26:16PM +0200, Bernd Schubert wrote:
> 
> 
> On 5/2/26 17:59, Bernd Schubert wrote:
> > 
> > 
> > On 5/1/26 00:49, Darrick J. Wong wrote:
> >> On Thu, Apr 30, 2026 at 11:34:06PM +0200, Bernd Schubert wrote:
> >>> Hi Darrick,
> >>>
> >>> On 4/30/26 23:18, Darrick J. Wong wrote:
> >>>> Hi Bernd,
> >>>>
> >>>> Please pull this branch with changes for libfuse.
> >>>>
> >>>> As usual, I did a test-merge with the main upstream branch as of a few
> >>>> minutes ago, and didn't see any conflicts.  Please let me know if you
> >>>> encounter any problems.
> >>>
> >>> pushed to my github branch. BSD build fails with
> >>>
> >>> 2026-04-30T21:25:16.3874802Z FAILED: [code=1] lib/libfuse3.so.3.19.0 
> >>> 2026-04-30T21:25:16.3906762Z cc  -o lib/libfuse3.so.3.19.0 lib/libfuse3.so.3.19.0.p/fuse.c.o lib/libfuse3.so.3.19.0.p/fuse_loop.c.o lib/libfuse3.so.3.19.0.p/fuse_loop_mt.c.o lib/libfuse3.so.3.19.0.p/fuse_lowlevel.c.o lib/libfuse3.so.3.19.0.p/fuse_opt.c.o lib/libfuse3.so.3.19.0.p/fuse_signals.c.o lib/libfuse3.so.3.19.0.p/buffer.c.o lib/libfuse3.so.3.19.0.p/cuse_lowlevel.c.o lib/libfuse3.so.3.19.0.p/helper.c.o lib/libfuse3.so.3.19.0.p/modules_subdir.c.o lib/libfuse3.so.3.19.0.p/mount_util.c.o lib/libfuse3.so.3.19.0.p/fuse_log.c.o lib/libfuse3.so.3.19.0.p/compat.c.o lib/libfuse3.so.3.19.0.p/util.c.o lib/libfuse3.so.3.19.0.p/mount_bsd.c.o lib/libfuse3.so.3.19.0.p/fuse_service_stub.c.o lib/libfuse3.so.3.19.0.p/modules_iconv.c.o -Wl,--as-needed -Wl,--no-undefined -shared -fPIC -Wl,-soname,libfuse3.so.4 -Wl,--version-script,/home/runner/work/libfuse/libfuse/lib/fuse_versionscript -pthread -Wl,--start-group -ldl -lrt -Wl,--end-group
> >>> 2026-04-30T21:25:16.3939590Z ld: error: version script assignment of 'FUSE_3.19' to symbol 'fuse_service_can_allow_other' failed: symbol not defined
> >>
> >> Aha, that function got left out of the stub. :(
> >>
> >> Annoyingly, on Linux the build succeeds despite the missing symbol
> >> when I tweak meson so that it doesn't build the service stuff.  I would
> >> have thought that --no-undefined would have done that, but alas.
> >>
> >> Sorry about that too.  The following patch fixes it.
> >>
> >> diff --git i/lib/fuse_service_stub.c w/lib/fuse_service_stub.c
> >> index d34df3891a6e31..231b98423df628 100644
> >> --- i/lib/fuse_service_stub.c
> >> +++ w/lib/fuse_service_stub.c
> >> @@ -49,12 +49,17 @@ int fuse_service_send_goodbye(struct fuse_service *sf, int error)
> >>  int fuse_service_accept(struct fuse_service **sfp)
> >>  {
> >>  	*sfp = NULL;
> >>  	return 0;
> >>  }
> >>  
> >> +bool fuse_service_can_allow_other(struct fuse_service *sf)
> >> +{
> >> +	return false;
> >> +}
> >> +
> >>  int fuse_service_append_args(struct fuse_service *sf,
> >>  			     struct fuse_args *existing_args)
> >>  {
> >>  	return -EOPNOTSUPP;
> >>  }
> >>  
> >>
> >>> 2026-04-30T21:25:16.3951874Z cc: error: linker command failed with exit code 1 (use -v to see invocation)
> >>> 2026-04-30T21:25:16.4291582Z [44/82] cc -Itest/test_teardown_watchdog.p -Itest -I../test -Iinclude -I../include -Ilib -I../lib -I. -I.. -fdiagnostics-color=always -
> >>>
> >>>
> >>> checkpatch, CodeChecker-cppcheck, CodeChecker-gcc also all fail. This CodeQL
> >>
> >> Not sure why checkpatch fails, this is what I got (Debian 13):
> >>
> >> $ git diff origin/master.. | ./checkpatch.pl --max-line-length=100 --no-tree --ignore MAINTAINERS,SPDX_LICENSE_TAG,COMMIT_MESSAGE,FILE_PATH_CHANGES,EMAIL_SUBJECT,AVOID_EXTERNS,GIT_COMMIT_ID,ENOSYS_SYSCALL,ENOSYS,FROM_SIGN_OFF_MISMATCH,QUOTED_COMMIT_ID,,PREFER_ATTRIBUTE_ALWAYS_UNUSED,PREFER_DEFINED_ATTRIBUTE_MACRO,STRCPY,STRNCPY -
> >> No typos will be found - file '/storage/home/djwong/cdev/work/libfuse/spelling.txt': No such file or directory
> >> No structs that should be const will be found - file '/storage/home/djwong/cdev/work/libfuse/const_structs.checkpatch': No such file or directory
> >> total: 0 errors, 0 warnings, 3908 lines checked
> >>
> >> Your patch has no obvious style problems and is ready for submission.
> >>
> >> NOTE: Ignored message types: AVOID_EXTERNS COMMIT_MESSAGE EMAIL_SUBJECT ENOSYS ENOSYS_SYSCALL FILE_PATH_CHANGES FROM_SIGN_OFF_MISMATCH GIT_COMMIT_ID MAINTAINERS PREFER_ATTRIBUTE_ALWAYS_UNUSED PREFER_DEFINED_ATTRIBUTE_MACRO QUOTED_COMMIT_ID SPDX_LICENSE_TAG STRCPY STRNCPY
> >>
> >> cppcheck had a few things to say, but none of it was about the changed
> >> lines.
> >>
> >>> report is funny
> >>>
> >>>> int mount_service_main(int argc, char *argv[])
> >>>> Warning
> >>>> Poorly documented large function
> >>>> Poorly documented function: fewer than 2% comments for a function of 113 lines.
> >>>> CodeQL
> >>
> >> Hrmm.  I guess I'll have to figure out how to get those things running.
> >> That said, the stuff in mount_service.c is internal to libfuse (i.e.
> >> it's not public library API) so I didn't comment them as intensely.
> >> Would you like more?
> >>
> >>> I think I'm going to merge my sync fuse init series tomorrow.
> >>
> >> Yay!
> >>
> >>> Are you ok if skip posting another version of the series?
> >>
> >>                ^ is there an "I" here?  e.g. "...if I skip posting..."?
> >>
> >> /My/ normal practice (from xfs) was to repost the series as it was
> >> merged, followed by an announcement.  That way the mailing list is a
> >> complete record of what was merged.  However, very very few people
> >> actually do that, even in the kernel.
> >>
> >> I'm ok with you not posting another version of the series.
> >>
> >>> Or do you prefer to review the recent changes and last piece I'm going
> >>> to do tomorrow?
> >>
> >> Nah, just merge it.  I'll look over the changes once it's in the branch
> >> and if there's anything weird, you or I or anyone else can send patches.
> >> As long as you're not planning to tag it as a release, nothing's set in
> >> stone.
> >>
> >>> Basically my goal is to rebase your series against it immediately and
> >>> to merge your series during the next few days.
> >>
> >> <nod> Let me know what you want changed, I'll be around since I am not
> >> travelling anywhere for a couple of weeks. :)
> >>
> >> I can reflow changes into the patchset, or if you'd prefer, I can add
> >> them as new patches that would go on the end of the series.
> >>
> > 
> > Hi Darrick,
> > 
> > eventually merged my patches and made a quick rebase and conflict 
> > resolving with your branch. Github still reports plenty of issues ;)
> > 
> > Could you fix all of the checkpatch isssues? This one shows plenty
> > "util: hoist the fuse.conf parsing and setuid mode enforcement code"
> > 
> > bschubert2@imesrv6 libfuse.git>stg series
> > + mount_service-add-systemd
> > + mount_service-create-high
> > + mount_service-use-the-new
> > + mount_service-update-mtab
> >> util-hoist-the-fuse.conf
> > - util-fix-checkpatch-complaints
> > - mount_service-enable
> > - mount.fuse3-integrate-systemd
> > - mount_service-allow
> > - example-service_ll-create-a
> > - example-service-create-a
> > - nullfs-support-fuse-systemd
> > - meson-show-feature-summary
> > bschubert2@imesrv6 libfuse.git>.github/workflows/run-checkpatch.sh 
> > No typos will be found - file '/home/bschubert2/src/libfuse/libfuse.git/spelling.txt': No such file or directory
> > No structs that should be const will be found - file '/home/bschubert2/src/libfuse/libfuse.git/const_structs.checkpatch': No such file or directory
> > ERROR:GLOBAL_INITIALISERS: do not initialise globals to 0
> > #61: FILE: util/fuser_conf.c:33:
> > +int user_allow_other = 0;
> > 
> > WARNING:LINE_SPACING: Missing a blank line after declarations
> > #74: FILE: util/fuser_conf.c:46:
> > +	char *dest = buf;
> > +	while (1) {
> > 
> > ...
> > 
> > I don't have a strong opinion about these two above - feel 
> > free to disable them. However, in order to merge it, it would
> > be good to run without any checkpatch report.
> > And everything that cppcheck and gcc-checker reports, definitely 
> > need to be fixed.
> 
> Basically
> 
> cd <$FUSEDIR>
> BUILDDIR="build-without-examples"
> mkdir -p ${BUILDDIR}
> meson setup ${BUILDDIR} -Dexamples=false 
> ninja -C ${BUILDDIR}
> ./.github/workflows/codechecker.sh --gcc --codechecker --build-dir ${BUILDDIR}
> 
> gcc reports are starting here
> 
> bschubert2@imesrv6 libfuse.git>stg series
> + mount_service-add-systemd
> + mount_service-create-high
> + mount_service-use-the-new
> + mount_service-update-mtab
> + util-hoist-the-fuse.conf
> + util-fix-checkpatch-complaints
> + mount_service-enable
> > mount.fuse3-integrate-systemd
> 
> 
> bschubert2@imesrv6 libfuse.git>git show |head -n5
> commit f908bb1504eca167e156671dde957c2e7192b7d2
> Author: Darrick J. Wong <djwong@kernel.org>
> Date:   Wed Mar 4 13:48:55 2026 -0800
> 
>     mount.fuse3: integrate systemd service startup
> 
> 
> ---==== Severity Statistics ====----
> ----------------------------
> Severity | Number of reports
> ----------------------------
> MEDIUM   |                 1
> ----------------------------
> ----=================----
> 
> ----==== Checker Statistics ====----
> -----------------------------------------------------
> Checker name           | Severity | Number of reports
> -----------------------------------------------------
> gcc-deref-before-check | MEDIUM   |                 1

Oh, that's concerning.  Could you figure out exactly what it's
complaining about and send that to me, please?

--D

> -----------------------------------------------------
> ----=================----
> 
> ----==== File Statistics ====----
> --------------------------------
> File name    | Number of reports
> --------------------------------
> mount.fuse.c |                 1
> --------------------------------
> ----=================----
> 
> ----======== Summary ========----
> ----------------------------------------------
> Number of processed analyzer result files | 45
> Number of analyzer reports                | 1 
> ----------------------------------------------
> ----=================----
> 
> To view statistics in a browser run:
> > firefox /home/bschubert2/src/libfuse/libfuse.git/build-without-examples/codechecker-html/statistics.html
> 
> To view the results in a browser run:
> > firefox /home/bschubert2/src/libfuse/libfuse.git/build-without-examples/codechecker-html/index.html
> [INFO 2026-05-02 18:25] - ----==== Summary ====----
> [INFO 2026-05-02 18:25] - Up-to-date analysis results
> [INFO 2026-05-02 18:25] -   gcc: 37
> [INFO 2026-05-02 18:25] - Outdated analysis results
> [INFO 2026-05-02 18:25] - Failed to analyze
> [INFO 2026-05-02 18:25] - Missing analysis results
> [INFO 2026-05-02 18:25] -   clangsa: 37
> [INFO 2026-05-02 18:25] -   clang-tidy: 37
> [INFO 2026-05-02 18:25] -   cppcheck: 37
> [INFO 2026-05-02 18:25] -   infer: 37
> [INFO 2026-05-02 18:25] - Total analyzed compilation commands: 45
> [INFO 2026-05-02 18:25] - Total available compilation commands: 45
> [INFO 2026-05-02 18:25] - ----=================----
> bschubert2@imesrv6 libfuse.git>
> 
> 
> 
> 

^ permalink raw reply

* Re: [GIT PULL v5.1] libfuse: run fuse servers as a contained service
From: Bernd Schubert @ 2026-05-02 19:51 UTC (permalink / raw)
  To: Darrick J. Wong
  Cc: fuse-devel, joannelkoong, linux-ext4, linux-fsdevel, miklos, neal
In-Reply-To: <20260502190543.GG3778109@frogsfrogsfrogs>



On 5/2/26 21:05, Darrick J. Wong wrote:
> On Sat, May 02, 2026 at 06:26:16PM +0200, Bernd Schubert wrote:
>>
>>
>> On 5/2/26 17:59, Bernd Schubert wrote:
>>>
>>>
>>> On 5/1/26 00:49, Darrick J. Wong wrote:
>>>> On Thu, Apr 30, 2026 at 11:34:06PM +0200, Bernd Schubert wrote:
>>>>> Hi Darrick,
>>>>>
>>>>> On 4/30/26 23:18, Darrick J. Wong wrote:
>>>>>> Hi Bernd,
>>>>>>
>>>>>> Please pull this branch with changes for libfuse.
>>>>>>
>>>>>> As usual, I did a test-merge with the main upstream branch as of a few
>>>>>> minutes ago, and didn't see any conflicts.  Please let me know if you
>>>>>> encounter any problems.
>>>>>
>>>>> pushed to my github branch. BSD build fails with
>>>>>
>>>>> 2026-04-30T21:25:16.3874802Z FAILED: [code=1] lib/libfuse3.so.3.19.0 
>>>>> 2026-04-30T21:25:16.3906762Z cc  -o lib/libfuse3.so.3.19.0 lib/libfuse3.so.3.19.0.p/fuse.c.o lib/libfuse3.so.3.19.0.p/fuse_loop.c.o lib/libfuse3.so.3.19.0.p/fuse_loop_mt.c.o lib/libfuse3.so.3.19.0.p/fuse_lowlevel.c.o lib/libfuse3.so.3.19.0.p/fuse_opt.c.o lib/libfuse3.so.3.19.0.p/fuse_signals.c.o lib/libfuse3.so.3.19.0.p/buffer.c.o lib/libfuse3.so.3.19.0.p/cuse_lowlevel.c.o lib/libfuse3.so.3.19.0.p/helper.c.o lib/libfuse3.so.3.19.0.p/modules_subdir.c.o lib/libfuse3.so.3.19.0.p/mount_util.c.o lib/libfuse3.so.3.19.0.p/fuse_log.c.o lib/libfuse3.so.3.19.0.p/compat.c.o lib/libfuse3.so.3.19.0.p/util.c.o lib/libfuse3.so.3.19.0.p/mount_bsd.c.o lib/libfuse3.so.3.19.0.p/fuse_service_stub.c.o lib/libfuse3.so.3.19.0.p/modules_iconv.c.o -Wl,--as-needed -Wl,--no-undefined -shared -fPIC -Wl,-soname,libfuse3.so.4 -Wl,--version-script,/home/runner/work/libfuse/libfuse/lib/fuse_versionscript -pthread -Wl,--start-group -ldl -lrt -Wl,--end-group
>>>>> 2026-04-30T21:25:16.3939590Z ld: error: version script assignment of 'FUSE_3.19' to symbol 'fuse_service_can_allow_other' failed: symbol not defined
>>>>
>>>> Aha, that function got left out of the stub. :(
>>>>
>>>> Annoyingly, on Linux the build succeeds despite the missing symbol
>>>> when I tweak meson so that it doesn't build the service stuff.  I would
>>>> have thought that --no-undefined would have done that, but alas.
>>>>
>>>> Sorry about that too.  The following patch fixes it.
>>>>
>>>> diff --git i/lib/fuse_service_stub.c w/lib/fuse_service_stub.c
>>>> index d34df3891a6e31..231b98423df628 100644
>>>> --- i/lib/fuse_service_stub.c
>>>> +++ w/lib/fuse_service_stub.c
>>>> @@ -49,12 +49,17 @@ int fuse_service_send_goodbye(struct fuse_service *sf, int error)
>>>>  int fuse_service_accept(struct fuse_service **sfp)
>>>>  {
>>>>  	*sfp = NULL;
>>>>  	return 0;
>>>>  }
>>>>  
>>>> +bool fuse_service_can_allow_other(struct fuse_service *sf)
>>>> +{
>>>> +	return false;
>>>> +}
>>>> +
>>>>  int fuse_service_append_args(struct fuse_service *sf,
>>>>  			     struct fuse_args *existing_args)
>>>>  {
>>>>  	return -EOPNOTSUPP;
>>>>  }
>>>>  
>>>>
>>>>> 2026-04-30T21:25:16.3951874Z cc: error: linker command failed with exit code 1 (use -v to see invocation)
>>>>> 2026-04-30T21:25:16.4291582Z [44/82] cc -Itest/test_teardown_watchdog.p -Itest -I../test -Iinclude -I../include -Ilib -I../lib -I. -I.. -fdiagnostics-color=always -
>>>>>
>>>>>
>>>>> checkpatch, CodeChecker-cppcheck, CodeChecker-gcc also all fail. This CodeQL
>>>>
>>>> Not sure why checkpatch fails, this is what I got (Debian 13):
>>>>
>>>> $ git diff origin/master.. | ./checkpatch.pl --max-line-length=100 --no-tree --ignore MAINTAINERS,SPDX_LICENSE_TAG,COMMIT_MESSAGE,FILE_PATH_CHANGES,EMAIL_SUBJECT,AVOID_EXTERNS,GIT_COMMIT_ID,ENOSYS_SYSCALL,ENOSYS,FROM_SIGN_OFF_MISMATCH,QUOTED_COMMIT_ID,,PREFER_ATTRIBUTE_ALWAYS_UNUSED,PREFER_DEFINED_ATTRIBUTE_MACRO,STRCPY,STRNCPY -
>>>> No typos will be found - file '/storage/home/djwong/cdev/work/libfuse/spelling.txt': No such file or directory
>>>> No structs that should be const will be found - file '/storage/home/djwong/cdev/work/libfuse/const_structs.checkpatch': No such file or directory
>>>> total: 0 errors, 0 warnings, 3908 lines checked
>>>>
>>>> Your patch has no obvious style problems and is ready for submission.
>>>>
>>>> NOTE: Ignored message types: AVOID_EXTERNS COMMIT_MESSAGE EMAIL_SUBJECT ENOSYS ENOSYS_SYSCALL FILE_PATH_CHANGES FROM_SIGN_OFF_MISMATCH GIT_COMMIT_ID MAINTAINERS PREFER_ATTRIBUTE_ALWAYS_UNUSED PREFER_DEFINED_ATTRIBUTE_MACRO QUOTED_COMMIT_ID SPDX_LICENSE_TAG STRCPY STRNCPY
>>>>
>>>> cppcheck had a few things to say, but none of it was about the changed
>>>> lines.
>>>>
>>>>> report is funny
>>>>>
>>>>>> int mount_service_main(int argc, char *argv[])
>>>>>> Warning
>>>>>> Poorly documented large function
>>>>>> Poorly documented function: fewer than 2% comments for a function of 113 lines.
>>>>>> CodeQL
>>>>
>>>> Hrmm.  I guess I'll have to figure out how to get those things running.
>>>> That said, the stuff in mount_service.c is internal to libfuse (i.e.
>>>> it's not public library API) so I didn't comment them as intensely.
>>>> Would you like more?
>>>>
>>>>> I think I'm going to merge my sync fuse init series tomorrow.
>>>>
>>>> Yay!
>>>>
>>>>> Are you ok if skip posting another version of the series?
>>>>
>>>>                ^ is there an "I" here?  e.g. "...if I skip posting..."?
>>>>
>>>> /My/ normal practice (from xfs) was to repost the series as it was
>>>> merged, followed by an announcement.  That way the mailing list is a
>>>> complete record of what was merged.  However, very very few people
>>>> actually do that, even in the kernel.
>>>>
>>>> I'm ok with you not posting another version of the series.
>>>>
>>>>> Or do you prefer to review the recent changes and last piece I'm going
>>>>> to do tomorrow?
>>>>
>>>> Nah, just merge it.  I'll look over the changes once it's in the branch
>>>> and if there's anything weird, you or I or anyone else can send patches.
>>>> As long as you're not planning to tag it as a release, nothing's set in
>>>> stone.
>>>>
>>>>> Basically my goal is to rebase your series against it immediately and
>>>>> to merge your series during the next few days.
>>>>
>>>> <nod> Let me know what you want changed, I'll be around since I am not
>>>> travelling anywhere for a couple of weeks. :)
>>>>
>>>> I can reflow changes into the patchset, or if you'd prefer, I can add
>>>> them as new patches that would go on the end of the series.
>>>>
>>>
>>> Hi Darrick,
>>>
>>> eventually merged my patches and made a quick rebase and conflict 
>>> resolving with your branch. Github still reports plenty of issues ;)
>>>
>>> Could you fix all of the checkpatch isssues? This one shows plenty
>>> "util: hoist the fuse.conf parsing and setuid mode enforcement code"
>>>
>>> bschubert2@imesrv6 libfuse.git>stg series
>>> + mount_service-add-systemd
>>> + mount_service-create-high
>>> + mount_service-use-the-new
>>> + mount_service-update-mtab
>>>> util-hoist-the-fuse.conf
>>> - util-fix-checkpatch-complaints
>>> - mount_service-enable
>>> - mount.fuse3-integrate-systemd
>>> - mount_service-allow
>>> - example-service_ll-create-a
>>> - example-service-create-a
>>> - nullfs-support-fuse-systemd
>>> - meson-show-feature-summary
>>> bschubert2@imesrv6 libfuse.git>.github/workflows/run-checkpatch.sh 
>>> No typos will be found - file '/home/bschubert2/src/libfuse/libfuse.git/spelling.txt': No such file or directory
>>> No structs that should be const will be found - file '/home/bschubert2/src/libfuse/libfuse.git/const_structs.checkpatch': No such file or directory
>>> ERROR:GLOBAL_INITIALISERS: do not initialise globals to 0
>>> #61: FILE: util/fuser_conf.c:33:
>>> +int user_allow_other = 0;
>>>
>>> WARNING:LINE_SPACING: Missing a blank line after declarations
>>> #74: FILE: util/fuser_conf.c:46:
>>> +	char *dest = buf;
>>> +	while (1) {
>>>
>>> ...
>>>
>>> I don't have a strong opinion about these two above - feel 
>>> free to disable them. However, in order to merge it, it would
>>> be good to run without any checkpatch report.
>>> And everything that cppcheck and gcc-checker reports, definitely 
>>> need to be fixed.
>>
>> Basically
>>
>> cd <$FUSEDIR>
>> BUILDDIR="build-without-examples"
>> mkdir -p ${BUILDDIR}
>> meson setup ${BUILDDIR} -Dexamples=false 
>> ninja -C ${BUILDDIR}
>> ./.github/workflows/codechecker.sh --gcc --codechecker --build-dir ${BUILDDIR}
>>
>> gcc reports are starting here
>>
>> bschubert2@imesrv6 libfuse.git>stg series
>> + mount_service-add-systemd
>> + mount_service-create-high
>> + mount_service-use-the-new
>> + mount_service-update-mtab
>> + util-hoist-the-fuse.conf
>> + util-fix-checkpatch-complaints
>> + mount_service-enable
>>> mount.fuse3-integrate-systemd
>>
>>
>> bschubert2@imesrv6 libfuse.git>git show |head -n5
>> commit f908bb1504eca167e156671dde957c2e7192b7d2
>> Author: Darrick J. Wong <djwong@kernel.org>
>> Date:   Wed Mar 4 13:48:55 2026 -0800
>>
>>     mount.fuse3: integrate systemd service startup
>>
>>
>> ---==== Severity Statistics ====----
>> ----------------------------
>> Severity | Number of reports
>> ----------------------------
>> MEDIUM   |                 1
>> ----------------------------
>> ----=================----
>>
>> ----==== Checker Statistics ====----
>> -----------------------------------------------------
>> Checker name           | Severity | Number of reports
>> -----------------------------------------------------
>> gcc-deref-before-check | MEDIUM   |                 1
> 
> Oh, that's concerning.  Could you figure out exactly what it's
> complaining about and send that to me, please?

I'm afraid I don't manage anymore today. Still a couple of
other things to do (like changing laptop keyboard and packing
a few things, preparing bread for the oven).

It is really easy to run this yourself

cd <$FUSEDIR>
BUILDDIR="build-without-examples"
mkdir -p ${BUILDDIR}
meson setup ${BUILDDIR} -Dexamples=false 
ninja -C ${BUILDDIR}
./.github/workflows/codechecker.sh --gcc --codechecker --build-dir ${BUILDDIR}

There is --gcc and --cppcheck





^ permalink raw reply

* Re: [RFC] ext4: possible inconsistency in ext4_append() error path
From: Jan Kara @ 2026-05-03 17:23 UTC (permalink / raw)
  To: Vineet Agarwal
  Cc: tytso, linux-ext4, adilger.kernel, libaokun, jack, ojaswin,
	ritesh.list, yi.zhang, linux-kernel
In-Reply-To: <20260501172506.563064-1-agarwal.vineet2006@gmail.com>

Hi!

On Fri 01-05-26 22:55:06, Vineet Agarwal wrote:
> While looking into ext4 directory operations, I noticed a possible
> inconsistency in the error handling of ext4_append().
> 
> In ext4_append(), the inode size is updated before all failure points
> have been ruled out:
> 
>     bh = ext4_bread(handle, inode, *block, EXT4_GET_BLOCKS_CREATE);
>     if (IS_ERR(bh))
>         return bh;
> 
>     inode->i_size += inode->i_sb->s_blocksize;
>     EXT4_I(inode)->i_disksize = inode->i_size;
> 
>     err = ext4_mark_inode_dirty(handle, inode);
>     if (err)
>         goto out;
> 
>     err = ext4_journal_get_write_access(handle, inode->i_sb, bh,
>                                         EXT4_JTR_NONE);
>     if (err)
>         goto out;
> 
> If either ext4_mark_inode_dirty() or
> ext4_journal_get_write_access() fails, the function returns an
> error but does not restore the original inode size.
> 
> Callers of ext4_append() appear to treat it as an all-or-nothing
> operation:
> 
>     bh = ext4_append(handle, dir, &block);
>     if (IS_ERR(bh))
>         goto out;
> 
> However, in the failure case, inode->i_size may already have been
> increased.

Right.

> One possible consequence is that subsequent checks relying on i_size,
> such as:
> 
>     if (block >= inode->i_size >> inode->i_blkbits)
> 
> may allow a block index to pass bounds checks even though the append
> operation did not complete successfully.
> 
> I understand that journaling may ensure on-disk consistency, but the
> in-memory inode state may still temporarily reflect a change that did
> not logically succeed.
> 
> Is this behavior intentional, or should ext4_append() avoid updating
> i_size until after all failure points, or roll it back on error?

The thing is: If any of the above calls you mention fail, the filesystem
journal is aborted and the filesystem doesn't accept any more
modifications. So we are kind of sloppy with error recovery since it cannot
reach on-disk state. I'm not aware where the increased inode size on
failing ext4_append() would cause issues (besides further error complaints)
but if you find some such, yes, we can improve the error recovery path.

								Honza

-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

^ permalink raw reply

* Re: [GIT PULL v5.1] libfuse: run fuse servers as a contained service
From: Bernd Schubert @ 2026-05-04 15:41 UTC (permalink / raw)
  To: Darrick J. Wong
  Cc: fuse-devel, joannelkoong, linux-ext4, linux-fsdevel, miklos, neal
In-Reply-To: <757367d0-3a8b-4de8-aa86-f74f316b3445@bsbernd.com>

[-- Attachment #1: Type: text/plain, Size: 369 bytes --]



On 5/2/26 21:51, Bernd Schubert wrote:
> 
>> Oh, that's concerning.  Could you figure out exactly what it's
>> complaining about and send that to me, please?
> 
Hi Darrick,

just pushed a new branch version that should avoid all chekpatch
warnings (squash of yours and fix of one I had introduced).


Please find attached all the CodeChecker warnings.


Thanks,
Bernd

[-- Attachment #2: codechecker.tar.gz --]
[-- Type: application/gzip, Size: 379241 bytes --]

^ permalink raw reply

* Re: [GIT PULL v5.1] libfuse: run fuse servers as a contained service
From: Darrick J. Wong @ 2026-05-04 17:43 UTC (permalink / raw)
  To: Bernd Schubert
  Cc: fuse-devel, joannelkoong, linux-ext4, linux-fsdevel, miklos, neal
In-Reply-To: <14222a33-62a3-4c8f-b86f-7c5ee47c9db7@bsbernd.com>

On Mon, May 04, 2026 at 05:41:38PM +0200, Bernd Schubert wrote:
> 
> 
> On 5/2/26 21:51, Bernd Schubert wrote:
> > 
> >> Oh, that's concerning.  Could you figure out exactly what it's
> >> complaining about and send that to me, please?
> > 
> Hi Darrick,
> 
> just pushed a new branch version that should avoid all chekpatch
> warnings (squash of yours and fix of one I had introduced).

Ok, thanks.  I'll have a look, thanks.

> Please find attached all the CodeChecker warnings.

<nod> I'll try to eliminate as many of these as possible.  I think the
complaints about "can be declared as pointer to const struct" are easily
amended.

The ones involving char **argv might be a little trickier though.
Anyway, I'll try to have something ready to send out before morning in
Europe, assuming that either you're at LSFMM or at least in a similar
timezone.

Also thanks for sending the tarball, it's useful (a) to know which
cppcheck complaints you want fixed, and (b) to compare against the
version on my system (Debian 13).

--D

^ permalink raw reply

* [syzbot] [ocfs2?] [ext4?] general protection fault in jbd2_journal_dirty_metadata (2)
From: syzbot @ 2026-05-04 22:27 UTC (permalink / raw)
  To: jack, jlbec, joseph.qi, linux-ext4, linux-kernel, mark,
	ocfs2-devel, syzkaller-bugs, tytso

Hello,

syzbot found the following issue on:

HEAD commit:    08d0d3466664 Merge tag 'net-7.1-rc2' of git://git.kernel.o..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=152f81ce580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=4caf64b1ee83dac0
dashboard link: https://syzkaller.appspot.com/bug?extid=98f651460e558a21baae
compiler:       Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=1415f2d2580000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=132f81ce580000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/c5abd4fcc5ba/disk-08d0d346.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/896c46fd9ce9/vmlinux-08d0d346.xz
kernel image: https://storage.googleapis.com/syzbot-assets/04a44a684bb3/bzImage-08d0d346.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/b6c8c7ca94d0/mount_0.gz
  fsck result: OK (log: https://syzkaller.appspot.com/x/fsck.log?x=14e8a082580000)

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+98f651460e558a21baae@syzkaller.appspotmail.com

(syz.2.23,6028,0):__ocfs2_remove_xattr_range:786 ERROR: status = -30
(syz.2.23,6028,0):ocfs2_xattr_shrink_size:840 ERROR: status = -30
(syz.2.23,6028,0):__ocfs2_journal_access:724 ERROR: Error -30 getting 1 access to buffer!
(syz.2.23,6028,0):ocfs2_xa_prepare_entry:2182 ERROR: status = -30
(syz.2.23,6028,0):ocfs2_xa_set:2285 ERROR: status = -30
Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] SMP KASAN NOPTI
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 0 UID: 0 PID: 6028 Comm: syz.2.23 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/18/2026
RIP: 0010:jbd2_journal_dirty_metadata+0x4a/0xd30 fs/jbd2/transaction.c:1520
Code: 00 fc ff df e8 07 27 29 ff 4c 89 fd 48 c1 ed 03 42 80 7c 35 00 00 74 08 4c 89 ff e8 f0 61 94 ff 49 8b 1f 48 89 d8 48 c1 e8 03 <42> 80 3c 30 00 74 08 48 89 df e8 d7 61 94 ff 48 89 1c 24 4c 8b 2b
RSP: 0018:ffffc90003766bc0 EFLAGS: 00010256
RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffff888035c3dc40
RDX: 0000000000000000 RSI: ffff88805927b9f8 RDI: ffff888034ddbf20
RBP: 1ffff110069bb7e4 R08: ffffffff9030a1f7 R09: 1ffffffff206143e
R10: dffffc0000000000 R11: fffffbfff206143f R12: dffffc0000000000
R13: 1ffff920006ecd94 R14: dffffc0000000000 R15: ffff888034ddbf20
FS:  000055556c64d500(0000) GS:ffff888125290000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f8ff9c72700 CR3: 000000007908f000 CR4: 0000000000350ef0
Call Trace:
 <TASK>
 ocfs2_journal_dirty+0x130/0x700 fs/ocfs2/journal.c:831
 ocfs2_xa_journal_dirty fs/ocfs2/xattr.c:1483 [inline]
 ocfs2_xa_set+0x15e3/0x2ec0 fs/ocfs2/xattr.c:2294
 ocfs2_xattr_block_set+0x3e0/0x33c0 fs/ocfs2/xattr.c:3016
 __ocfs2_xattr_set_handle+0x6b3/0xf50 fs/ocfs2/xattr.c:3418
 ocfs2_xattr_set+0xf3f/0x13e0 fs/ocfs2/xattr.c:3681
 __vfs_setxattr+0x43c/0x480 fs/xattr.c:218
 __vfs_setxattr_noperm+0x12d/0x660 fs/xattr.c:252
 vfs_setxattr+0x163/0x360 fs/xattr.c:339
 do_setxattr fs/xattr.c:654 [inline]
 filename_setxattr+0x296/0x630 fs/xattr.c:682
 path_setxattrat+0x3eb/0x440 fs/xattr.c:726
 __do_sys_setxattr fs/xattr.c:760 [inline]
 __se_sys_setxattr fs/xattr.c:756 [inline]
 __x64_sys_setxattr+0xbc/0xe0 fs/xattr.c:756
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x15f/0xf80 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f8ff9d9cdd9
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffd9c92e118 EFLAGS: 00000246 ORIG_RAX: 00000000000000bc
RAX: ffffffffffffffda RBX: 00007f8ffa015fa0 RCX: 00007f8ff9d9cdd9
RDX: 0000000000000000 RSI: 0000200000000140 RDI: 0000200000000080
RBP: 00007f8ff9e32d69 R08: 0000000000000002 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f8ffa015fac R14: 00007f8ffa015fa0 R15: 00007f8ffa015fa0
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:jbd2_journal_dirty_metadata+0x4a/0xd30 fs/jbd2/transaction.c:1520
Code: 00 fc ff df e8 07 27 29 ff 4c 89 fd 48 c1 ed 03 42 80 7c 35 00 00 74 08 4c 89 ff e8 f0 61 94 ff 49 8b 1f 48 89 d8 48 c1 e8 03 <42> 80 3c 30 00 74 08 48 89 df e8 d7 61 94 ff 48 89 1c 24 4c 8b 2b
RSP: 0018:ffffc90003766bc0 EFLAGS: 00010256
RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffff888035c3dc40
RDX: 0000000000000000 RSI: ffff88805927b9f8 RDI: ffff888034ddbf20
RBP: 1ffff110069bb7e4 R08: ffffffff9030a1f7 R09: 1ffffffff206143e
R10: dffffc0000000000 R11: fffffbfff206143f R12: dffffc0000000000
R13: 1ffff920006ecd94 R14: dffffc0000000000 R15: ffff888034ddbf20
FS:  000055556c64d500(0000) GS:ffff888125290000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000557909eb6950 CR3: 000000007908f000 CR4: 0000000000350ef0
----------------
Code disassembly (best guess), 4 bytes skipped:
   0:	e8 07 27 29 ff       	call   0xff29270c
   5:	4c 89 fd             	mov    %r15,%rbp
   8:	48 c1 ed 03          	shr    $0x3,%rbp
   c:	42 80 7c 35 00 00    	cmpb   $0x0,0x0(%rbp,%r14,1)
  12:	74 08                	je     0x1c
  14:	4c 89 ff             	mov    %r15,%rdi
  17:	e8 f0 61 94 ff       	call   0xff94620c
  1c:	49 8b 1f             	mov    (%r15),%rbx
  1f:	48 89 d8             	mov    %rbx,%rax
  22:	48 c1 e8 03          	shr    $0x3,%rax
* 26:	42 80 3c 30 00       	cmpb   $0x0,(%rax,%r14,1) <-- trapping instruction
  2b:	74 08                	je     0x35
  2d:	48 89 df             	mov    %rbx,%rdi
  30:	e8 d7 61 94 ff       	call   0xff94620c
  35:	48 89 1c 24          	mov    %rbx,(%rsp)
  39:	4c 8b 2b             	mov    (%rbx),%r13


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

^ permalink raw reply

* [PATCH 3/7] libsupport: don't use bzero in cache.c
From: Theodore Ts'o @ 2026-05-04 23:32 UTC (permalink / raw)
  To: Ext4 Developers List; +Cc: Darrick J. Wong, Theodore Ts'o
In-Reply-To: <20260504233301.2345652-1-tytso@mit.edu>

The bzero() function is deprecated and not available in some
platforms.  It's not needed in any case because we can just use an
automatic initializer.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Fixes: 30b3c80ed6bc ("libsupport: add a cache")
---
 lib/support/cache.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/lib/support/cache.c b/lib/support/cache.c
index f9669e3fc..aec785347 100644
--- a/lib/support/cache.c
+++ b/lib/support/cache.c
@@ -850,7 +850,7 @@ cache_report(
 {
 	int		i;
 	unsigned long	count, index, total;
-	unsigned long	hash_bucket_lengths[HASH_REPORT + 2];
+	unsigned long	hash_bucket_lengths[HASH_REPORT + 2] = { 0 };
 
 	if ((cache->c_hits + cache->c_misses) == 0)
 		return;
@@ -886,8 +886,6 @@ cache_report(
 		cache->c_mrus[i].cm_count * 100 / cache->c_count);
 
 	/* report hash bucket lengths */
-	bzero(hash_bucket_lengths, sizeof(hash_bucket_lengths));
-
 	for (i = 0; i < cache->c_hashsize; i++) {
 		count = cache->c_hash[i].ch_count;
 		if (count > HASH_REPORT)
-- 
2.53.0


^ permalink raw reply related

* [PATCH 4/7] fuse[24]fs: suppress clang warnings which were breaking the github CI
From: Theodore Ts'o @ 2026-05-04 23:32 UTC (permalink / raw)
  To: Ext4 Developers List; +Cc: Darrick J. Wong, Theodore Ts'o
In-Reply-To: <20260504233301.2345652-1-tytso@mit.edu>

fuse[24]fs.c defines some functions which might or might not be used
depending on the version of the fuse library installed on the system.
Unfortunately while gcc won't complain if there are static inline
functions which are not used, clang will only suppress such complaints
if the static inline functions are in a header file.

Since the github CI runs a test build with -Wall -Werror this was
breaking the CI build.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
 fuse4fs/fuse4fs.c | 21 +++++++++++++++++++++
 misc/fuse2fs.c    | 21 +++++++++++++++++++++
 2 files changed, 42 insertions(+)

diff --git a/fuse4fs/fuse4fs.c b/fuse4fs/fuse4fs.c
index 13e1aae4b..b883083f8 100644
--- a/fuse4fs/fuse4fs.c
+++ b/fuse4fs/fuse4fs.c
@@ -502,6 +502,27 @@ static inline off_t FUSE4FS_FSB_TO_B(const struct fuse4fs *ff, blk64_t bno)
 	return bno << ff->blocklog;
 }
 
+#ifdef __clang__
+#define SUPPRESS_UNUSED_FUNCTION(func)    (void)func
+/*
+ * These functions might or might not be used depending on the version
+ * of the fuse library installed on the system.  Unfortunately while
+ * gcc won't complain if there are static inline functions which are
+ * not used, clang will only suppress such complaints if the static
+ * inline functions are in a header file.
+ */
+void fuse2fs_shut_up_stupid_clang_warnings(void)
+{
+	SUPPRESS_UNUSED_FUNCTION(fuse2fs_shut_up_stupid_clang_warnings);
+	SUPPRESS_UNUSED_FUNCTION(round_up);
+	SUPPRESS_UNUSED_FUNCTION(round_down);
+	SUPPRESS_UNUSED_FUNCTION(FUSE4FS_B_TO_FSBT);
+	SUPPRESS_UNUSED_FUNCTION(FUSE4FS_OFF_IN_FSB);
+	SUPPRESS_UNUSED_FUNCTION(FUSE4FS_B_TO_FSB);
+	SUPPRESS_UNUSED_FUNCTION(FUSE4FS_FSB_TO_B);
+}
+#endif
+
 static double gettime_monotonic(void)
 {
 #ifdef CLOCK_MONOTONIC
diff --git a/misc/fuse2fs.c b/misc/fuse2fs.c
index 0f4781bc4..c46cfc236 100644
--- a/misc/fuse2fs.c
+++ b/misc/fuse2fs.c
@@ -339,6 +339,27 @@ static inline off_t FUSE2FS_FSB_TO_B(const struct fuse2fs *ff, blk64_t bno)
 	return bno << ff->blocklog;
 }
 
+#ifdef __clang__
+#define SUPPRESS_UNUSED_FUNCTION(func)    (void)func
+/*
+ * These functions might or might not be used depending on the version
+ * of the fuse library installed on the system.  Unfortunately while
+ * gcc won't complain if there are static inline functions which are
+ * not used, clang will only suppress such complaints if the static
+ * inline functions are in a header file.
+ */
+void fuse2fs_shut_up_stupid_clang_warnings(void)
+{
+	SUPPRESS_UNUSED_FUNCTION(fuse2fs_shut_up_stupid_clang_warnings);
+	SUPPRESS_UNUSED_FUNCTION(round_up);
+	SUPPRESS_UNUSED_FUNCTION(round_down);
+	SUPPRESS_UNUSED_FUNCTION(FUSE2FS_B_TO_FSBT);
+	SUPPRESS_UNUSED_FUNCTION(FUSE2FS_OFF_IN_FSB);
+	SUPPRESS_UNUSED_FUNCTION(FUSE2FS_B_TO_FSB);
+	SUPPRESS_UNUSED_FUNCTION(FUSE2FS_FSB_TO_B);
+}
+#endif
+
 static double gettime_monotonic(void)
 {
 #ifdef CLOCK_MONOTONIC
-- 
2.53.0


^ permalink raw reply related

* [PATCH 1/7] libsupport: drop xbitops.h and define fls() if necessary
From: Theodore Ts'o @ 2026-05-04 23:32 UTC (permalink / raw)
  To: Ext4 Developers List; +Cc: Darrick J. Wong, Theodore Ts'o
In-Reply-To: <20260504233301.2345652-1-tytso@mit.edu>

The new cache.c file doesn't actually need most of the functions in
xbitops.h.  It only needs fls(), and on some systems, like MacOS and
*BSD systems, fls() is defined already.  The other functions in
xbitops.h are massively non-portable and break on non-Linux systems,
especially MacOS.

So define fls() if it's needed (on Linux), and drop xbitops.h.

Fixes: 30b3c80ed6bc ("libsupport: add a cache")
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
 configure               |   6 ++
 configure.ac            |   1 +
 fuse4fs/Makefile.in     |  18 +++---
 lib/config.h.in         |   3 +
 lib/support/Makefile.in |   2 +-
 lib/support/cache.c     |  33 ++++++++++-
 lib/support/xbitops.h   | 128 ----------------------------------------
 7 files changed, 51 insertions(+), 140 deletions(-)
 delete mode 100644 lib/support/xbitops.h

diff --git a/configure b/configure
index a97794121..a1a270e63 100755
--- a/configure
+++ b/configure
@@ -13677,6 +13677,12 @@ if test "x$ac_cv_func_fdatasync" = xyes
 then :
   printf "%s\n" "#define HAVE_FDATASYNC 1" >>confdefs.h
 
+fi
+ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls"
+if test "x$ac_cv_func_fls" = xyes
+then :
+  printf "%s\n" "#define HAVE_FLS 1" >>confdefs.h
+
 fi
 ac_fn_c_check_func "$LINENO" "fstat64" "ac_cv_func_fstat64"
 if test "x$ac_cv_func_fstat64" = xyes
diff --git a/configure.ac b/configure.ac
index b62553e3d..abce79594 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1233,6 +1233,7 @@ AC_CHECK_FUNCS(m4_flatten([
 	fchown
 	fcntl
 	fdatasync
+	fls
 	fstat64
 	fsync
 	ftruncate64
diff --git a/fuse4fs/Makefile.in b/fuse4fs/Makefile.in
index 9f3547c27..cecee2b25 100644
--- a/fuse4fs/Makefile.in
+++ b/fuse4fs/Makefile.in
@@ -134,7 +134,7 @@ distclean: clean
 	$(RM) -f .depend Makefile $(srcdir)/TAGS $(srcdir)/Makefile.in.old
 
 # +++ Dependency line eater +++
-#
+# 
 # Makefile dependencies follow.  This must be the last section in
 # the Makefile.in file
 #
@@ -145,9 +145,10 @@ fuse4fs.o: $(srcdir)/fuse4fs.c $(top_builddir)/lib/config.h \
  $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
  $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
  $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/ext2fs/ext2fsP.h \
- $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/version.h \
- $(top_srcdir)/lib/e2p/e2p.h $(top_srcdir)/lib/support/cache.h \
- $(top_srcdir)/lib/support/list.h $(top_srcdir)/lib/support/xbitops.h
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/support/bthread.h \
+ $(top_srcdir)/lib/support/thread.h $(top_srcdir)/lib/support/list.h \
+ $(top_srcdir)/lib/support/cache.h $(top_srcdir)/version.h \
+ $(top_srcdir)/lib/e2p/e2p.h
 journal.o: $(srcdir)/../debugfs/journal.c $(top_builddir)/lib/config.h \
  $(top_builddir)/lib/dirpaths.h $(srcdir)/../debugfs/journal.h \
  $(top_srcdir)/e2fsck/jfs_user.h $(top_srcdir)/e2fsck/e2fsck.h \
@@ -161,8 +162,7 @@ journal.o: $(srcdir)/../debugfs/journal.c $(top_builddir)/lib/config.h \
  $(top_srcdir)/lib/support/dqblk_v2.h \
  $(top_srcdir)/lib/support/quotaio_tree.h \
  $(top_srcdir)/lib/ext2fs/fast_commit.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
- $(top_srcdir)/lib/support/list.h $(top_srcdir)/lib/ext2fs/compiler.h \
- $(top_srcdir)/lib/ext2fs/kernel-jbd.h
+ $(top_srcdir)/lib/support/list.h $(top_srcdir)/lib/ext2fs/kernel-jbd.h
 revoke.o: $(srcdir)/../e2fsck/revoke.c $(srcdir)/../e2fsck/jfs_user.h \
  $(top_builddir)/lib/config.h $(top_builddir)/lib/dirpaths.h \
  $(srcdir)/../e2fsck/e2fsck.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
@@ -175,8 +175,7 @@ revoke.o: $(srcdir)/../e2fsck/revoke.c $(srcdir)/../e2fsck/jfs_user.h \
  $(top_srcdir)/lib/support/dqblk_v2.h \
  $(top_srcdir)/lib/support/quotaio_tree.h \
  $(top_srcdir)/lib/ext2fs/fast_commit.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
- $(top_srcdir)/lib/support/list.h $(top_srcdir)/lib/ext2fs/compiler.h \
- $(top_srcdir)/lib/ext2fs/kernel-jbd.h
+ $(top_srcdir)/lib/support/list.h $(top_srcdir)/lib/ext2fs/kernel-jbd.h
 recovery.o: $(srcdir)/../e2fsck/recovery.c $(srcdir)/../e2fsck/jfs_user.h \
  $(top_builddir)/lib/config.h $(top_builddir)/lib/dirpaths.h \
  $(srcdir)/../e2fsck/e2fsck.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
@@ -189,5 +188,4 @@ recovery.o: $(srcdir)/../e2fsck/recovery.c $(srcdir)/../e2fsck/jfs_user.h \
  $(top_srcdir)/lib/support/dqblk_v2.h \
  $(top_srcdir)/lib/support/quotaio_tree.h \
  $(top_srcdir)/lib/ext2fs/fast_commit.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
- $(top_srcdir)/lib/support/list.h $(top_srcdir)/lib/ext2fs/compiler.h \
- $(top_srcdir)/lib/ext2fs/kernel-jbd.h
+ $(top_srcdir)/lib/support/list.h $(top_srcdir)/lib/ext2fs/kernel-jbd.h
diff --git a/lib/config.h.in b/lib/config.h.in
index fd2520396..abba5e2c6 100644
--- a/lib/config.h.in
+++ b/lib/config.h.in
@@ -124,6 +124,9 @@
 /* Define to 1 if you have the 'fdatasync' function. */
 #undef HAVE_FDATASYNC
 
+/* Define to 1 if you have the 'fls' function. */
+#undef HAVE_FLS
+
 /* Define to 1 if fsmap_sizeof() is declared in linux/fsmap.h */
 #undef HAVE_FSMAP_SIZEOF
 
diff --git a/lib/support/Makefile.in b/lib/support/Makefile.in
index 6ff1c81d0..d20d6a984 100644
--- a/lib/support/Makefile.in
+++ b/lib/support/Makefile.in
@@ -199,4 +199,4 @@ dict.o: $(srcdir)/dict.c $(top_builddir)/lib/config.h \
 devname.o: $(srcdir)/devname.c $(top_builddir)/lib/config.h \
  $(top_builddir)/lib/dirpaths.h $(srcdir)/devname.h $(srcdir)/nls-enable.h
 cache.o: $(srcdir)/cache.c $(top_builddir)/lib/config.h \
- $(srcdir)/cache.h $(srcdir)/list.h $(srcdir)/xbitops.h
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/list.h $(srcdir)/cache.h
diff --git a/lib/support/cache.c b/lib/support/cache.c
index 3a9e276f1..f9669e3fc 100644
--- a/lib/support/cache.c
+++ b/lib/support/cache.c
@@ -7,6 +7,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <strings.h>
 #include <unistd.h>
 #include <pthread.h>
 #include <stdbool.h>
@@ -14,9 +15,9 @@
 #include <stdint.h>
 #include <errno.h>
 
+#include "config.h"
 #include "list.h"
 #include "cache.h"
-#include "xbitops.h"
 
 #undef CACHE_DEBUG
 /* #define CACHE_DEBUG 1 */
@@ -32,6 +33,36 @@
 # define ASSERT(x)		do { } while (0)
 #endif
 
+#ifndef HAVE_FLS
+static inline int fls(int x)
+{
+	int r = 32;
+
+	if (!x)
+		return 0;
+	if (!(x & 0xffff0000u)) {
+		x = (x & 0xffffu) << 16;
+		r -= 16;
+	}
+	if (!(x & 0xff000000u)) {
+		x = (x & 0xffffffu) << 8;
+		r -= 8;
+	}
+	if (!(x & 0xf0000000u)) {
+		x = (x & 0xfffffffu) << 4;
+		r -= 4;
+	}
+	if (!(x & 0xc0000000u)) {
+		x = (x & 0x3fffffffu) << 2;
+		r -= 2;
+	}
+	if (!(x & 0x80000000u)) {
+		r -= 1;
+	}
+	return r;
+}
+#endif
+
 static unsigned int cache_generic_bulkrelse(struct cache *, struct list_head *);
 
 int
diff --git a/lib/support/xbitops.h b/lib/support/xbitops.h
deleted file mode 100644
index 78a8f2a85..000000000
--- a/lib/support/xbitops.h
+++ /dev/null
@@ -1,128 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-#ifndef __BITOPS_H__
-#define __BITOPS_H__
-
-/*
- * fls: find last bit set.
- */
-
-static inline int fls(int x)
-{
-	int r = 32;
-
-	if (!x)
-		return 0;
-	if (!(x & 0xffff0000u)) {
-		x = (x & 0xffffu) << 16;
-		r -= 16;
-	}
-	if (!(x & 0xff000000u)) {
-		x = (x & 0xffffffu) << 8;
-		r -= 8;
-	}
-	if (!(x & 0xf0000000u)) {
-		x = (x & 0xfffffffu) << 4;
-		r -= 4;
-	}
-	if (!(x & 0xc0000000u)) {
-		x = (x & 0x3fffffffu) << 2;
-		r -= 2;
-	}
-	if (!(x & 0x80000000u)) {
-		r -= 1;
-	}
-	return r;
-}
-
-static inline int fls64(uint64_t x)
-{
-	uint32_t h = x >> 32;
-	if (h)
-		return fls(h) + 32;
-	return fls(x);
-}
-
-static inline unsigned fls_long(unsigned long l)
-{
-        if (sizeof(l) == 4)
-                return fls(l);
-        return fls64(l);
-}
-
-/*
- * ffz: find first zero bit.
- * Result is undefined if no zero bit exists.
- */
-#define ffz(x)	ffs(~(x))
-
-/*
- * XFS bit manipulation routines.  Repeated here so that some programs
- * don't have to link in all of libxfs just to have bit manipulation.
- */
-
-/*
- * masks with n high/low bits set, 64-bit values
- */
-static inline uint64_t mask64hi(int n)
-{
-	return (uint64_t)-1 << (64 - (n));
-}
-static inline uint32_t mask32lo(int n)
-{
-	return ((uint32_t)1 << (n)) - 1;
-}
-static inline uint64_t mask64lo(int n)
-{
-	return ((uint64_t)1 << (n)) - 1;
-}
-
-/* Get high bit set out of 32-bit argument, -1 if none set */
-static inline int highbit32(uint32_t v)
-{
-	return fls(v) - 1;
-}
-
-/* Get high bit set out of 64-bit argument, -1 if none set */
-static inline int highbit64(uint64_t v)
-{
-	return fls64(v) - 1;
-}
-
-/* Get low bit set out of 32-bit argument, -1 if none set */
-static inline int lowbit32(uint32_t v)
-{
-	return ffs(v) - 1;
-}
-
-/* Get low bit set out of 64-bit argument, -1 if none set */
-static inline int lowbit64(uint64_t v)
-{
-	uint32_t	w = (uint32_t)v;
-	int		n = 0;
-
-	if (w) {	/* lower bits */
-		n = ffs(w);
-	} else {	/* upper bits */
-		w = (uint32_t)(v >> 32);
-		if (w) {
-			n = ffs(w);
-			if (n)
-				n += 32;
-		}
-	}
-	return n - 1;
-}
-
-/**
- * __rounddown_pow_of_two() - round down to nearest power of two
- * @n: value to round down
- */
-static inline __attribute__((const))
-unsigned long __rounddown_pow_of_two(unsigned long n)
-{
-	return 1UL << (fls_long(n) - 1);
-}
-
-#define rounddown_pow_of_two(n) __rounddown_pow_of_two(n)
-
-#endif
-- 
2.53.0


^ permalink raw reply related

* [PATCH 2/7] configure.ac: fix disable fuse2fs/fuse4fs by default path
From: Theodore Ts'o @ 2026-05-04 23:32 UTC (permalink / raw)
  To: Ext4 Developers List; +Cc: Darrick J. Wong, Theodore Ts'o
In-Reply-To: <20260504233301.2345652-1-tytso@mit.edu>

If the fuse.h header file is not present, fix the "Disabling
fuse[24]fs by default" codepath to actually disable trying to build
fuse2fs or fuse4fs.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Fixes: 239f4b7ac05b ("fuse2fs: separate libfuse3 and fuse2fs detection in configure")
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
 configure    | 2 ++
 configure.ac | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/configure b/configure
index a1a270e63..d941ff1f1 100755
--- a/configure
+++ b/configure
@@ -14737,6 +14737,7 @@ else case e in #(
 		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Enabling fuse2fs by default" >&5
 printf "%s\n" "Enabling fuse2fs by default" >&6; }
 	else
+		FUSE2FS_CMT="#"
 		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Disabling fuse2fs by default" >&5
 printf "%s\n" "Disabling fuse2fs by default" >&6; }
 	fi
@@ -14804,6 +14805,7 @@ else case e in #(
 		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Enabling fuse4fs by default" >&5
 printf "%s\n" "Enabling fuse4fs by default" >&6; }
 	else
+		FUSE4FS_CMT="#"
 		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Disabling fuse4fs by default" >&5
 printf "%s\n" "Disabling fuse4fs by default" >&6; }
 	fi
diff --git a/configure.ac b/configure.ac
index abce79594..d8f40f5df 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1459,6 +1459,7 @@ AS_HELP_STRING([--disable-fuse2fs],[do not build fuse2fs]),
 	then
 		AC_MSG_RESULT([Enabling fuse2fs by default])
 	else
+		FUSE2FS_CMT="#"
 		AC_MSG_RESULT([Disabling fuse2fs by default])
 	fi
 ]
@@ -1496,6 +1497,7 @@ AS_HELP_STRING([--disable-fuse4fs],[do not build fuse4fs]),
 	then
 		AC_MSG_RESULT([Enabling fuse4fs by default])
 	else
+		FUSE4FS_CMT="#"
 		AC_MSG_RESULT([Disabling fuse4fs by default])
 	fi
 ]
-- 
2.53.0


^ permalink raw reply related

* [PATCH 0/7] fix up issues from djwong/fuse4fs-fork
From: Theodore Ts'o @ 2026-05-04 23:32 UTC (permalink / raw)
  To: Ext4 Developers List; +Cc: Darrick J. Wong, Theodore Ts'o

These are the patches that I've applied to the next branch to clean up
found when trying to compile e2fsprogs on MacOS and via the github's
continuous integration testing.

Note: See .github/workflows/ci.yaml; it's a good reason to get a
github account if you are doing a lot of e2fsprogs development.
If you fork my e2fsprogs repository and push your changes to your github
repo, you can get reports like the ones found here:
      https://github.com/tytso/e2fsprogs/actions


Anyway, with these patches, e2fsprogs builds on MacOS (both using the
github CI and on locally on my Macbook).  Unfortunately fuse2fs has
regressed in that non-root accesses are getting denied with a permission
denied on MacOS, and this worked with e2fsprogs v1.47.4.  Here's a
lightly edited transcript from my Macbook Air:

% uname -a
Darwin macsyma.local 25.4.0 Darwin Kernel Version 25.4.0: Thu Mar 19 19:33:09 PDT 2026; root:xnu-12377.101.15~1/RELEASE_ARM64_T8112 arm64 arm Darwin
% ./mke2fs -Fq -t ext4 -d . /tmp/foo.img  1G
% ./fuse2fs -o allow_other /tmp/foo.img /Users/tytso/mnt
FUSE2FS (foo.img): Warning: fuse2fs does not support using the journal.
There may be file system corruption or data loss if
the file system is not gracefully unmounted.
% stat /Users/tytso/mnt/revoke.o
stat: cannot stat '/Users/tytso/mnt/revoke.o': Permission denied
% sudo stat /Users/tytso/mnt/revoke.o
  File: /Users/tytso/mnt/revoke.o
  Size: 29728     	Blocks: 64         IO Block: 16384  regular file
Device: 55,270	Inode: 91          Links: 1
Access: (0644/-rw-r--r--)  Uid: (15806/   tytso)   Gid: (   20/   staff)
Access: 2026-05-05 00:21:50.000000000 +0200
Modify: 2026-05-05 00:21:50.000000000 +0200
Change: 2026-05-05 00:21:50.000000000 +0200
 Birth: -
% stat revoke.o
  File: revoke.o
  Size: 29728     	Blocks: 64         IO Block: 4096   regular file
Device: 1,18	Inode: 851374      Links: 1
Access: (0644/-rw-r--r--)  Uid: (15806/   tytso)   Gid: (   20/   staff)
Access: 2026-05-05 00:21:50.903084819 +0200
Modify: 2026-05-05 00:21:50.346338295 +0200
Change: 2026-05-05 00:21:50.346580544 +0200
 Birth: 2026-05-05 00:21:50.293229053 +0200
% sum revoke.o
45116    30 revoke.o
% sum /Users/tytso/mnt/revoke.o
sum: /Users/tytso/mnt/revoke.o: Permission denied

So fuse2fs is broken on MacOS, but it's not *totally* broken, since you
can still use it as root.  I'll want to fix this before updating the
master branch, but this is good enough for the next branch.



Theodore Ts'o (7):
  libsupport: drop xbitops.h and define fls() if necessary
  configure.ac: fix disable fuse2fs/fuse4fs by default path
  libsupport: don't use bzero in cache.c
  fuse[24]fs: suppress clang warnings which were breaking the github CI
  libsupport: remove the LIST_HEAD macro from list.h
  libsupport: fix gcc -Wall warnings
  fuse2fs: fix uninitialized variable warnings

 configure               |   8 +++
 configure.ac            |   3 +
 fuse4fs/Makefile.in     |  18 +++---
 fuse4fs/fuse4fs.c       |  29 +++++++--
 lib/config.h.in         |   3 +
 lib/support/Makefile.in |   2 +-
 lib/support/cache.c     |  49 ++++++++++++---
 lib/support/cache.h     |   2 +-
 lib/support/list.h      |  17 ++++--
 lib/support/xbitops.h   | 128 ----------------------------------------
 misc/fuse2fs.c          |  21 +++++++
 11 files changed, 125 insertions(+), 155 deletions(-)
 delete mode 100644 lib/support/xbitops.h

-- 
2.53.0


^ permalink raw reply

* [PATCH 7/7] fuse2fs: fix uninitialized variable warnings
From: Theodore Ts'o @ 2026-05-04 23:33 UTC (permalink / raw)
  To: Ext4 Developers List; +Cc: Darrick J. Wong, Theodore Ts'o
In-Reply-To: <20260504233301.2345652-1-tytso@mit.edu>

Clang treats use of unitialized variables found by static analysis to
be serious enough that it will emit them by default (even without
-Wall).  So let's fix them up.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
 fuse4fs/fuse4fs.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/fuse4fs/fuse4fs.c b/fuse4fs/fuse4fs.c
index b883083f8..928473268 100644
--- a/fuse4fs/fuse4fs.c
+++ b/fuse4fs/fuse4fs.c
@@ -2216,7 +2216,7 @@ static void op_mknod(fuse_req_t req, fuse_ino_t fino, const char *name,
 	const struct fuse_ctx *ctxt = fuse_req_ctx(req);
 	struct fuse4fs *ff = fuse4fs_get(req);
 	ext2_filsys fs;
-	ext2_ino_t parent, child;
+	ext2_ino_t parent, child = 0;
 	errcode_t err;
 	int filetype;
 	gid_t gid;
@@ -2311,7 +2311,7 @@ static void op_mkdir(fuse_req_t req, fuse_ino_t fino, const char *name,
 	const struct fuse_ctx *ctxt = fuse_req_ctx(req);
 	struct fuse4fs *ff = fuse4fs_get(req);
 	ext2_filsys fs;
-	ext2_ino_t parent, child;
+	ext2_ino_t parent, child = 0;
 	errcode_t err;
 	char *block;
 	blk64_t blk;
@@ -2990,7 +2990,7 @@ static void op_symlink(fuse_req_t req, const char *target, fuse_ino_t fino,
 	const struct fuse_ctx *ctxt = fuse_req_ctx(req);
 	struct fuse4fs *ff = fuse4fs_get(req);
 	ext2_filsys fs;
-	ext2_ino_t parent, child;
+	ext2_ino_t parent, child = 0;
 	errcode_t err;
 	gid_t gid;
 	int ret = 0;
@@ -6042,7 +6042,7 @@ static int fuse4fs_main(struct fuse_args *args, struct fuse4fs *ff)
 	struct fuse_cmdline_opts opts;
 	struct fuse_session *se;
 	struct fuse_loop_config *loop_config = NULL;
-	int ret;
+	int ret = 0;
 
 	if (fuse_parse_cmdline(args, &opts) != 0) {
 		ret = 1;
-- 
2.53.0


^ permalink raw reply related

* [PATCH 5/7] libsupport: remove the LIST_HEAD macro from list.h
From: Theodore Ts'o @ 2026-05-04 23:32 UTC (permalink / raw)
  To: Ext4 Developers List; +Cc: Darrick J. Wong, Theodore Ts'o
In-Reply-To: <20260504233301.2345652-1-tytso@mit.edu>

The LIST_HEAD macro is defined by both the Linux kernel's list.h and
<sys/queue.h> (originally from BSD).  The problem is that on MacOS,
some system header file pulls in <sys/queue.h> leading to a macro
redefiniction conflict.  Since we don't use LIST_HEAD in e2fsprogs,
the simplest mitigation is to just comment out the definition of LIST_HEAD.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Fixes: 37dafcc0894b ("libsupport: port the kernel list.h to libsupport")
---
 lib/support/list.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/lib/support/list.h b/lib/support/list.h
index 0e00e446d..0ec8de525 100644
--- a/lib/support/list.h
+++ b/lib/support/list.h
@@ -36,8 +36,17 @@ static inline void list_head_destroy(struct list_head *list)
 
 #define LIST_HEAD_INIT(name) { &(name), &(name) }
 
+#if 0
+/*
+ * This conflicts with the LIST_HEAD defined in <sys/queue.h>.  We
+ * don't include it in e2fsprogs, but some systems' header files might
+ * pull it in, leading to the macro redefinition conflict.
+ * Fortunately, we also don't need LIST_HEAD in e2fsprogs, so just
+ * drop this convenience macro.
+ */
 #define LIST_HEAD(name) \
 	struct list_head name = LIST_HEAD_INIT(name)
+#endif
 
 /**
  * INIT_LIST_HEAD - Initialize a list_head structure
-- 
2.53.0


^ permalink raw reply related

* [PATCH 6/7] libsupport: fix gcc -Wall warnings
From: Theodore Ts'o @ 2026-05-04 23:33 UTC (permalink / raw)
  To: Ext4 Developers List; +Cc: Darrick J. Wong, Theodore Ts'o
In-Reply-To: <20260504233301.2345652-1-tytso@mit.edu>

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
 lib/support/cache.c | 12 +++++++++---
 lib/support/cache.h |  2 +-
 lib/support/list.h  |  8 ++++----
 3 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/lib/support/cache.c b/lib/support/cache.c
index aec785347..ece0adece 100644
--- a/lib/support/cache.c
+++ b/lib/support/cache.c
@@ -15,6 +15,12 @@
 #include <stdint.h>
 #include <errno.h>
 
+#ifdef __GNUC__
+#define EXT2FS_ATTR(x) __attribute__(x)
+#else
+#define EXT2FS_ATTR(x)
+#endif
+
 #include "config.h"
 #include "list.h"
 #include "cache.h"
@@ -711,7 +717,7 @@ cache_node_put(
 
 void
 cache_node_set_priority(
-	struct cache *		cache,
+	struct cache *		cache EXT2FS_ATTR((unused)),
 	struct cache_node *	node,
 	int			priority)
 {
@@ -820,7 +826,7 @@ cache_flush(
 {
 	struct cache_hash	*hash;
 	struct cache_node	*node;
-	int			i;
+	unsigned int		i;
 	bool			still_dirty = false;
 
 	if (!cache->flush)
@@ -848,7 +854,7 @@ cache_report(
 	const char	*name,
 	struct cache	*cache)
 {
-	int		i;
+	unsigned int	i;
 	unsigned long	count, index, total;
 	unsigned long	hash_bucket_lengths[HASH_REPORT + 2] = { 0 };
 
diff --git a/lib/support/cache.h b/lib/support/cache.h
index 71fb9762f..cd0e8c20e 100644
--- a/lib/support/cache.h
+++ b/lib/support/cache.h
@@ -83,7 +83,7 @@ typedef unsigned int (*cache_node_resize_t)(const struct cache *c,
 					    unsigned int curr_size,
 					    int dir);
 
-static inline unsigned int cache_gradual_resize(const struct cache *cache,
+static inline unsigned int cache_gradual_resize(const struct cache *cache EXT2FS_ATTR((unused)),
 						unsigned int curr_size,
 						int dir)
 {
diff --git a/lib/support/list.h b/lib/support/list.h
index 0ec8de525..54e8e2360 100644
--- a/lib/support/list.h
+++ b/lib/support/list.h
@@ -148,13 +148,13 @@ static __always_inline bool __list_del_entry_valid(struct list_head *entry)
 	return ret;
 }
 #else
-static inline bool __list_add_valid(struct list_head *new,
-				struct list_head *prev,
-				struct list_head *next)
+static inline bool __list_add_valid(struct list_head *new EXT2FS_ATTR((unused)),
+				struct list_head *prev EXT2FS_ATTR((unused)),
+				struct list_head *next EXT2FS_ATTR((unused)))
 {
 	return true;
 }
-static inline bool __list_del_entry_valid(struct list_head *entry)
+static inline bool __list_del_entry_valid(struct list_head *entry EXT2FS_ATTR((unused)))
 {
 	return true;
 }
-- 
2.53.0


^ permalink raw reply related

* Re: [PATCH 0/7] fix up issues from djwong/fuse4fs-fork
From: Darrick J. Wong @ 2026-05-05  0:08 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: Ext4 Developers List
In-Reply-To: <20260504233301.2345652-1-tytso@mit.edu>

On Mon, May 04, 2026 at 07:32:54PM -0400, Theodore Ts'o wrote:
> These are the patches that I've applied to the next branch to clean up
> found when trying to compile e2fsprogs on MacOS and via the github's
> continuous integration testing.
> 
> Note: See .github/workflows/ci.yaml; it's a good reason to get a
> github account if you are doing a lot of e2fsprogs development.
> If you fork my e2fsprogs repository and push your changes to your github
> repo, you can get reports like the ones found here:
>       https://github.com/tytso/e2fsprogs/actions
> 
> 
> Anyway, with these patches, e2fsprogs builds on MacOS (both using the
> github CI and on locally on my Macbook).  Unfortunately fuse2fs has
> regressed in that non-root accesses are getting denied with a permission
> denied on MacOS, and this worked with e2fsprogs v1.47.4.  Here's a
> lightly edited transcript from my Macbook Air:

Hm, curious.  It's regrettable that I no longer have a Mac, and
therefore can't really do much investigating.  If you give
-o default_permissions,allow_other , does that fix the problem?
If that fixes it, then fuse2fs has a bug somewhere in its own
permissions checking.

> % uname -a
> Darwin macsyma.local 25.4.0 Darwin Kernel Version 25.4.0: Thu Mar 19 19:33:09 PDT 2026; root:xnu-12377.101.15~1/RELEASE_ARM64_T8112 arm64 arm Darwin
> % ./mke2fs -Fq -t ext4 -d . /tmp/foo.img  1G
> % ./fuse2fs -o allow_other /tmp/foo.img /Users/tytso/mnt
> FUSE2FS (foo.img): Warning: fuse2fs does not support using the journal.
> There may be file system corruption or data loss if
> the file system is not gracefully unmounted.
> % stat /Users/tytso/mnt/revoke.o
> stat: cannot stat '/Users/tytso/mnt/revoke.o': Permission denied
> % sudo stat /Users/tytso/mnt/revoke.o
>   File: /Users/tytso/mnt/revoke.o
>   Size: 29728     	Blocks: 64         IO Block: 16384  regular file
> Device: 55,270	Inode: 91          Links: 1
> Access: (0644/-rw-r--r--)  Uid: (15806/   tytso)   Gid: (   20/   staff)
> Access: 2026-05-05 00:21:50.000000000 +0200
> Modify: 2026-05-05 00:21:50.000000000 +0200
> Change: 2026-05-05 00:21:50.000000000 +0200
>  Birth: -
> % stat revoke.o
>   File: revoke.o
>   Size: 29728     	Blocks: 64         IO Block: 4096   regular file
> Device: 1,18	Inode: 851374      Links: 1
> Access: (0644/-rw-r--r--)  Uid: (15806/   tytso)   Gid: (   20/   staff)
> Access: 2026-05-05 00:21:50.903084819 +0200
> Modify: 2026-05-05 00:21:50.346338295 +0200
> Change: 2026-05-05 00:21:50.346580544 +0200
>  Birth: 2026-05-05 00:21:50.293229053 +0200
> % sum revoke.o
> 45116    30 revoke.o
> % sum /Users/tytso/mnt/revoke.o
> sum: /Users/tytso/mnt/revoke.o: Permission denied

That's really strange.  Does MacOS do any strange idmapping stuff?

I'm also curious if there's a particular commit that makes it all work
again?  There are a few defaults that changed between fuse2 and fuse3,
and since MacFuse claims to have vendored both, it could very well be
the megacommit dropping the fuse2 api support.

--D

> So fuse2fs is broken on MacOS, but it's not *totally* broken, since you
> can still use it as root.  I'll want to fix this before updating the
> master branch, but this is good enough for the next branch.
> 
> 
> 
> Theodore Ts'o (7):
>   libsupport: drop xbitops.h and define fls() if necessary
>   configure.ac: fix disable fuse2fs/fuse4fs by default path
>   libsupport: don't use bzero in cache.c
>   fuse[24]fs: suppress clang warnings which were breaking the github CI
>   libsupport: remove the LIST_HEAD macro from list.h
>   libsupport: fix gcc -Wall warnings
>   fuse2fs: fix uninitialized variable warnings
> 
>  configure               |   8 +++
>  configure.ac            |   3 +
>  fuse4fs/Makefile.in     |  18 +++---
>  fuse4fs/fuse4fs.c       |  29 +++++++--
>  lib/config.h.in         |   3 +
>  lib/support/Makefile.in |   2 +-
>  lib/support/cache.c     |  49 ++++++++++++---
>  lib/support/cache.h     |   2 +-
>  lib/support/list.h      |  17 ++++--
>  lib/support/xbitops.h   | 128 ----------------------------------------
>  misc/fuse2fs.c          |  21 +++++++
>  11 files changed, 125 insertions(+), 155 deletions(-)
>  delete mode 100644 lib/support/xbitops.h
> 
> -- 
> 2.53.0
> 
> 

^ permalink raw reply

* Re: [PATCH 1/7] libsupport: drop xbitops.h and define fls() if necessary
From: Darrick J. Wong @ 2026-05-05  0:11 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: Ext4 Developers List
In-Reply-To: <20260504233301.2345652-2-tytso@mit.edu>

On Mon, May 04, 2026 at 07:32:55PM -0400, Theodore Ts'o wrote:
> The new cache.c file doesn't actually need most of the functions in
> xbitops.h.  It only needs fls(), and on some systems, like MacOS and
> *BSD systems, fls() is defined already.  The other functions in
> xbitops.h are massively non-portable and break on non-Linux systems,
> especially MacOS.
> 
> So define fls() if it's needed (on Linux), and drop xbitops.h.
> 
> Fixes: 30b3c80ed6bc ("libsupport: add a cache")
> Signed-off-by: Theodore Ts'o <tytso@mit.edu>

Works for me; in the end I didn't use it as many places as I thought I
was going to.
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>

--D

> ---
>  configure               |   6 ++
>  configure.ac            |   1 +
>  fuse4fs/Makefile.in     |  18 +++---
>  lib/config.h.in         |   3 +
>  lib/support/Makefile.in |   2 +-
>  lib/support/cache.c     |  33 ++++++++++-
>  lib/support/xbitops.h   | 128 ----------------------------------------
>  7 files changed, 51 insertions(+), 140 deletions(-)
>  delete mode 100644 lib/support/xbitops.h
> 
> diff --git a/configure b/configure
> index a97794121..a1a270e63 100755
> --- a/configure
> +++ b/configure
> @@ -13677,6 +13677,12 @@ if test "x$ac_cv_func_fdatasync" = xyes
>  then :
>    printf "%s\n" "#define HAVE_FDATASYNC 1" >>confdefs.h
>  
> +fi
> +ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls"
> +if test "x$ac_cv_func_fls" = xyes
> +then :
> +  printf "%s\n" "#define HAVE_FLS 1" >>confdefs.h
> +
>  fi
>  ac_fn_c_check_func "$LINENO" "fstat64" "ac_cv_func_fstat64"
>  if test "x$ac_cv_func_fstat64" = xyes
> diff --git a/configure.ac b/configure.ac
> index b62553e3d..abce79594 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1233,6 +1233,7 @@ AC_CHECK_FUNCS(m4_flatten([
>  	fchown
>  	fcntl
>  	fdatasync
> +	fls
>  	fstat64
>  	fsync
>  	ftruncate64
> diff --git a/fuse4fs/Makefile.in b/fuse4fs/Makefile.in
> index 9f3547c27..cecee2b25 100644
> --- a/fuse4fs/Makefile.in
> +++ b/fuse4fs/Makefile.in
> @@ -134,7 +134,7 @@ distclean: clean
>  	$(RM) -f .depend Makefile $(srcdir)/TAGS $(srcdir)/Makefile.in.old
>  
>  # +++ Dependency line eater +++
> -#
> +# 
>  # Makefile dependencies follow.  This must be the last section in
>  # the Makefile.in file
>  #
> @@ -145,9 +145,10 @@ fuse4fs.o: $(srcdir)/fuse4fs.c $(top_builddir)/lib/config.h \
>   $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
>   $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \
>   $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/ext2fs/ext2fsP.h \
> - $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/version.h \
> - $(top_srcdir)/lib/e2p/e2p.h $(top_srcdir)/lib/support/cache.h \
> - $(top_srcdir)/lib/support/list.h $(top_srcdir)/lib/support/xbitops.h
> + $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/support/bthread.h \
> + $(top_srcdir)/lib/support/thread.h $(top_srcdir)/lib/support/list.h \
> + $(top_srcdir)/lib/support/cache.h $(top_srcdir)/version.h \
> + $(top_srcdir)/lib/e2p/e2p.h
>  journal.o: $(srcdir)/../debugfs/journal.c $(top_builddir)/lib/config.h \
>   $(top_builddir)/lib/dirpaths.h $(srcdir)/../debugfs/journal.h \
>   $(top_srcdir)/e2fsck/jfs_user.h $(top_srcdir)/e2fsck/e2fsck.h \
> @@ -161,8 +162,7 @@ journal.o: $(srcdir)/../debugfs/journal.c $(top_builddir)/lib/config.h \
>   $(top_srcdir)/lib/support/dqblk_v2.h \
>   $(top_srcdir)/lib/support/quotaio_tree.h \
>   $(top_srcdir)/lib/ext2fs/fast_commit.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
> - $(top_srcdir)/lib/support/list.h $(top_srcdir)/lib/ext2fs/compiler.h \
> - $(top_srcdir)/lib/ext2fs/kernel-jbd.h
> + $(top_srcdir)/lib/support/list.h $(top_srcdir)/lib/ext2fs/kernel-jbd.h
>  revoke.o: $(srcdir)/../e2fsck/revoke.c $(srcdir)/../e2fsck/jfs_user.h \
>   $(top_builddir)/lib/config.h $(top_builddir)/lib/dirpaths.h \
>   $(srcdir)/../e2fsck/e2fsck.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
> @@ -175,8 +175,7 @@ revoke.o: $(srcdir)/../e2fsck/revoke.c $(srcdir)/../e2fsck/jfs_user.h \
>   $(top_srcdir)/lib/support/dqblk_v2.h \
>   $(top_srcdir)/lib/support/quotaio_tree.h \
>   $(top_srcdir)/lib/ext2fs/fast_commit.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
> - $(top_srcdir)/lib/support/list.h $(top_srcdir)/lib/ext2fs/compiler.h \
> - $(top_srcdir)/lib/ext2fs/kernel-jbd.h
> + $(top_srcdir)/lib/support/list.h $(top_srcdir)/lib/ext2fs/kernel-jbd.h
>  recovery.o: $(srcdir)/../e2fsck/recovery.c $(srcdir)/../e2fsck/jfs_user.h \
>   $(top_builddir)/lib/config.h $(top_builddir)/lib/dirpaths.h \
>   $(srcdir)/../e2fsck/e2fsck.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
> @@ -189,5 +188,4 @@ recovery.o: $(srcdir)/../e2fsck/recovery.c $(srcdir)/../e2fsck/jfs_user.h \
>   $(top_srcdir)/lib/support/dqblk_v2.h \
>   $(top_srcdir)/lib/support/quotaio_tree.h \
>   $(top_srcdir)/lib/ext2fs/fast_commit.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
> - $(top_srcdir)/lib/support/list.h $(top_srcdir)/lib/ext2fs/compiler.h \
> - $(top_srcdir)/lib/ext2fs/kernel-jbd.h
> + $(top_srcdir)/lib/support/list.h $(top_srcdir)/lib/ext2fs/kernel-jbd.h
> diff --git a/lib/config.h.in b/lib/config.h.in
> index fd2520396..abba5e2c6 100644
> --- a/lib/config.h.in
> +++ b/lib/config.h.in
> @@ -124,6 +124,9 @@
>  /* Define to 1 if you have the 'fdatasync' function. */
>  #undef HAVE_FDATASYNC
>  
> +/* Define to 1 if you have the 'fls' function. */
> +#undef HAVE_FLS
> +
>  /* Define to 1 if fsmap_sizeof() is declared in linux/fsmap.h */
>  #undef HAVE_FSMAP_SIZEOF
>  
> diff --git a/lib/support/Makefile.in b/lib/support/Makefile.in
> index 6ff1c81d0..d20d6a984 100644
> --- a/lib/support/Makefile.in
> +++ b/lib/support/Makefile.in
> @@ -199,4 +199,4 @@ dict.o: $(srcdir)/dict.c $(top_builddir)/lib/config.h \
>  devname.o: $(srcdir)/devname.c $(top_builddir)/lib/config.h \
>   $(top_builddir)/lib/dirpaths.h $(srcdir)/devname.h $(srcdir)/nls-enable.h
>  cache.o: $(srcdir)/cache.c $(top_builddir)/lib/config.h \
> - $(srcdir)/cache.h $(srcdir)/list.h $(srcdir)/xbitops.h
> + $(top_builddir)/lib/dirpaths.h $(srcdir)/list.h $(srcdir)/cache.h
> diff --git a/lib/support/cache.c b/lib/support/cache.c
> index 3a9e276f1..f9669e3fc 100644
> --- a/lib/support/cache.c
> +++ b/lib/support/cache.c
> @@ -7,6 +7,7 @@
>  #include <stdio.h>
>  #include <stdlib.h>
>  #include <string.h>
> +#include <strings.h>
>  #include <unistd.h>
>  #include <pthread.h>
>  #include <stdbool.h>
> @@ -14,9 +15,9 @@
>  #include <stdint.h>
>  #include <errno.h>
>  
> +#include "config.h"
>  #include "list.h"
>  #include "cache.h"
> -#include "xbitops.h"
>  
>  #undef CACHE_DEBUG
>  /* #define CACHE_DEBUG 1 */
> @@ -32,6 +33,36 @@
>  # define ASSERT(x)		do { } while (0)
>  #endif
>  
> +#ifndef HAVE_FLS
> +static inline int fls(int x)
> +{
> +	int r = 32;
> +
> +	if (!x)
> +		return 0;
> +	if (!(x & 0xffff0000u)) {
> +		x = (x & 0xffffu) << 16;
> +		r -= 16;
> +	}
> +	if (!(x & 0xff000000u)) {
> +		x = (x & 0xffffffu) << 8;
> +		r -= 8;
> +	}
> +	if (!(x & 0xf0000000u)) {
> +		x = (x & 0xfffffffu) << 4;
> +		r -= 4;
> +	}
> +	if (!(x & 0xc0000000u)) {
> +		x = (x & 0x3fffffffu) << 2;
> +		r -= 2;
> +	}
> +	if (!(x & 0x80000000u)) {
> +		r -= 1;
> +	}
> +	return r;
> +}
> +#endif
> +
>  static unsigned int cache_generic_bulkrelse(struct cache *, struct list_head *);
>  
>  int
> diff --git a/lib/support/xbitops.h b/lib/support/xbitops.h
> deleted file mode 100644
> index 78a8f2a85..000000000
> --- a/lib/support/xbitops.h
> +++ /dev/null
> @@ -1,128 +0,0 @@
> -// SPDX-License-Identifier: GPL-2.0
> -#ifndef __BITOPS_H__
> -#define __BITOPS_H__
> -
> -/*
> - * fls: find last bit set.
> - */
> -
> -static inline int fls(int x)
> -{
> -	int r = 32;
> -
> -	if (!x)
> -		return 0;
> -	if (!(x & 0xffff0000u)) {
> -		x = (x & 0xffffu) << 16;
> -		r -= 16;
> -	}
> -	if (!(x & 0xff000000u)) {
> -		x = (x & 0xffffffu) << 8;
> -		r -= 8;
> -	}
> -	if (!(x & 0xf0000000u)) {
> -		x = (x & 0xfffffffu) << 4;
> -		r -= 4;
> -	}
> -	if (!(x & 0xc0000000u)) {
> -		x = (x & 0x3fffffffu) << 2;
> -		r -= 2;
> -	}
> -	if (!(x & 0x80000000u)) {
> -		r -= 1;
> -	}
> -	return r;
> -}
> -
> -static inline int fls64(uint64_t x)
> -{
> -	uint32_t h = x >> 32;
> -	if (h)
> -		return fls(h) + 32;
> -	return fls(x);
> -}
> -
> -static inline unsigned fls_long(unsigned long l)
> -{
> -        if (sizeof(l) == 4)
> -                return fls(l);
> -        return fls64(l);
> -}
> -
> -/*
> - * ffz: find first zero bit.
> - * Result is undefined if no zero bit exists.
> - */
> -#define ffz(x)	ffs(~(x))
> -
> -/*
> - * XFS bit manipulation routines.  Repeated here so that some programs
> - * don't have to link in all of libxfs just to have bit manipulation.
> - */
> -
> -/*
> - * masks with n high/low bits set, 64-bit values
> - */
> -static inline uint64_t mask64hi(int n)
> -{
> -	return (uint64_t)-1 << (64 - (n));
> -}
> -static inline uint32_t mask32lo(int n)
> -{
> -	return ((uint32_t)1 << (n)) - 1;
> -}
> -static inline uint64_t mask64lo(int n)
> -{
> -	return ((uint64_t)1 << (n)) - 1;
> -}
> -
> -/* Get high bit set out of 32-bit argument, -1 if none set */
> -static inline int highbit32(uint32_t v)
> -{
> -	return fls(v) - 1;
> -}
> -
> -/* Get high bit set out of 64-bit argument, -1 if none set */
> -static inline int highbit64(uint64_t v)
> -{
> -	return fls64(v) - 1;
> -}
> -
> -/* Get low bit set out of 32-bit argument, -1 if none set */
> -static inline int lowbit32(uint32_t v)
> -{
> -	return ffs(v) - 1;
> -}
> -
> -/* Get low bit set out of 64-bit argument, -1 if none set */
> -static inline int lowbit64(uint64_t v)
> -{
> -	uint32_t	w = (uint32_t)v;
> -	int		n = 0;
> -
> -	if (w) {	/* lower bits */
> -		n = ffs(w);
> -	} else {	/* upper bits */
> -		w = (uint32_t)(v >> 32);
> -		if (w) {
> -			n = ffs(w);
> -			if (n)
> -				n += 32;
> -		}
> -	}
> -	return n - 1;
> -}
> -
> -/**
> - * __rounddown_pow_of_two() - round down to nearest power of two
> - * @n: value to round down
> - */
> -static inline __attribute__((const))
> -unsigned long __rounddown_pow_of_two(unsigned long n)
> -{
> -	return 1UL << (fls_long(n) - 1);
> -}
> -
> -#define rounddown_pow_of_two(n) __rounddown_pow_of_two(n)
> -
> -#endif
> -- 
> 2.53.0
> 
> 

^ permalink raw reply

* Re: [PATCH 2/7] configure.ac: fix disable fuse2fs/fuse4fs by default path
From: Darrick J. Wong @ 2026-05-05  0:13 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: Ext4 Developers List
In-Reply-To: <20260504233301.2345652-3-tytso@mit.edu>

On Mon, May 04, 2026 at 07:32:56PM -0400, Theodore Ts'o wrote:
> If the fuse.h header file is not present, fix the "Disabling
> fuse[24]fs by default" codepath to actually disable trying to build
> fuse2fs or fuse4fs.
> 
> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
> Fixes: 239f4b7ac05b ("fuse2fs: separate libfuse3 and fuse2fs detection in configure")
> Signed-off-by: Theodore Ts'o <tytso@mit.edu>

Oops.  I hadn't tried building without a fuse.h in a while. :/
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>

--D

> ---
>  configure    | 2 ++
>  configure.ac | 2 ++
>  2 files changed, 4 insertions(+)
> 
> diff --git a/configure b/configure
> index a1a270e63..d941ff1f1 100755
> --- a/configure
> +++ b/configure
> @@ -14737,6 +14737,7 @@ else case e in #(
>  		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Enabling fuse2fs by default" >&5
>  printf "%s\n" "Enabling fuse2fs by default" >&6; }
>  	else
> +		FUSE2FS_CMT="#"
>  		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Disabling fuse2fs by default" >&5
>  printf "%s\n" "Disabling fuse2fs by default" >&6; }
>  	fi
> @@ -14804,6 +14805,7 @@ else case e in #(
>  		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Enabling fuse4fs by default" >&5
>  printf "%s\n" "Enabling fuse4fs by default" >&6; }
>  	else
> +		FUSE4FS_CMT="#"
>  		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Disabling fuse4fs by default" >&5
>  printf "%s\n" "Disabling fuse4fs by default" >&6; }
>  	fi
> diff --git a/configure.ac b/configure.ac
> index abce79594..d8f40f5df 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1459,6 +1459,7 @@ AS_HELP_STRING([--disable-fuse2fs],[do not build fuse2fs]),
>  	then
>  		AC_MSG_RESULT([Enabling fuse2fs by default])
>  	else
> +		FUSE2FS_CMT="#"
>  		AC_MSG_RESULT([Disabling fuse2fs by default])
>  	fi
>  ]
> @@ -1496,6 +1497,7 @@ AS_HELP_STRING([--disable-fuse4fs],[do not build fuse4fs]),
>  	then
>  		AC_MSG_RESULT([Enabling fuse4fs by default])
>  	else
> +		FUSE4FS_CMT="#"
>  		AC_MSG_RESULT([Disabling fuse4fs by default])
>  	fi
>  ]
> -- 
> 2.53.0
> 
> 

^ permalink raw reply

* Re: [PATCH 3/7] libsupport: don't use bzero in cache.c
From: Darrick J. Wong @ 2026-05-05  0:15 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: Ext4 Developers List
In-Reply-To: <20260504233301.2345652-4-tytso@mit.edu>

On Mon, May 04, 2026 at 07:32:57PM -0400, Theodore Ts'o wrote:
> The bzero() function is deprecated and not available in some
> platforms.  It's not needed in any case because we can just use an
> automatic initializer.
> 
> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
> Fixes: 30b3c80ed6bc ("libsupport: add a cache")

Yeesh.  What a sordid legacy this function has (see manpage). :(
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>

--D

> ---
>  lib/support/cache.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/lib/support/cache.c b/lib/support/cache.c
> index f9669e3fc..aec785347 100644
> --- a/lib/support/cache.c
> +++ b/lib/support/cache.c
> @@ -850,7 +850,7 @@ cache_report(
>  {
>  	int		i;
>  	unsigned long	count, index, total;
> -	unsigned long	hash_bucket_lengths[HASH_REPORT + 2];
> +	unsigned long	hash_bucket_lengths[HASH_REPORT + 2] = { 0 };
>  
>  	if ((cache->c_hits + cache->c_misses) == 0)
>  		return;
> @@ -886,8 +886,6 @@ cache_report(
>  		cache->c_mrus[i].cm_count * 100 / cache->c_count);
>  
>  	/* report hash bucket lengths */
> -	bzero(hash_bucket_lengths, sizeof(hash_bucket_lengths));
> -
>  	for (i = 0; i < cache->c_hashsize; i++) {
>  		count = cache->c_hash[i].ch_count;
>  		if (count > HASH_REPORT)
> -- 
> 2.53.0
> 
> 

^ permalink raw reply

* Re: [PATCH 4/7] fuse[24]fs: suppress clang warnings which were breaking the github CI
From: Darrick J. Wong @ 2026-05-05  0:20 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: Ext4 Developers List
In-Reply-To: <20260504233301.2345652-5-tytso@mit.edu>

On Mon, May 04, 2026 at 07:32:58PM -0400, Theodore Ts'o wrote:
> fuse[24]fs.c defines some functions which might or might not be used
> depending on the version of the fuse library installed on the system.
> Unfortunately while gcc won't complain if there are static inline
> functions which are not used, clang will only suppress such complaints
> if the static inline functions are in a header file.

<groan>

> Since the github CI runs a test build with -Wall -Werror this was
> breaking the CI build.
> 
> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
> ---
>  fuse4fs/fuse4fs.c | 21 +++++++++++++++++++++
>  misc/fuse2fs.c    | 21 +++++++++++++++++++++
>  2 files changed, 42 insertions(+)
> 
> diff --git a/fuse4fs/fuse4fs.c b/fuse4fs/fuse4fs.c
> index 13e1aae4b..b883083f8 100644
> --- a/fuse4fs/fuse4fs.c
> +++ b/fuse4fs/fuse4fs.c
> @@ -502,6 +502,27 @@ static inline off_t FUSE4FS_FSB_TO_B(const struct fuse4fs *ff, blk64_t bno)
>  	return bno << ff->blocklog;
>  }
>  
> +#ifdef __clang__
> +#define SUPPRESS_UNUSED_FUNCTION(func)    (void)func
> +/*
> + * These functions might or might not be used depending on the version
> + * of the fuse library installed on the system.  Unfortunately while
> + * gcc won't complain if there are static inline functions which are
> + * not used, clang will only suppress such complaints if the static
> + * inline functions are in a header file.
> + */
> +void fuse2fs_shut_up_stupid_clang_warnings(void)
> +{
> +	SUPPRESS_UNUSED_FUNCTION(fuse2fs_shut_up_stupid_clang_warnings);

Why is this stupid recursive shi ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
even necessary?

> +	SUPPRESS_UNUSED_FUNCTION(round_up);
> +	SUPPRESS_UNUSED_FUNCTION(round_down);
> +	SUPPRESS_UNUSED_FUNCTION(FUSE4FS_B_TO_FSBT);
> +	SUPPRESS_UNUSED_FUNCTION(FUSE4FS_OFF_IN_FSB);
> +	SUPPRESS_UNUSED_FUNCTION(FUSE4FS_B_TO_FSB);
> +	SUPPRESS_UNUSED_FUNCTION(FUSE4FS_FSB_TO_B);

Hrmm some of these aren't strictly necessary, but ... oh.  The first
three are actively used in the punch hole helpers, but that only applies
on a platform that *supports* hole punching.  So my guess is that these
clang warnings appear on macos, where there isn't holepunching?

--D

> +}
> +#endif
> +
>  static double gettime_monotonic(void)
>  {
>  #ifdef CLOCK_MONOTONIC
> diff --git a/misc/fuse2fs.c b/misc/fuse2fs.c
> index 0f4781bc4..c46cfc236 100644
> --- a/misc/fuse2fs.c
> +++ b/misc/fuse2fs.c
> @@ -339,6 +339,27 @@ static inline off_t FUSE2FS_FSB_TO_B(const struct fuse2fs *ff, blk64_t bno)
>  	return bno << ff->blocklog;
>  }
>  
> +#ifdef __clang__
> +#define SUPPRESS_UNUSED_FUNCTION(func)    (void)func
> +/*
> + * These functions might or might not be used depending on the version
> + * of the fuse library installed on the system.  Unfortunately while
> + * gcc won't complain if there are static inline functions which are
> + * not used, clang will only suppress such complaints if the static
> + * inline functions are in a header file.
> + */
> +void fuse2fs_shut_up_stupid_clang_warnings(void)
> +{
> +	SUPPRESS_UNUSED_FUNCTION(fuse2fs_shut_up_stupid_clang_warnings);
> +	SUPPRESS_UNUSED_FUNCTION(round_up);
> +	SUPPRESS_UNUSED_FUNCTION(round_down);
> +	SUPPRESS_UNUSED_FUNCTION(FUSE2FS_B_TO_FSBT);
> +	SUPPRESS_UNUSED_FUNCTION(FUSE2FS_OFF_IN_FSB);
> +	SUPPRESS_UNUSED_FUNCTION(FUSE2FS_B_TO_FSB);
> +	SUPPRESS_UNUSED_FUNCTION(FUSE2FS_FSB_TO_B);
> +}
> +#endif
> +
>  static double gettime_monotonic(void)
>  {
>  #ifdef CLOCK_MONOTONIC
> -- 
> 2.53.0
> 
> 

^ permalink raw reply

* Re: [PATCH 5/7] libsupport: remove the LIST_HEAD macro from list.h
From: Darrick J. Wong @ 2026-05-05  0:20 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: Ext4 Developers List
In-Reply-To: <20260504233301.2345652-6-tytso@mit.edu>

On Mon, May 04, 2026 at 07:32:59PM -0400, Theodore Ts'o wrote:
> The LIST_HEAD macro is defined by both the Linux kernel's list.h and
> <sys/queue.h> (originally from BSD).  The problem is that on MacOS,
> some system header file pulls in <sys/queue.h> leading to a macro
> redefiniction conflict.  Since we don't use LIST_HEAD in e2fsprogs,
> the simplest mitigation is to just comment out the definition of LIST_HEAD.
> 
> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
> Fixes: 37dafcc0894b ("libsupport: port the kernel list.h to libsupport")

Sounds fine to me.
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>

--D

> ---
>  lib/support/list.h | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/lib/support/list.h b/lib/support/list.h
> index 0e00e446d..0ec8de525 100644
> --- a/lib/support/list.h
> +++ b/lib/support/list.h
> @@ -36,8 +36,17 @@ static inline void list_head_destroy(struct list_head *list)
>  
>  #define LIST_HEAD_INIT(name) { &(name), &(name) }
>  
> +#if 0
> +/*
> + * This conflicts with the LIST_HEAD defined in <sys/queue.h>.  We
> + * don't include it in e2fsprogs, but some systems' header files might
> + * pull it in, leading to the macro redefinition conflict.
> + * Fortunately, we also don't need LIST_HEAD in e2fsprogs, so just
> + * drop this convenience macro.
> + */
>  #define LIST_HEAD(name) \
>  	struct list_head name = LIST_HEAD_INIT(name)
> +#endif
>  
>  /**
>   * INIT_LIST_HEAD - Initialize a list_head structure
> -- 
> 2.53.0
> 
> 

^ permalink raw reply

* Re: [PATCH 6/7] libsupport: fix gcc -Wall warnings
From: Darrick J. Wong @ 2026-05-05  0:20 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: Ext4 Developers List
In-Reply-To: <20260504233301.2345652-7-tytso@mit.edu>

On Mon, May 04, 2026 at 07:33:00PM -0400, Theodore Ts'o wrote:
> Signed-off-by: Theodore Ts'o <tytso@mit.edu>

Looks good to me,
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>

--D

> ---
>  lib/support/cache.c | 12 +++++++++---
>  lib/support/cache.h |  2 +-
>  lib/support/list.h  |  8 ++++----
>  3 files changed, 14 insertions(+), 8 deletions(-)
> 
> diff --git a/lib/support/cache.c b/lib/support/cache.c
> index aec785347..ece0adece 100644
> --- a/lib/support/cache.c
> +++ b/lib/support/cache.c
> @@ -15,6 +15,12 @@
>  #include <stdint.h>
>  #include <errno.h>
>  
> +#ifdef __GNUC__
> +#define EXT2FS_ATTR(x) __attribute__(x)
> +#else
> +#define EXT2FS_ATTR(x)
> +#endif
> +
>  #include "config.h"
>  #include "list.h"
>  #include "cache.h"
> @@ -711,7 +717,7 @@ cache_node_put(
>  
>  void
>  cache_node_set_priority(
> -	struct cache *		cache,
> +	struct cache *		cache EXT2FS_ATTR((unused)),
>  	struct cache_node *	node,
>  	int			priority)
>  {
> @@ -820,7 +826,7 @@ cache_flush(
>  {
>  	struct cache_hash	*hash;
>  	struct cache_node	*node;
> -	int			i;
> +	unsigned int		i;
>  	bool			still_dirty = false;
>  
>  	if (!cache->flush)
> @@ -848,7 +854,7 @@ cache_report(
>  	const char	*name,
>  	struct cache	*cache)
>  {
> -	int		i;
> +	unsigned int	i;
>  	unsigned long	count, index, total;
>  	unsigned long	hash_bucket_lengths[HASH_REPORT + 2] = { 0 };
>  
> diff --git a/lib/support/cache.h b/lib/support/cache.h
> index 71fb9762f..cd0e8c20e 100644
> --- a/lib/support/cache.h
> +++ b/lib/support/cache.h
> @@ -83,7 +83,7 @@ typedef unsigned int (*cache_node_resize_t)(const struct cache *c,
>  					    unsigned int curr_size,
>  					    int dir);
>  
> -static inline unsigned int cache_gradual_resize(const struct cache *cache,
> +static inline unsigned int cache_gradual_resize(const struct cache *cache EXT2FS_ATTR((unused)),
>  						unsigned int curr_size,
>  						int dir)
>  {
> diff --git a/lib/support/list.h b/lib/support/list.h
> index 0ec8de525..54e8e2360 100644
> --- a/lib/support/list.h
> +++ b/lib/support/list.h
> @@ -148,13 +148,13 @@ static __always_inline bool __list_del_entry_valid(struct list_head *entry)
>  	return ret;
>  }
>  #else
> -static inline bool __list_add_valid(struct list_head *new,
> -				struct list_head *prev,
> -				struct list_head *next)
> +static inline bool __list_add_valid(struct list_head *new EXT2FS_ATTR((unused)),
> +				struct list_head *prev EXT2FS_ATTR((unused)),
> +				struct list_head *next EXT2FS_ATTR((unused)))
>  {
>  	return true;
>  }
> -static inline bool __list_del_entry_valid(struct list_head *entry)
> +static inline bool __list_del_entry_valid(struct list_head *entry EXT2FS_ATTR((unused)))
>  {
>  	return true;
>  }
> -- 
> 2.53.0
> 
> 

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox