Messages in this thread | | | Date | Fri, 27 Feb 2004 11:28:40 -0800 (PST) | From | Linus Torvalds <> | Subject | Re: [PATCH] Add getdents32t syscall |
| |
On Thu, 26 Feb 2004, Jakub Jelinek wrote: > > Because no 32-bit getdents syscall provides this field to userland, > glibc needs to use getdents64 syscall even for 32-bit getdents > (and readdir etc.) and convert dirent entries from struct dirent64 > to struct dirent. The code is quite complicated and as the former > is bigger and the size of 64-bit dirents cannot be predicted accurately, > it can happen that glibc reads too many entries and has to seek back > on the dir etc.
Ok, I just committed the "add hidden d_type to the 32-bit getdents" thing, and I'd like to have people verify that it works (I just verified that it didn't break anything, but hey, nothing is using the data, so..)
However, the more I look at the above, the more confused I get. Your explanation simplty doesn't make any sense.
The thing is, it's _trivial_ to convert from the bigger format into the smaller format. It would be much harder to convert the other way. What's the problem with just using he getdents64 format and converting the data in-place?
Linus - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |