jacobsa / fuse

A Go package for implementing a FUSE file system.
Apache License 2.0
487 stars 106 forks source link

alpine getdents64 lost direntries #133

Open chengyu-l opened 1 year ago

chengyu-l commented 1 year ago

I run a fuse client in alpine docker container, and then execute "ls -alh |wc -l " command. I found some directories were discarded.

the reason I guess: alpine linux getdents64 buffer size is 2048 byte, and jacobsa fuse is 4096 byte (op.Dst length), alpine cannot hold all the data, so it discards some.

Recurrence steps: create 5000 files in one directory, mount a client in alpine linux, execute "ls -alh |wc -l " command

Other: If I write less data each time(like 64 direntries)when the kenernl call ReadDir function, there will be no problem

chengyu-l commented 1 year ago

@stapelberg can you help me?

stapelberg commented 1 year ago

No, I don’t have time to help with this, sorry. But, if you can figure out a fix, I can review your PR.

ashmeenkaur commented 1 year ago

Seems to be duplicate of https://github.com/GoogleCloudPlatform/gcsfuse/issues/1054 which was fixed in GCSFuse version 0.42.4 @chengyu-l can you check if you are still facing this error with latest GCSFuse version?