Skip to content

Commit cf6c755

Browse files
committed
Merge branch 'release/0.6.0'
2 parents 174b226 + 38e0484 commit cf6c755

File tree

356 files changed

+20680
-15209
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

356 files changed

+20680
-15209
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- uses: actions/checkout@v3
1313
- uses: actions/setup-java@v3
1414
with:
15-
java-version: 20
15+
java-version: 21-ea
1616
distribution: 'zulu'
1717
cache: 'maven'
1818
- name: Setup fuse
@@ -35,7 +35,7 @@ jobs:
3535
- uses: actions/checkout@v3
3636
- uses: actions/setup-java@v3
3737
with:
38-
java-version: 20
38+
java-version: 21-ea
3939
distribution: 'zulu'
4040
cache: 'maven'
4141
- name: Setup fuse
@@ -59,7 +59,7 @@ jobs:
5959
- uses: actions/checkout@v3
6060
- uses: actions/setup-java@v3
6161
with:
62-
java-version: 20
62+
java-version: 21-ea
6363
distribution: 'zulu'
6464
cache: 'maven'
6565
- name: Setup fuse
@@ -83,7 +83,7 @@ jobs:
8383
fetch-depth: 0
8484
- uses: actions/setup-java@v3
8585
with:
86-
java-version: 20
86+
java-version: 21-ea
8787
distribution: 'zulu'
8888
cache: 'maven'
8989
- name: Cache SonarCloud packages

.github/workflows/publish-central.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
ref: "refs/tags/${{ github.event.inputs.tag }}"
1616
- uses: actions/setup-java@v3
1717
with:
18-
java-version: 20
18+
java-version: 21-ea
1919
distribution: 'zulu'
2020
cache: 'maven'
2121
server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml

.github/workflows/publish-github.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
- uses: actions/checkout@v3
1111
- uses: actions/setup-java@v3
1212
with:
13-
java-version: 20
13+
java-version: 21-ea
1414
distribution: 'zulu'
1515
cache: 'maven'
1616
gpg-private-key: ${{ secrets.RELEASES_GPG_PRIVATE_KEY }} # Value of the GPG private key to import

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66

77
# jFUSE
88

9-
Zero-Dependency Java bindings for FUSE using [JEP 434](https://openjdk.org/jeps/434).
9+
Zero-Dependency Java bindings for FUSE using [JEP 4442](https://openjdk.org/jeps/442).
1010

1111
## Status
1212

13-
This is currently an experimental library requiring JDK 20. As long as the [Foreign Function & Memory API](https://openjdk.org/jeps/434) is incubating, the required JDK will increase.
13+
This is currently an experimental library requiring JDK 21. As long as the [Foreign Function & Memory API](https://openjdk.org/jeps/442) is incubating, the required JDK will increase.
1414
Older JDK versions are *not supported*. Please refer to an older version of this lib, if you are interested in using it with an older JDK. Older versions will not receive patches or any kind of support, though!
1515

1616
We attempt to support libfuse 3.x on Linux and Windows while also remaining compatible with libfuse 2.x on macOS, leading to some compromises in the API.

jfuse-api/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>org.cryptomator</groupId>
77
<artifactId>jfuse-parent</artifactId>
8-
<version>0.5.1</version>
8+
<version>0.6.0</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111
<artifactId>jfuse-api</artifactId>

jfuse-api/src/main/java/org/cryptomator/jfuse/api/Errno.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,4 +124,11 @@ public interface Errno {
124124
*/
125125
int enametoolong();
126126

127+
/**
128+
* The named attribute does not exist, or the process has no access to this attribute;
129+
*
130+
* @return error constant {@code ENODATA}
131+
*/
132+
int enodata();
133+
127134
}

jfuse-api/src/main/java/org/cryptomator/jfuse/api/Fuse.java

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
import java.util.concurrent.ThreadFactory;
2424
import java.util.concurrent.TimeUnit;
2525
import java.util.concurrent.TimeoutException;
26-
import java.util.concurrent.atomic.AtomicInteger;
2726
import java.util.concurrent.atomic.AtomicReference;
2827
import java.util.function.Function;
2928

@@ -43,7 +42,7 @@ public abstract class Fuse implements AutoCloseable {
4342
/**
4443
* The memory session associated with the lifecycle of this Fuse instance.
4544
*/
46-
protected final Arena fuseArena = Arena.openShared();
45+
protected final Arena fuseArena = Arena.ofShared();
4746

4847
/**
4948
* The file system operations invoked by this FUSE file system.
@@ -125,7 +124,7 @@ public synchronized void mount(String progName, Path mountPoint, String... flags
125124

126125
try {
127126
var fuseMount = this.mount(args);
128-
Future<Integer> fuseLoop = executor.submit(() -> fuseLoop(fuseMount));
127+
Future<Integer> fuseLoop = executor.submit(fuseMount::loop);
129128
waitForMountingToComplete(mountPoint, fuseLoop);
130129
if (fuseLoop.isDone()) {
131130
throw new FuseMountFailedException("fuse_loop() returned prematurely with non-zero exit code " + fuseLoop.get());
@@ -153,16 +152,6 @@ void waitForMountingToComplete(Path mountPoint, Future<Integer> fuseLoop) throws
153152
} while (!fuseLoop.isDone() && !mountProbeSucceeded.await(200, TimeUnit.MILLISECONDS));
154153
}
155154

156-
@Blocking
157-
private int fuseLoop(FuseMount mount) {
158-
AtomicInteger result = new AtomicInteger();
159-
fuseArena.scope().whileAlive(() -> {
160-
int r = mount.loop();
161-
result.set(r);
162-
});
163-
return result.get();
164-
}
165-
166155
/**
167156
* Mounts the fuse file system.
168157
*

jfuse-examples/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>org.cryptomator</groupId>
77
<artifactId>jfuse-parent</artifactId>
8-
<version>0.5.1</version>
8+
<version>0.6.0</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111
<artifactId>jfuse-examples</artifactId>

jfuse-linux-aarch64/pom.xml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>jfuse-parent</artifactId>
77
<groupId>org.cryptomator</groupId>
8-
<version>0.5.1</version>
8+
<version>0.6.0</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111
<artifactId>jfuse-linux-aarch64</artifactId>
@@ -71,10 +71,9 @@
7171
<artifactId>jextract-maven-plugin</artifactId>
7272
<version>0.3.0</version>
7373
<configuration>
74-
<executable>/Users/sebastian/Documents/Cryptomator/jextract/build/jextract/bin/jextract</executable>
74+
<executable>/Users/sebastian/git/github.com/openjdk/jextract/build/jextract/bin/jextract</executable>
7575
<headerSearchPaths>${linux.headerSearchPath}</headerSearchPaths>
7676
<outputDirectory>${project.build.sourceDirectory}</outputDirectory>
77-
<targetPackage>org.cryptomator.jfuse.linux.aarch64.extr</targetPackage>
7877
</configuration>
7978
<executions>
8079
<execution>
@@ -84,6 +83,7 @@
8483
</goals>
8584
<configuration>
8685
<headerFile>${project.parent.basedir}/libfuse3/include/fuse.h</headerFile>
86+
<targetPackage>org.cryptomator.jfuse.linux.aarch64.extr.fuse3</targetPackage>
8787
<headerClassName>fuse_h</headerClassName>
8888
<cPreprocessorMacros>
8989
<cPreprocessorMacro>_FILE_OFFSET_BITS=64</cPreprocessorMacro>
@@ -128,7 +128,7 @@
128128
</goals>
129129
<configuration>
130130
<headerFile>${project.parent.basedir}/libfuse3/include/fuse_lowlevel.h</headerFile>
131-
<targetPackage>org.cryptomator.jfuse.linux.aarch64.extr</targetPackage>
131+
<targetPackage>org.cryptomator.jfuse.linux.aarch64.extr.fuse3_lowlevel</targetPackage>
132132
<headerClassName>fuse_lowlevel_h</headerClassName>
133133
<cPreprocessorMacros>
134134
<cPreprocessorMacro>_FILE_OFFSET_BITS=64</cPreprocessorMacro>
@@ -146,6 +146,7 @@
146146
</goals>
147147
<configuration>
148148
<headerFile>${linux.headerSearchPath}/errno.h</headerFile>
149+
<targetPackage>org.cryptomator.jfuse.linux.aarch64.extr.errno</targetPackage>
149150
<headerClassName>errno_h</headerClassName>
150151
<includeConstants>
151152
<includeConstant>ENOENT</includeConstant>
@@ -164,6 +165,7 @@
164165
<includeConstant>ERANGE</includeConstant>
165166
<includeConstant>ENOLCK</includeConstant>
166167
<includeConstant>ENAMETOOLONG</includeConstant>
168+
<includeConstant>ENODATA</includeConstant>
167169
</includeConstants>
168170
</configuration>
169171
</execution>
@@ -174,6 +176,7 @@
174176
</goals>
175177
<configuration>
176178
<headerFile>${linux.headerSearchPath}/sys/stat.h</headerFile>
179+
<targetPackage>org.cryptomator.jfuse.linux.aarch64.extr.stat</targetPackage>
177180
<headerClassName>stat_h</headerClassName>
178181
<includeConstants>
179182
<includeConstant>UTIME_NOW</includeConstant>
@@ -188,6 +191,7 @@
188191
</goals>
189192
<configuration>
190193
<headerFile>${linux.headerSearchPath}/fcntl.h</headerFile>
194+
<targetPackage>org.cryptomator.jfuse.linux.aarch64.extr.fcntl</targetPackage>
191195
<headerClassName>fcntl_h</headerClassName>
192196
<includeConstants>
193197
<includeConstant>O_RDONLY</includeConstant>
@@ -209,6 +213,7 @@
209213
</goals>
210214
<configuration>
211215
<headerFile>${linux.headerSearchPath}/stdio.h</headerFile>
216+
<targetPackage>org.cryptomator.jfuse.linux.aarch64.extr.stdio</targetPackage>
212217
<headerClassName>stdio_h</headerClassName>
213218
<cPreprocessorMacros>
214219
<cPreprocessorMacro>_GNU_SOURCE=1</cPreprocessorMacro>
@@ -227,5 +232,4 @@
227232
</build>
228233
</profile>
229234
</profiles>
230-
231-
</project>
235+
</project>

0 commit comments

Comments
 (0)