ipfs / kubo

An IPFS implementation in Go
https://docs.ipfs.tech/how-to/command-line-quick-start/
Other
16.13k stars 3.01k forks source link

Fuse problems. #1741

Closed spikebike closed 4 years ago

spikebike commented 9 years ago

I'm running ubuntu 14.04 LTS with "AgentVersion": "go-ipfs/0.3.8-dev".

Someone on #ipfs posted an xkcd archive and:

kona:/ipfs/QmPVP4sDre9rtYahGvcjv3Fqet3oQyqrH5xS33d4YBVFme/101 - Laser Scope$ time ls -al
ls: cannot access 101 - Laser Scope - alt.txt: No such file or directory
ls: cannot access 101 - Laser Scope - transcript.txt: No such file or directory
total 0
-????????? ? ?    ?        ?            ? 101 - Laser Scope - alt.txt
-r--r--r-- 0 bill bill 36009 Aug 30  1754 101 - Laser Scope.png
-????????? ? ?    ?        ?            ? 101 - Laser Scope - transcript.txt

real    2m0.011s
user    0m0.002s
sys 0m0.002s

Another example:
kona:/ipfs/QmPVP4sDre9rtYahGvcjv3Fqet3oQyqrH5xS33d4YBVFme$ ls -al
ls: cannot access 1056 - Felidae: No such file or directory
ls: cannot access 1057 - Klout: No such file or directory
ls: cannot access 1058 - Old-Timers: No such file or directory
ls: cannot access 1059 - Bel-Air: No such file or directory
ls: cannot access 106 - Wright Brothers: No such file or directory
ls: cannot access 1060 - Crowdsourcing: No such file or directory
ls: cannot access 1061 - EST: No such file or directory
[snip 100s of lines]
otal 0
dr-xr-xr-x 0 bill bill 0 Aug 30  1754 1000 - 1000 Comics
dr-xr-xr-x 0 bill bill 0 Aug 30  1754 1001 - AAAAAA
dr-xr-xr-x 0 bill bill 0 Aug 30  1754 1002 - Game AIs
dr-xr-xr-x 0 bill bill 0 Aug 30  1754 1003 - Adam and Eve
dr-xr-xr-x 0 bill bill 0 Aug 30  1754 1004 - Batman
dr-xr-xr-x 0 bill bill 0 Aug 30  1754 1005 - SOPA
dr-xr-xr-x 0 bill bill 0 Aug 30  1754 1006 - Sloppier Than Fiction
[snip dozens of lines]
-????????? ? ?    ?    ?            ? 1056 - Felidae
-????????? ? ?    ?    ?            ? 1057 - Klout
-????????? ? ?    ?    ?            ? 1058 - Old-Timers
-????????? ? ?    ?    ?            ? 1059 - Bel-Air
dr-xr-xr-x 0 bill bill 0 Aug 30  1754 105 - Parallel Universe
-????????? ? ?    ?    ?            ? 1060 - Crowdsourcing
-????????? ? ?    ?    ?            ? 1061 - EST
-????????? ? ?    ?    ?            ? 1062 - Budget News
-????????? ? ?    ?    ?            ? 1063 - Kill Hitler
-????????? ? ?    ?    ?            ? 1064 - Front Door
-????????? ? ?    ?    ?            ? 1065 - Shoes
-????????? ? ?    ?    ?            ? 1066 - Laundry
-????????? ? ?    ?    ?            ? 1067 - Pressures
-????????? ? ?    ?    ?            ? 1068 - Swiftkey
-????????? ? ?    ?    ?            ? 1069 - Alphabet
-????????? ? ?    ?    ?            ? 106 - Wright Brothe

kona:/ipfs/QmPVP4sDre9rtYahGvcjv3Fqet3oQyqrH5xS33d4YBVFme$ time cd "958 - Hotels"
bash: cd: 958 - Hotels: No such file or directory
real    3m0.006s
user    0m0.000s
sys 0m0.000s
kona:/ipfs/QmPVP4sDre9rtYahGvcjv3Fqet3oQyqrH5xS33d4YBVFme$ 
kona:/ipfs/QmPVP4sDre9rtYahGvcjv3Fqet3oQyqrH5xS33d4YBVFme$ ls | grep 958
958 - Hotels
whyrusleeping commented 9 years ago

It appears that the issue here is that the fuse interface doesnt handle timeouts very well. I'm not really sure what the best way to go about this is... @tv42 any advice?

tv42 commented 9 years ago

@whyrusleeping What do you mean by timeouts; what do you do when you see a timeout?

You have two choices:

  1. Only time out when the file system client asks for it (e.g. user hits control-C); you'll see the fuse request context be cancelled.
  2. Pick an error, return it, and live with it. ESTALE comes to mind.

Option 1 is better, because it doesn't cause spurious errors.