-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
arm support #13
Comments
Tests are trying to get a size of a structure and compare with native size. I used C++ program to understand expected size of the structure. |
flock size is '16' Still trying to figure out where bufvec is defined... |
Is it "flock" from <fcntl.h> and "fuse_bufvec" from <fuse/fuse_common.h>? |
Including "fuse/fuse.h" gave me this error: At the same time using that flag changed the size of "flock" from 16 to 32... |
Now to me it looks like this field ru.serce.jnrfuse.struct.FuseBuf#fd may cause wrong behavior. But in general, if you have wrong behavior in your program it is better to enable debug and look for output. Can you attach debugging logs with the problem? |
Ok, I am getting two different results for "flock" (fuse/fuse.h can only be included with -D_FILE_OFFSET_BITS=64). My guess here is that the first one is compiled wrong, because l_start and l_len are 32 bit, which limits the file access to 4G, which does not make sense. In the second case I see a 4-byte padding between "l_whence" and "l_start" and a 4-byte padding at the end of the structure.
and
|
Frankly, I don't feel like Flock structure can affect basic operations with FS. You mentioned that basic operations performed incorrectly (so the size is 0). |
Similarly, for fuse_bufvec there is a 4-byte padding between "fuse_bufvec.off" and "fuse_bufvec.buf". Does this make sense?
|
FuseBufVec is also used only in write_buf call which is disabled by default. We need to look only for overridden methods in MemoryFS class. I think it is important to check debugging logs and FileStat structure. |
Yup, that will be the next step. In the meantime, you are using "Struct.size" to get a size of a structure: how do I get size for a field? I will have to eventually check every single field and paddings... |
You can use offset() method new FileStat(Runtime.getSystemRuntime()).st_ino.offset() |
So use offset for the fields and offset for the paddings... Ok, that might work... |
Turned out to be much more work than I expected so decided to go with fuse-jna instead: it already supports arm... |
@fantom-x, you can also try https://github.com/puniverse/javafs instead. I have no information about the state of that project, but, as far as I know, it tried to combine architecture of fuse-jna with JNR. |
HI, I would like to make jnr-fuse run on an ARM 32-bit board. I can now compile it and start MemoryFS app. I can see the mount, directories, and files. But the file sizes are zero. Trying to copy a file into it creates a zero-size file. "rm" and "mkdir" work. So it looks like it is almost there, except for the file sizes at this time, although there could be more issues.
Two size tests are failing: testFlock (expected:<24> but was:<28>) & testFuseBufvec (expected:<36> but was:<40>).
I will make the changes and test myself if you provide some directions.
The text was updated successfully, but these errors were encountered: