On Wed, 28 Feb 2007, Nicolas Pitre wrote: > > On Wed, 28 Feb 2007, Linus Torvalds wrote: > > > Well, if the return value was 0, it wasn't as odd any more, and the reason > > seems to be a file truncate error. Shawn seems to be on that one. > > > > (The "return 305 when asked for 207" seemed like a kernel bug, which was > > why I got really interested ;) > > I wouldn't dismiss a kernel bug just yet. > > Bill already said the same operation, when not performed over NFS, works > just fine. > > He also mentioned that version 1.4.4, which uses mmap() instead of > pread(), works also fine even over NFS. Hmm.. Good point. I'm addign Trond, Chuck and Neil to the list, just in case there might be some known problem where NFS might use f_pos instead of the passed-in position, causing problems with pread(). Not that I can imagine how that could even happen or not be noticed.. Guys, this is a oldish 2.6.x kernel: "2.6.9-34.0.2.ELsmp #1 SMP Fri Jul 7", and for some reason we have a file that appears truncated to pread() (returns 0) but worked with mmap and the same test-case apparently works on non-NFS filesystems. Any ideas? Some known bug that got fixed since? Bill, can you make the whole strace available somewhere? Linus - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html