Skip to content

Commit 3e19847

Browse files
committed
Sync with upstream
1 parent d494d49 commit 3e19847

20 files changed

Lines changed: 1447 additions & 35 deletions

.github/workflows/find_previous_release_tag.sh

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,20 @@ set -e
1010
VERSION_PATTERN="version\s*:\s*['\"]"
1111
VERSION_EXTRACT="s/.*version\s*:\s*['\"]([^'\"]+)['\"].*/\1/"
1212

13-
CURRENT_VERSION=$(grep -E "$VERSION_PATTERN" meson.build | \
13+
VERSION=$(grep -E "$VERSION_PATTERN" meson.build | \
14+
grep -v 'meson' | \
1415
sed -E "$VERSION_EXTRACT")
15-
echo "Current version: $CURRENT_VERSION" >&2
16+
echo "Current version: $VERSION" >&2
1617

1718
# Extract major.minor version (e.g., 3.18 from 3.18.0)
1819
# Pattern captures first two numbers separated by dot
1920
MAJOR_MINOR_PATTERN='s/^([0-9]+\.[0-9]+).*/\1/'
2021

21-
CURRENT_MAJOR_MINOR=$(echo "$CURRENT_VERSION" | \
22-
sed -E "$MAJOR_MINOR_PATTERN")
23-
echo "Current major.minor: $CURRENT_MAJOR_MINOR" >&2
22+
MAJOR_MINOR=$(echo "$VERSION" | \
23+
sed -E "$MAJOR_MINOR_PATTERN")
24+
echo "Current major.minor: $MAJOR_MINOR" >&2
25+
MAJOR="${MAJOR_MINOR%%.*}"
26+
MINOR="${MAJOR_MINOR#*.}"
2427

2528
# Get all major.minor versions from tags, sort them, and find the one before
2629
# current
@@ -39,11 +42,30 @@ echo "$ALL_MAJOR_MINOR" >&2
3942

4043
# Find the previous major.minor version
4144
PREV_MAJOR_MINOR=$(echo "$ALL_MAJOR_MINOR" | \
42-
grep -B1 "^${CURRENT_MAJOR_MINOR}$" | \
45+
grep -B1 "^${MAJOR_MINOR}$" | \
4346
head -1)
47+
if [ -z "${PREV_MAJOR_MINOR}" ]; then
48+
# Current major.minor not found in tags (untagged release branch)
49+
# Try: previous minor with current major
50+
PREV_MINOR=$((MINOR - 1))
51+
if [ $PREV_MINOR -ge 0 ]; then
52+
CANDIDATE="${MAJOR}.${PREV_MINOR}"
53+
if echo "$ALL_MAJOR_MINOR" | grep -q "^${CANDIDATE}$"; then
54+
PREV_MAJOR_MINOR="$CANDIDATE"
55+
fi
56+
fi
57+
58+
# If still not found, get highest minor from previous major
59+
if [ -z "${PREV_MAJOR_MINOR}" ]; then
60+
PREV_MAJOR=$((MAJOR - 1))
61+
PREV_MAJOR_MINOR=$(echo "$ALL_MAJOR_MINOR" | \
62+
grep "^${PREV_MAJOR}\." | \
63+
tail -n1)
64+
fi
65+
fi
4466

45-
if [ -z "$PREV_MAJOR_MINOR" ] || [ "$PREV_MAJOR_MINOR" = "$CURRENT_MAJOR_MINOR" ]; then
46-
echo "Error: No previous major.minor version found before $CURRENT_MAJOR_MINOR" >&2
67+
if [ -z "$PREV_MAJOR_MINOR" ] || [ "$PREV_MAJOR_MINOR" = "$MAJOR_MINOR" ]; then
68+
echo "Error: No previous major.minor version found before $MAJOR_MINOR" >&2
4769
exit 1
4870
fi
4971

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
cmake_minimum_required (VERSION 3.12.0)
66
set (CMAKE_VERBOSE_MAKEFILE FALSE)
77

8+
### NOTE: CMake rc0 is invalid - we drop it with impunity
89
project (libfuse3
9-
VERSION 3.17.0
10+
VERSION 3.19.0
1011
DESCRIPTION "The CMake implementation of the Linux FUSE (Filesystem in Userspace) interface"
1112
HOMEPAGE_URL https://github.com/Smit-tay/libfuse-cmake
1213
LANGUAGES C CXX)

doc/ChangeLog-API.rst

Lines changed: 178 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
==================================
2+
libfuse API Changes (3.0 to 3.19)
3+
==================================
4+
5+
This document describes API changes between FUSE_USE_VERSION values.
6+
Set FUSE_USE_VERSION before including fuse.h or fuse_lowlevel.h.
7+
8+
Version 3.1 (FUSE_MAKE_VERSION(3, 1))
9+
=====================================
10+
11+
New Functions
12+
-------------
13+
* ``fuse_lib_help()`` - Print help for generic high-level FUSE options
14+
* ``fuse_invalidate_path()`` - Cache invalidation from high-level API
15+
16+
Changed Functions
17+
-----------------
18+
* ``fuse_new()`` signature changed; applications should call ``fuse_lib_help()``
19+
for --help instead of passing it to fuse_new()
20+
21+
Version 3.2 (FUSE_MAKE_VERSION(3, 2))
22+
=====================================
23+
24+
Changed Functions
25+
-----------------
26+
* ``fuse_loop_mt()`` and ``fuse_session_loop_mt()`` now take a
27+
``struct fuse_loop_config *`` parameter instead of a *clone_fd* boolean.
28+
The struct is public and can be directly initialized.
29+
30+
Note: This change was implemented in libfuse release 3.1.1, but the API version
31+
that enables it is 32.
32+
33+
Version 3.3 (FUSE_MAKE_VERSION(3, 3))
34+
=====================================
35+
36+
New Functions
37+
-------------
38+
* ``fuse_open_channel()`` - Open a FUSE file descriptor and set up mount
39+
(allows passing open /dev/fuse fd via ``/dev/fd/%u`` mountpoint format)
40+
41+
Version 3.4 (FUSE_MAKE_VERSION(3, 4))
42+
=====================================
43+
44+
New Operations
45+
--------------
46+
* ``copy_file_range`` - Efficient server-side file copying
47+
48+
New Functions
49+
-------------
50+
* ``fuse_fs_copy_file_range()`` - High-level API wrapper
51+
52+
Version 3.5 (FUSE_MAKE_VERSION(3, 5))
53+
=====================================
54+
55+
Changed Prototypes
56+
------------------
57+
* ``ioctl`` handler: cmd parameter changed from ``int`` to ``unsigned int``
58+
59+
- Use FUSE_USE_VERSION < 35 for old ``int cmd`` prototype
60+
- Use FUSE_USE_VERSION >= 35 for new ``unsigned int cmd`` prototype
61+
62+
Version 3.7 (FUSE_MAKE_VERSION(3, 7))
63+
=====================================
64+
65+
New Functions
66+
-------------
67+
* ``fuse_set_log_func()`` - Install custom log message handler
68+
* ``fuse_log()`` - Emit log messages (replaces direct stderr writes)
69+
70+
Version 3.8 (FUSE_MAKE_VERSION(3, 8))
71+
=====================================
72+
73+
New Operations
74+
--------------
75+
* ``lseek`` - Find next data or hole in sparse files (SEEK_DATA/SEEK_HOLE)
76+
77+
New Functions
78+
-------------
79+
* ``fuse_fs_lseek()`` - High-level API wrapper
80+
* ``fuse_reply_lseek()`` - Low-level reply function
81+
82+
Version 3.12 (FUSE_MAKE_VERSION(3, 12))
83+
=======================================
84+
85+
Major Changes
86+
-------------
87+
* ``struct fuse_loop_config`` is now **private** (opaque pointer)
88+
* Loop configuration must use accessor functions instead of direct struct access
89+
* The public struct from version 3.2-3.11 is renamed to ``struct fuse_loop_config_v1``
90+
91+
New Functions
92+
-------------
93+
* ``fuse_loop_cfg_create()`` - Create loop configuration
94+
* ``fuse_loop_cfg_destroy()`` - Free loop configuration
95+
* ``fuse_loop_cfg_set_idle_threads()`` - Set max idle threads
96+
* ``fuse_loop_cfg_set_max_threads()`` - Set max total threads
97+
* ``fuse_loop_cfg_set_clone_fd()`` - Enable/disable clone_fd
98+
* ``fuse_loop_cfg_convert()`` - Convert old config (v1) to new format
99+
* ``fuse_lowlevel_notify_expire_entry()`` - Expire dentry without full invalidation
100+
101+
Changed Functions
102+
-----------------
103+
* ``fuse_session_loop_mt()`` now accepts NULL config pointer
104+
* ``fuse_parse_cmdline()`` now accepts ``max_threads`` option
105+
106+
Deprecated
107+
----------
108+
* ``max_idle_threads`` parameter (use ``max_threads`` instead)
109+
110+
Version 3.17 (FUSE_MAKE_VERSION(3, 17))
111+
=======================================
112+
113+
New Functions
114+
-------------
115+
* ``fuse_set_fail_signal_handlers()`` - Handle fatal signals with backtrace
116+
* ``fuse_log_enable_syslog()`` - Redirect fuse_log() to syslog
117+
* ``fuse_log_close_syslog()`` - Close syslog connection
118+
* ``fuse_passthrough_open()`` - Setup passthrough backing file
119+
* ``fuse_passthrough_close()`` - Close passthrough connection
120+
* ``fuse_session_custom_io()`` - Custom I/O for FUSE daemon (signature extended)
121+
122+
New Capabilities
123+
----------------
124+
* ``FUSE_CAP_PASSTHROUGH`` - Enable passthrough read/write to backing file
125+
* ``FUSE_CAP_HANDLE_KILLPRIV_V2`` - Support for KILLPRIV_V2
126+
127+
New Mount Options
128+
-----------------
129+
* ``fmask`` - umask applied to non-directories (high-level API)
130+
* ``dmask`` - umask applied to directories (high-level API)
131+
132+
Version 3.17.3
133+
==============
134+
135+
New Functions
136+
-------------
137+
* ``fuse_set_feature_flag()`` - Set capability in want_ext field
138+
* ``fuse_unset_feature_flag()`` - Unset capability in want_ext field
139+
* ``fuse_get_feature_flag()`` - Query capability in want_ext field
140+
141+
Note: These replace direct manipulation of conn->want for 64-bit capability support.
142+
143+
Version 3.18 (FUSE_MAKE_VERSION(3, 18))
144+
=======================================
145+
146+
New Operations
147+
--------------
148+
* ``statx`` - Extended file attributes (struct statx support)
149+
150+
New Functions
151+
-------------
152+
* ``fuse_fs_statx()`` - High-level API wrapper
153+
* ``fuse_reply_statx()`` - Low-level reply function
154+
* ``fuse_req_is_uring()`` - Check if request uses fuse-over-io-uring
155+
* ``fuse_req_get_payload()`` - Get request payload buffer (io-uring only)
156+
* ``fuse_lowlevel_notify_increment_epoch()`` - Increment epoch counter
157+
158+
New Features
159+
------------
160+
* fuse-over-io-uring communication support
161+
* Request timeouts for hung operation prevention
162+
163+
Version 3.19 (FUSE_MAKE_VERSION(3, 19))
164+
=======================================
165+
166+
(Reserved for future use)
167+
168+
Migration Notes
169+
===============
170+
171+
When upgrading FUSE_USE_VERSION:
172+
173+
1. **3.0 → 3.1**: Handle --help in filesystem code, call fuse_lib_help()
174+
2. **3.1 → 3.2**: Update fuse_loop_mt() calls to use struct fuse_loop_config
175+
3. **< 3.5 → 3.5+**: Change ioctl cmd from int to unsigned int
176+
4. **< 3.12 → 3.12+**: Use fuse_loop_cfg_*() functions instead of direct struct access
177+
5. **< 3.17 → 3.17+**: Use fuse_set_feature_flag() instead of conn->want for new caps
178+

example/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ endif()
1111

1212
set(EXAMPLES passthrough passthrough_fh
1313
hello hello_ll
14-
printcap ioctl_client poll_client
15-
ioctl cuse cuse_client)
14+
printcap ioctl_client ioctl_ll_client poll_client
15+
ioctl ioctl_ll cuse cuse_client)
1616

1717
if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "bsd$" AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL "dragonfly")
1818
list(APPEND EXAMPLES passthrough_ll)

example/ioctl.h

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,20 @@
1010
/** @file
1111
* @tableofcontents
1212
*
13-
* Header file to share definitions between the ioctl.c example file
14-
* system and the ioctl_client.c test program.
13+
* Header file to share definitions between the ioctl example file
14+
* systems (ioctl.c, ioctl_ll.c, cuse.c) and their test programs
15+
* (ioctl_client.c, ioctl_ll_client.c, cuse_client.c).
16+
*
17+
* Restricted ioctls (FIOC_GET_SIZE, FIOC_SET_SIZE):
18+
* Use _IOR/_IOW encoding - kernel handles data transfer automatically.
19+
*
20+
* Unrestricted ioctls (FIOC_READ, FIOC_WRITE):
21+
* Use _IO encoding - require fuse_reply_ioctl_retry() in low-level API.
22+
* Only work with CUSE (fuse kernel restriction).
1523
*
1624
* \include ioctl.h
1725
*/
1826

19-
2027
#include <sys/types.h>
2128
#include <sys/uio.h>
2229
#include <sys/ioctl.h>

0 commit comments

Comments
 (0)