Comments (11)
Hi, @czeidler!
Is it Ubuntu x64 or x32? Did you make any change to HelloFuse?
from jnr-fuse.
Can you also post the debug
output here?
from jnr-fuse.
Its ubuntu 17.04 x64. I started with my own implementation using only getattr and readdir but then copied HelloFuse over. So 98% sure that it unmodified. Here is some output. (Or is there some other debug output?) thanks!
LOOKUP /autorun.inf
getattr /autorun.inf
unique: 8, error: -2 (No such file or directory), outsize: 16
unique: 9, opcode: READDIR (28), nodeid: 1, insize: 80, pid: 9351
readdir[0] from 0
unique: 9, success, outsize: 16
unique: 10, opcode: RELEASEDIR (29), nodeid: 1, insize: 64, pid: 0
unique: 10, success, outsize: 16
unique: 11, opcode: OPENDIR (27), nodeid: 1, insize: 48, pid: 9351
unique: 11, success, outsize: 32
unique: 12, opcode: GETATTR (3), nodeid: 1, insize: 56, pid: 9351
getattr /
unique: 12, success, outsize: 120
unique: 13, opcode: READDIR (28), nodeid: 1, insize: 80, pid: 9351
readdir[0] from 0
unique: 13, success, outsize: 16
unique: 14, opcode: RELEASEDIR (29), nodeid: 1, insize: 64, pid: 0
unique: 14, success, outsize: 16
from jnr-fuse.
I started with my own implementation using only getattr and readdir but then copied HelloFuse over
So, is it just a HelloFuse.java
without modifications? If so, is it working correctly when you try to invoke let's say ls
?
from jnr-fuse.
I put breakpoints in all methods of HelloFuse but only getattr gets called. A ls only triggers a getattr but not a readdir... Maybe something with the bindings/ method signature is different under Ubuntu?
from jnr-fuse.
But is it working for you? Is it showing a file called hello
?
from jnr-fuse.
no its showing nothing (because readdir is never called), I also tested it in the test case:
String[]
content = tmpDir.toFile().list();
Nothing in content...
from jnr-fuse.
Initially I used javafs (but it does not seems to be under active development any more and I had some other issues) I got my fs working for javafs, so I just checked the callback signature in javafs:
int _readdir(String path, Pointer buf, Pointer fillFunction, @off_t long offset, @In Pointer info);
compared to your implementation there is an additional @in, is that important?
int readdir(String path, Pointer buf, Pointer filter, @off_t long offset, Pointer fi);
from jnr-fuse.
No, it isn't, @in
and @out
are mostly for optimization purposes.
Can you try to run ru.serce.jnrfuse.struct.HelloFuseTest
?
from jnr-fuse.
Ok found the issues. The problem was simply that I still had the javafs code around and I guess this interfered with jnr-fuse... sorry for the noise.
Just an idea: Sometimes it happens that filesystems don't get umounted (e.g. when killing the jvm) Does it makes sense to add a method to force an umount?
static public void umount(Path mountPoint) {
try {
String mountPath = mountPoint.toAbsolutePath().toString();
try {
new ProcessBuilder("fusermount", "-u", "-z", mountPath).start();
} catch (IOException e) {
new ProcessBuilder("umount", mountPath).start();
}
} catch (IOException e) {
throw new FuseException("Unable to umount FS", e);
}
}
from jnr-fuse.
@czeidler Yes, it might be a good idea to have unmount
method in some special utils class.
You can open a PR if you find it convenient :)
from jnr-fuse.
Related Issues (20)
- Java 9 module support HOT 1
- write throughput very low compared to read HOT 1
- Problem with samba share folders (jnr-fuse + winfsp) HOT 2
- Capturing SetSecurity events HOT 2
- Fix CVE-2014-4043 HOT 4
- Wrong dependency scopes in release 0.5.6 HOT 2
- GraalVM native image support
- Winfsp and jnr-fuse not working HOT 3
- Why not implement the inode interface provided by kernel fuse to replace the current path interface? HOT 5
- Program doesn't shut down properly in some cases on windows
- JVM crash with jnr-fuse and javafx
- WinFsp 1.12 doesn't pass the CI check
- Test failures on AWS Graviton (ARM, aarch64 GNU/Linux)
- Winfsp read callback random offset
- I can't get getxattr() working HOT 1
- -bash: cd : mydirectory: Input/output error HOT 1
- Path Problem with Windows HOT 6
- The wrapper.jar is stale. HOT 4
- Can't run in gradle HOT 2
- Multiple folders created by FUSE cannot be monitored at the same time HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jnr-fuse.