Re: [PATCH 11/13] example/service_ll: create a sample systemd service fuse server

Darrick J. Wong
2026-04-27T14:51:03Z

On Sun, Apr 26, 2026 at 11:28:11PM +0200, Bernd Schubert wrote:
>
>
> On 4/23/26 01:22, Darrick J. Wong wrote:
> > From: Darrick J. Wong <djwong@kernel.org>
> >
> > Create a simple fuse server that can be run as a systemd service.
> > I plan to create some more single-file fuse server examples, so most of
> > the boilerplate code goes in a separate file.
> >
> > Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
> > ---
> > example/single_file.h | 153 +++++++++
> > lib/util.h | 35 ++
> > example/meson.build | 14 +
> > example/service_ll.c | 312 ++++++++++++++++++
> > example/service_ll.socket.in | 15 +
> > example/service_ll@.service | 102 ++++++
> > example/single_file.c | 733 ++++++++++++++++++++++++++++++++++++++++++
> > meson.build | 1
> > 8 files changed, 1365 insertions(+)
> > create mode 100644 example/single_file.h
> > create mode 100644 example/service_ll.c
> > create mode 100644 example/service_ll.socket.in
> > create mode 100644 example/service_ll@.service
> > create mode 100644 example/single_file.c
> >
> >
> > diff --git a/example/single_file.h b/example/single_file.h
> > new file mode 100644
> > index 00000000000000..d8a91adbf875ef
> > --- /dev/null
> > +++ b/example/single_file.h
> > @@ -0,0 +1,153 @@
> > +/*
> > + * FUSE: Filesystem in Userspace
> > + * Copyright (C) 2026 Oracle.
> > + *
> > + * This program can be distributed under the terms of the GNU GPLv2.
> > + * See the file GPL2.txt.
> > + */
> > +#ifndef FUSE_SINGLE_FILE_H_
> > +#define FUSE_SINGLE_FILE_H_
>
> From the name it is kind of impossible to figure out what it is for -
> requires to go through the code. Could you add something like
>
> This is not a standalone file system, but a helper for other file
> systems to expose a single file backed by a physical file or block device.
>
> For both the .h and .c file? Please feel free to make it more verbose.

Ok, I have written:

"This file is shared library code for example fuse servers that want to
expose a single regular file that wraps another file in a manner that
goes beyond simple passthrough. It is not itself a fuse server."

How does that sound?

--D