You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 16, 2023. It is now read-only.
to immediately follow dirent := *(*unix.Dirent)(unsafe.Pointer(&s.buf[s.bp])) as I thought that might be an oversight but this seemed to just cause an infinite recursion.
I added log.Println("getting dents", len(s.buf)) before the call to unix.Getdents to ensure that the buffer size was never zero, it is 4096, HOWEVER I noticed it only ever triggers once.
I added:
log.Println("exiting", s.bp)
Immediately before the return return nil, io.EOF and receive 2020/07/13 18:24:01 exiting 4080 which is not >= 4096 and thus never runs unix.Getdents more than once. I suspect this implies some sort of underflow or overflow issue in the code, but I'm not sure and I think this is beyond me.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I have a directory with 28,282,746 files in it on a CentOS system.
The file system is XFS which should easily be able to handle it.
I have essentially the following code trying to scan the file names from the directory
Code Example
however I am only getting 63 files listed.
I have been poking around in the
func (s *Stream) Read() (*unix.Dirent, error) {
method, the EOF I am receiving is fromI added a
log.Println("%#v", dirent)
just before the return and receivedWhich to my eye appears pretty uninitialized.
I tried moving
to immediately follow
dirent := *(*unix.Dirent)(unsafe.Pointer(&s.buf[s.bp]))
as I thought that might be an oversight but this seemed to just cause an infinite recursion.I added
log.Println("getting dents", len(s.buf))
before the call tounix.Getdents
to ensure that the buffer size was never zero, it is 4096, HOWEVER I noticed it only ever triggers once.I added:
Immediately before the return
return nil, io.EOF
and receive2020/07/13 18:24:01 exiting 4080
which is not >= 4096 and thus never runsunix.Getdents
more than once. I suspect this implies some sort of underflow or overflow issue in the code, but I'm not sure and I think this is beyond me.The text was updated successfully, but these errors were encountered: