jacobsa / fuse

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

Add support for the FUSE_BATCH_FORGET operation #123

Closed ironsmile closed 2 years ago

ironsmile commented 2 years ago

There are certain Kernel versions which do not send individual Forget operations after they receive "not implemented" for Batch Forget. One example is "5.4.0-110-generic" on Ubuntu 20.04. I am sure there are plenty of others.

This leads to inode "leaks". Where reference counts are never decreased and the inodes were left hanging around long after they are not needed any more.

The best way to fix that was adding support for batch operations to the lib. This way all users will be able to benefit from the batching optimization.

ironsmile commented 2 years ago

You are welcome! I've rebased it to the latest master from 9 minutes ago too. Hope it builds now 😄

stapelberg commented 2 years ago

Thanks!

vitalif commented 2 years ago

Thanks, I did just the same thing yesterday and today I discovered that it's already done here :))

One thing I want to add is #126