Bug 1222150
Summary: | readdirp return 64bits inodes even if enable-ino32 is set | ||||||
---|---|---|---|---|---|---|---|
Product: | [Community] GlusterFS | Reporter: | Cyril Peponnet <cyril> | ||||
Component: | fuse | Assignee: | Niels de Vos <ndevos> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | |||||
Severity: | high | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 3.5.2 | CC: | bugs, gluster-bugs, ndevos | ||||
Target Milestone: | --- | Keywords: | Patch, Triaged | ||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | glusterfs-3.5.4 | Doc Type: | Bug Fix | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | |||||||
: | 1223889 (view as bug list) | Environment: | |||||
Last Closed: | 2015-06-03 21:09:25 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | 1223889 | ||||||
Bug Blocks: | |||||||
Attachments: |
|
Description
Cyril Peponnet
2015-05-15 21:46:50 UTC
Created attachment 1027858 [details]
fuse: squash 64-bit inodes in readdirp when enable-ino32 is set
Compile tested only, needs real functional test and maybe a test-case too.
This bug needs to get cloned for the mainline version and the patch needs review+merging in the master branch before it can get included in 3.5.
I gave a try with RPMs generated through http://koji.fedoraproject.org/koji/taskinfo?taskID=9810286 Seems to work fine with enable-ino32 to mount options and use 32bit binary to call getdents syscall. Thanks ! For the record to test it you can compile: /* * * List directories using getdents() because ls, find and Python libraries * * use readdir() which is slower (but uses getdents() underneath. * * * * Compile with * * ]$ gcc getdents.c -o getdents * */ #define _GNU_SOURCE #include <dirent.h> /* Defines DT_* constants */ #include <fcntl.h> #include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <sys/stat.h> #include <sys/syscall.h> #define handle_error(msg) \ do { perror(msg); exit(EXIT_FAILURE); } while (0) struct linux_dirent { long d_ino; off_t d_off; unsigned short d_reclen; char d_name[]; }; #define BUF_SIZE 1024*1024*5 int main(int argc, char *argv[]) { int fd, nread; char buf[BUF_SIZE]; struct with gcc -m32 getdents getdents.c And run it like ./getdents /path/ Before the patch: strace -e getdents ./getdents /mnt/test/ [ Process PID=15906 runs in 32 bit mode. ] getdents(3, /* 1 entries */, 5242880) = 16 getdents(3, 0xff8f65bf, 5242880) = -1 EOVERFLOW (Value too large for defined data type) getdents: Value too large for defined data type +++ exited with 1 +++ REVIEW: http://review.gluster.org/10884 (fuse: squash 64-bit inodes in readdirp when enable-ino32 is set) posted (#1) for review on release-3.5 by Niels de Vos (ndevos) REVIEW: http://review.gluster.org/10884 (fuse: squash 64-bit inodes in readdirp when enable-ino32 is set) posted (#2) for review on release-3.5 by Niels de Vos (ndevos) This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.5.4, please reopen this bug report. glusterfs-3.5.4 has been announced on the Gluster Packaging mailinglist [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution. [1] http://thread.gmane.org/gmane.comp.file-systems.gluster.packaging/2 [2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user |