Fuse文件系统没有调用release

时间:2018-04-04 17:12:16

标签: c filesystems fuse

来自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回调吗?

0 个答案:

没有答案
相关问题