Bug 10340 - file/directory stat problem?
Summary: file/directory stat problem?
Status: NEW
Alias: None
Product: Samba 3.6
Classification: Unclassified
Component: SMB2 (show other bugs)
Version: 3.6.22
Hardware: All All
: P5 normal
Target Milestone: ---
Assignee: Jeremy Allison
QA Contact: Samba QA Contact
Depends on:
Reported: 2013-12-20 10:11 UTC by karmaforce
Modified: 2013-12-22 19:33 UTC (History)
0 users

See Also:

samba logs (361.91 KB, text/plain)
2013-12-22 17:49 UTC, karmaforce
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description karmaforce 2013-12-20 10:11:07 UTC
I used samba for 3 steps as follow:
1.mount a windows share directory to linux
2.samba shared the mounted direcotry.
3.when I delete a directory in client, I got errors in attachment file.
but the file really exsited in filesystem.
and some times , in window explorer, i event cant't get the file/dir icon. but after refresh again, everything is ok.
I saw stat function return st_nlink was 0, not 1. does stat the cifs filesystem  has st_nlink 0 right?
shell i do this? i do not check  st_nlink.
#define VALID_STAT(st) (true)
#define VALID_STAT_OF_DIR(st) (VALID_STAT(st) && S_ISDIR((st).st_ex_mode))
Comment 1 karmaforce 2013-12-20 10:13:04 UTC
erros at line 5714
Comment 2 Volker Lendecke 2013-12-21 10:33:58 UTC
No attachment around
Comment 3 karmaforce 2013-12-22 17:49:09 UTC
Created attachment 9544 [details]
samba logs
Comment 4 karmaforce 2013-12-22 19:33:40 UTC
I modified function vfswrap_stat in vfs_default.c like this:
after invoke sys_stat ,I do this:
 if(result == 0 && smb_fname->st.st_ex_nlink==0)
                smb_fname->st.st_ex_nlink = 1;
until now ,it looks like ok.
but i think this is now samba's bug,it is mount bug.for my client is windows.and i assume there is no symlink there.so