| Issue 1689: | getdents returning DT_UNKNOWN for type and wrong inode value | |
| 1 person starred this issue and may be notified of changes. | Back to list |
************************************************************
***** NOTE: THIS BUG TRACKER IS FOR GERRIT CODE REVIEW *****
***** DO NOT SUBMIT BUGS FOR CHROME, ANDROID, INTERNAL *****
***** ISSUES WITH YOUR COMPANY'S GERRIT SETUP, ETC. *****
***** THOSE ISSUE BELONG IN DIFFERENT ISSUE TRACKERS! *****
************************************************************
Description of problem:
d_type should contain the type of the the dir-entry (man 3 readdir). Currently the d_type is always set to DT_UNKNOWN (0)
Affected Version: 3.3.1
How to Reproduce:
Little test program taken from 'man 2 getdents' attached
Results over a FUSE mount (big inodes replaced by X):
[root@node1 tmp]# mount -t glusterfs node1:/replicated /mnt/replicated/
[root@node1 tmp]# /tmp/check-dirent-d_type /mnt/replicated/
--------------- nread=184 ---------------
i-node# file type d_reclen d_off d_name
X ??? 32 830133171 README
1 ??? 24 961315903 .
X ??? 32 1340999430 subdir.d
X ??? 32 1468041477 in-out.sock
X ??? 40 1962579926 setgid-test.sh
-1 ??? 24 2147483647 ..
Results over a NFS mount:
[root@node1 tmp]# mount -t nfs -o vers=3 node1:/replicated /mnt/dist-repl/
[root@node1 tmp]# /tmp/check-dirent-d_type /mnt/dist-repl/
--------------- nread=184 ---------------
i-node# file type d_reclen d_off d_name
X regular 32 1 README
1 directory 24 2 .
X directory 32 3 subdir.d
X socket 32 4 in-out.sock
X regular 40 5 setgid-test.sh
1 directory 24 6 ..
Looking into this further, it seems that NFS gathers the d_type even without patch 2. The NFS-server seems to use xlators/nfs/server/src/nfs3-helpers.c:nfs3_stat_to_fattr3() to fill the d_type and other attributes.
Please provide any additional information below.
This seems to be similar to bug https://bugzilla.redhat.com/show_bug.cgi?format=multiple&id=817785
Nov 28, 2012
Project Member
#1
edwin.ke...@gmail.com
Status:
Invalid
|
|
| ► Sign in to add a comment |