chaos / diod

Distributed I/O Daemon - a 9P file server
GNU General Public License v2.0
349 stars 56 forks source link

Worng fsid #32

Open justcsdr opened 7 years ago

justcsdr commented 7 years ago

On CentOS7 x64 the fsid passed to the remote client is wrong. It seams that f_fsid.__val[0] and f_fsid.val[1] are 64bit instead of 32, but the higher part is not 0 (actually is FFFFFFFF)... The attached patch repairs that. I don't know if it is needed for the FreeBSD __ branch. ops.c.patch.txt

garlick commented 7 years ago

Hmm. I'll need to do a little research and testing on this. What was the outward symptom, and how did you arrive at this fix?

It may be helpful to know which CentOS7 release and/or glibc and kernel versions were involved.

Thanks...

justcsdr commented 7 years ago

I was trying to understand why Samba's streams_depot isn't working (reliable) over 9P and at first I thought they were using fsid (in the meantime I have found out that they are using the backing-device major/minor ID). So I have compared the stat of the original directory and the remote mounted directory and the first part was identical but the last part was different (the remote part was all F). I have narrowed it down to that line after printing out (separately) f_fsid.__val[0], f_fsid.__val[1] and the resulting fsid. The parts were OK but the result was the same as the remote stat. (Sorry for the bad English)