containerd / stargz-snapshotter

Fast container image distribution plugin with lazy pulling
https://github.com/containerd/containerd/issues/3731
Apache License 2.0
1.1k stars 110 forks source link

store: use Forgotten() for lifetime management with leveraging Initialized() for readiness check #1705

Open ktock opened 1 month ago

ktock commented 1 month ago

Fixes: #1599 Fixes: #1594

Thanks to @iain-macdonald 's patch for go-fuse (https://github.com/hanwen/go-fuse/pull/520), we can rely on Inode.Forgotten to check if that inode is reusable or not. This commit cherry-picks @iain-macdonald's patch to https://github.com/ktock/go-fuse/commit/f59a74eb644ad60f419be455498a183bcd1e1f4f and imports to stargz-snapshotter. That patch adds Initialized() method that can be used for checking the readiness of Forgotten() metehod and we can avoid the issues like https://github.com/hanwen/go-fuse/issues/504 and https://github.com/containerd/stargz-snapshotter/issues/1594 .