-
Notifications
You must be signed in to change notification settings - Fork 69
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
open with O_RDWR not working correctly with overlay #80
Comments
FWIW I get the same thing on 6.1.0-060100rc5-generic kernel with squashfuse 0.1.103 |
I was running I've also recreated with tag 0.1.105. 0.1.105 actually gives Function not implemented for both |
A bit simpler, we can reproduce with just open and O_RDWR. Using the following for test-openat.c we get the output below. #include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
int main(int argc, char* argv[]) {
int fd = 0, errors = 0;
for (int i=1; i<argc;i++) {
fd = open(argv[i], O_RDWR, 0640);
if (fd < 0) {
printf("%s: %d: %s\n", argv[i], fd, strerror(errno));
errors++;
} else {
printf("%s: %d\n", argv[i], fd);
}
close(fd);
}
return errors;
} log:
|
Hm, when I look at squashfuse debug output, it tells me:
48000 is 44000 which is O_DIRECT|O_NONBLOCK, which doesn't make any sense. |
I built squashfuse against libfuse3, and then built a local copy of libfuse3. Based on @hallyn 's comment above and git log, I'm guessing the fix is libfuse/libfuse@4df0871 . I have not bisected that though. So I guess I'm going to close this issue, as it is not squashfuse's problem. I will probably open an ubuntu bug and chase getting the fix in there. I'll provide a link at that point. |
I filed debian bug 1025706 and submitted a patch there. There is more info project-stacker/stacker#350 (comment) . The tldr: this is fixed by linking to recent version of fuse3. Ubuntu 22.10 has a fix. Backports of fix are available in https://launchpad.net/~puzzleos/+archive/ubuntu/dev. |
Fix builds of the rpm and deb packages after bundling of squashfuse. * Add additional dependencies for squashfuse compilation across CI, packaging, and INSTALL.md. * Adapt mlocal frag for CFLAGS set by distros which cause squashfuse compilation to fail. Using fuse3 to build squashfuse would be nicer... but is blocked by a bug present in the fuse3 version provided by many distros including Ubuntu 22.04 & 20.04: vasi/squashfuse#80
Fix builds of the rpm and deb packages after bundling of squashfuse. * Add additional dependencies for squashfuse compilation across CI, packaging, and INSTALL.md. * Adapt mlocal frag for CFLAGS set by distros which cause squashfuse compilation to fail. Using fuse3 to build squashfuse would be nicer... but is blocked by a bug present in the fuse3 version provided by many distros including Ubuntu 22.04 & 20.04: vasi/squashfuse#80
Fix builds of the rpm and deb packages after bundling of squashfuse. * Add additional dependencies for squashfuse compilation across CI, packaging, and INSTALL.md. * Adapt mlocal frag for CFLAGS set by distros which cause squashfuse compilation to fail. Using fuse3 to build squashfuse would be nicer... but is blocked by a bug present in the fuse3 version provided by many distros including Ubuntu 22.04 & 20.04: vasi/squashfuse#80
Fix builds of the rpm and deb packages after bundling of squashfuse. * Add additional dependencies for squashfuse compilation across CI, packaging, and INSTALL.md. * Adapt mlocal frag for CFLAGS set by distros which cause squashfuse compilation to fail. Using fuse3 to build squashfuse would be nicer... but is blocked by a bug present in the fuse3 version provided by many distros including Ubuntu 22.04 & 20.04: vasi/squashfuse#80
Fix builds of the rpm and deb packages after bundling of squashfuse. * Add additional dependencies for squashfuse compilation across CI, packaging, and INSTALL.md. * Adapt mlocal frag for CFLAGS set by distros which cause squashfuse compilation to fail. Using fuse3 to build squashfuse would be nicer... but is blocked by a bug present in the fuse3 version provided by many distros including Ubuntu 22.04 & 20.04: vasi/squashfuse#80
Fix builds of the rpm and deb packages after bundling of squashfuse. * Add additional dependencies for squashfuse compilation across CI, packaging, and INSTALL.md. * Adapt mlocal frag for CFLAGS set by distros which cause squashfuse compilation to fail. Using fuse3 to build squashfuse would be nicer... but is blocked by a bug present in the fuse3 version provided by many distros including Ubuntu 22.04 & 20.04: vasi/squashfuse#80
I'm trying to use squashfuse with overlay mounts and having a problem with 'openat' and 'AT_FDCWD'.
Real world situation was when trying to run 'apt-get install' where an strace showed:
I have a recreate here recreate.zip.
There are 3 files in the zip:
cc -o test-openat test-openat.c
The result is something like this:
You can run
test-squash-overlay.sh
with the KERNELMOUNT environment variable set to 'true' and it will do a kernel mount rather than a squashfuse mount. If you do that, the overlay works as desired.The text was updated successfully, but these errors were encountered: