Summary
When writeback cache is enabled (default) and a FUSE_WRITE request returns an error (e.g., any I/O error), the temp file associated with the inode is never cleaned up until the kernel sends ForgetInode . This causes temp directory disk space to remain occupied indefinitely.
Root Cause
The issue is caused by an interaction between the Linux FUSE kernel module's writeback cache error handling and gcsfuse's temp file lifecycle management.
When FUSE_WRITE returns an error, the kernel sets AS_EIO in mapping->flags. On close(), fuse_flush() detects this via filemap_check_errors() and returns early — without sending FUSE_FLUSH to userspace
The temp file remains on disk, consuming space, until the kernel eventually sends ForgetInode (which depends on dentry cache eviction — unpredictable and potentially very long if the file still exists in the directory)
Summary
When writeback cache is enabled (default) and a FUSE_WRITE request returns an error (e.g., any I/O error), the temp file associated with the inode is never cleaned up until the kernel sends ForgetInode . This causes temp directory disk space to remain occupied indefinitely.
Root Cause
The issue is caused by an interaction between the Linux FUSE kernel module's writeback cache error handling and gcsfuse's temp file lifecycle management.
When FUSE_WRITE returns an error, the kernel sets AS_EIO in mapping->flags. On close(), fuse_flush() detects this via filemap_check_errors() and returns early — without sending FUSE_FLUSH to userspace
The temp file remains on disk, consuming space, until the kernel eventually sends ForgetInode (which depends on dentry cache eviction — unpredictable and potentially very long if the file still exists in the directory)