+ exfat_debug("[%s] %s", __func__, path);
+ exfat_put_node(&ef, get_node(fi));
+ return 0;
+}
+
+static int fuse_exfat_read(const char* path, char* buffer, size_t size,
+ off_t offset, struct fuse_file_info* fi)
+{
+ ssize_t ret;
+
+ exfat_debug("[%s] %s (%zu bytes)", __func__, path, size);
+ ret = exfat_generic_pread(&ef, get_node(fi), buffer, size, offset);
+ if (ret < 0)
+ return -EIO;
+ return ret;
+}
+
+static int fuse_exfat_write(const char* path, const char* buffer, size_t size,
+ off_t offset, struct fuse_file_info* fi)
+{
+ ssize_t ret;
+
+ exfat_debug("[%s] %s (%zu bytes)", __func__, path, size);
+ ret = exfat_generic_pwrite(&ef, get_node(fi), buffer, size, offset);
+ if (ret < 0)
+ return -EIO;
+ return ret;
+}
+
+static int fuse_exfat_unlink(const char* path)
+{
+ struct exfat_node* node;
+ int rc;
+
+ exfat_debug("[%s] %s", __func__, path);
+
+ rc = exfat_lookup(&ef, &node, path);
+ if (rc != 0)
+ return rc;
+
+ rc = exfat_unlink(&ef, node);
+ exfat_put_node(&ef, node);
+ return rc;
+}
+
+static int fuse_exfat_rmdir(const char* path)
+{
+ struct exfat_node* node;
+ int rc;
+
+ exfat_debug("[%s] %s", __func__, path);
+
+ rc = exfat_lookup(&ef, &node, path);
+ if (rc != 0)
+ return rc;
+
+ rc = exfat_rmdir(&ef, node);
+ exfat_put_node(&ef, node);
+ return rc;
+}
+
+static int fuse_exfat_mknod(const char* path, mode_t mode, dev_t dev)
+{
+ exfat_debug("[%s] %s 0%ho", __func__, path, mode);
+ return exfat_mknod(&ef, path);
+}
+
+static int fuse_exfat_mkdir(const char* path, mode_t mode)
+{
+ exfat_debug("[%s] %s 0%ho", __func__, path, mode);
+ return exfat_mkdir(&ef, path);
+}
+
+static int fuse_exfat_rename(const char* old_path, const char* new_path)
+{
+ exfat_debug("[%s] %s => %s", __func__, old_path, new_path);
+ return exfat_rename(&ef, old_path, new_path);
+}
+
+static int fuse_exfat_utimens(const char* path, const struct timespec tv[2])
+{
+ struct exfat_node* node;
+ int rc;
+
+ exfat_debug("[%s] %s", __func__, path);
+
+ rc = exfat_lookup(&ef, &node, path);
+ if (rc != 0)
+ return rc;
+
+ exfat_utimes(node, tv);
+ exfat_put_node(&ef, node);