来自the fuse docs我认为在关闭时,保险丝会调用释放。但是,对于我的filsystem来说,情况似乎并非如此。我已使用以下代码注册了我的发布功能:
static int my_release( const char *path, struct fuse_file_info *fi)
if(!strcmp(path, "/example"))
return -ENOENT;
LOGGING("RELEASED %ld\n", fi->fh); // fh field set by my_open
// Cleaning up some allocated buffers for fh here
return 0;
}
static struct fuse_operations fops = {
// ... other callbacks
.release = my_release,
}
我应该使用其他一些函数来实现close回调吗?