aboutsummaryrefslogtreecommitdiff
path: root/lib/fuse_lowlevel.c
diff options
context:
space:
mode:
authorGravatar Nikolaus Rath <Nikolaus@rath.org>2016-10-04 20:38:47 -0700
committerGravatar Nikolaus Rath <Nikolaus@rath.org>2016-10-04 20:47:26 -0700
commit161dc8d7243a82d7287a4370fcd94e9a0da4f812 (patch)
tree58e225457391f39d601957699cd7ed9b4059b25d /lib/fuse_lowlevel.c
parent2ed7af90879eabbaed1cc063b3aded73588d9b08 (diff)
Merge fuse_ll into fuse_session (part 2)
Replaced all references to req->f with req->se.
Diffstat (limited to 'lib/fuse_lowlevel.c')
-rw-r--r--lib/fuse_lowlevel.c230
1 files changed, 115 insertions, 115 deletions
diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c
index 26c1461..75ffae1 100644
--- a/lib/fuse_lowlevel.c
+++ b/lib/fuse_lowlevel.c
@@ -129,7 +129,7 @@ static void destroy_req(fuse_req_t req)
void fuse_free_req(fuse_req_t req)
{
int ctr;
- struct fuse_session *f = req->f;
+ struct fuse_session *f = req->se;
pthread_mutex_lock(&f->lock);
req->u.ni.func = NULL;
@@ -151,7 +151,7 @@ static struct fuse_req *fuse_ll_alloc_req(struct fuse_session *se)
if (req == NULL) {
fprintf(stderr, "fuse: failed to allocate request\n");
} else {
- req->f = se->f;
+ req->se = se->f;
req->se = se;
req->ctr = 1;
list_init_req(req);
@@ -400,12 +400,12 @@ static void fill_open(struct fuse_open_out *arg,
int fuse_reply_entry(fuse_req_t req, const struct fuse_entry_param *e)
{
struct fuse_entry_out arg;
- size_t size = req->f->conn.proto_minor < 9 ?
+ size_t size = req->se->conn.proto_minor < 9 ?
FUSE_COMPAT_ENTRY_OUT_SIZE : sizeof(arg);
/* before ABI 7.4 e->ino == 0 was invalid, only ENOENT meant
negative entry */
- if (!e->ino && req->f->conn.proto_minor < 4)
+ if (!e->ino && req->se->conn.proto_minor < 4)
return fuse_reply_err(req, ENOENT);
memset(&arg, 0, sizeof(arg));
@@ -417,7 +417,7 @@ int fuse_reply_create(fuse_req_t req, const struct fuse_entry_param *e,
const struct fuse_file_info *f)
{
char buf[sizeof(struct fuse_entry_out) + sizeof(struct fuse_open_out)];
- size_t entrysize = req->f->conn.proto_minor < 9 ?
+ size_t entrysize = req->se->conn.proto_minor < 9 ?
FUSE_COMPAT_ENTRY_OUT_SIZE : sizeof(struct fuse_entry_out);
struct fuse_entry_out *earg = (struct fuse_entry_out *) buf;
struct fuse_open_out *oarg = (struct fuse_open_out *) (buf + entrysize);
@@ -433,7 +433,7 @@ int fuse_reply_attr(fuse_req_t req, const struct stat *attr,
double attr_timeout)
{
struct fuse_attr_out arg;
- size_t size = req->f->conn.proto_minor < 9 ?
+ size_t size = req->se->conn.proto_minor < 9 ?
FUSE_COMPAT_ATTR_OUT_SIZE : sizeof(arg);
memset(&arg, 0, sizeof(arg));
@@ -844,7 +844,7 @@ int fuse_reply_data(fuse_req_t req, struct fuse_bufvec *bufv,
int fuse_reply_statfs(fuse_req_t req, const struct statvfs *stbuf)
{
struct fuse_statfs_out arg;
- size_t size = req->f->conn.proto_minor < 4 ?
+ size_t size = req->se->conn.proto_minor < 4 ?
FUSE_COMPAT_STATFS_SIZE : sizeof(arg);
memset(&arg, 0, sizeof(arg));
@@ -927,7 +927,7 @@ int fuse_reply_ioctl_retry(fuse_req_t req,
iov[count].iov_len = sizeof(arg);
count++;
- if (req->f->conn.proto_minor < 16) {
+ if (req->se->conn.proto_minor < 16) {
if (in_count) {
iov[count].iov_base = (void *)in_iov;
iov[count].iov_len = sizeof(in_iov[0]) * in_count;
@@ -1037,8 +1037,8 @@ static void do_lookup(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
{
char *name = (char *) inarg;
- if (req->f->op.lookup)
- req->f->op.lookup(req, nodeid, name);
+ if (req->se->op.lookup)
+ req->se->op.lookup(req, nodeid, name);
else
fuse_reply_err(req, ENOSYS);
}
@@ -1047,8 +1047,8 @@ static void do_forget(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
{
struct fuse_forget_in *arg = (struct fuse_forget_in *) inarg;
- if (req->f->op.forget)
- req->f->op.forget(req, nodeid, arg->nlookup);
+ if (req->se->op.forget)
+ req->se->op.forget(req, nodeid, arg->nlookup);
else
fuse_reply_none(req);
}
@@ -1062,10 +1062,10 @@ static void do_batch_forget(fuse_req_t req, fuse_ino_t nodeid,
(void) nodeid;
- if (req->f->op.forget_multi) {
- req->f->op.forget_multi(req, arg->count,
+ if (req->se->op.forget_multi) {
+ req->se->op.forget_multi(req, arg->count,
(struct fuse_forget_data *) param);
- } else if (req->f->op.forget) {
+ } else if (req->se->op.forget) {
for (i = 0; i < arg->count; i++) {
struct fuse_forget_one *forget = &param[i];
struct fuse_req *dummy_req;
@@ -1078,7 +1078,7 @@ static void do_batch_forget(fuse_req_t req, fuse_ino_t nodeid,
dummy_req->ctx = req->ctx;
dummy_req->ch = NULL;
- req->f->op.forget(dummy_req, forget->nodeid,
+ req->se->op.forget(dummy_req, forget->nodeid,
forget->nlookup);
}
fuse_reply_none(req);
@@ -1092,7 +1092,7 @@ static void do_getattr(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
struct fuse_file_info *fip = NULL;
struct fuse_file_info fi;
- if (req->f->conn.proto_minor >= 9) {
+ if (req->se->conn.proto_minor >= 9) {
struct fuse_getattr_in *arg = (struct fuse_getattr_in *) inarg;
if (arg->getattr_flags & FUSE_GETATTR_FH) {
@@ -1102,8 +1102,8 @@ static void do_getattr(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
}
}
- if (req->f->op.getattr)
- req->f->op.getattr(req, nodeid, fip);
+ if (req->se->op.getattr)
+ req->se->op.getattr(req, nodeid, fip);
else
fuse_reply_err(req, ENOSYS);
}
@@ -1112,7 +1112,7 @@ static void do_setattr(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
{
struct fuse_setattr_in *arg = (struct fuse_setattr_in *) inarg;
- if (req->f->op.setattr) {
+ if (req->se->op.setattr) {
struct fuse_file_info *fi = NULL;
struct fuse_file_info fi_store;
struct stat stbuf;
@@ -1135,7 +1135,7 @@ static void do_setattr(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
FUSE_SET_ATTR_MTIME_NOW |
FUSE_SET_ATTR_CTIME;
- req->f->op.setattr(req, nodeid, &stbuf, arg->valid, fi);
+ req->se->op.setattr(req, nodeid, &stbuf, arg->valid, fi);
} else
fuse_reply_err(req, ENOSYS);
}
@@ -1144,8 +1144,8 @@ static void do_access(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
{
struct fuse_access_in *arg = (struct fuse_access_in *) inarg;
- if (req->f->op.access)
- req->f->op.access(req, nodeid, arg->mask);
+ if (req->se->op.access)
+ req->se->op.access(req, nodeid, arg->mask);
else
fuse_reply_err(req, ENOSYS);
}
@@ -1154,8 +1154,8 @@ static void do_readlink(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
{
(void) inarg;
- if (req->f->op.readlink)
- req->f->op.readlink(req, nodeid);
+ if (req->se->op.readlink)
+ req->se->op.readlink(req, nodeid);
else
fuse_reply_err(req, ENOSYS);
}
@@ -1165,13 +1165,13 @@ static void do_mknod(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
struct fuse_mknod_in *arg = (struct fuse_mknod_in *) inarg;
char *name = PARAM(arg);
- if (req->f->conn.proto_minor >= 12)
+ if (req->se->conn.proto_minor >= 12)
req->ctx.umask = arg->umask;
else
name = (char *) inarg + FUSE_COMPAT_MKNOD_IN_SIZE;
- if (req->f->op.mknod)
- req->f->op.mknod(req, nodeid, name, arg->mode, arg->rdev);
+ if (req->se->op.mknod)
+ req->se->op.mknod(req, nodeid, name, arg->mode, arg->rdev);
else
fuse_reply_err(req, ENOSYS);
}
@@ -1180,11 +1180,11 @@ static void do_mkdir(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
{
struct fuse_mkdir_in *arg = (struct fuse_mkdir_in *) inarg;
- if (req->f->conn.proto_minor >= 12)
+ if (req->se->conn.proto_minor >= 12)
req->ctx.umask = arg->umask;
- if (req->f->op.mkdir)
- req->f->op.mkdir(req, nodeid, PARAM(arg), arg->mode);
+ if (req->se->op.mkdir)
+ req->se->op.mkdir(req, nodeid, PARAM(arg), arg->mode);
else
fuse_reply_err(req, ENOSYS);
}
@@ -1193,8 +1193,8 @@ static void do_unlink(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
{
char *name = (char *) inarg;
- if (req->f->op.unlink)
- req->f->op.unlink(req, nodeid, name);
+ if (req->se->op.unlink)
+ req->se->op.unlink(req, nodeid, name);
else
fuse_reply_err(req, ENOSYS);
}
@@ -1203,8 +1203,8 @@ static void do_rmdir(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
{
char *name = (char *) inarg;
- if (req->f->op.rmdir)
- req->f->op.rmdir(req, nodeid, name);
+ if (req->se->op.rmdir)
+ req->se->op.rmdir(req, nodeid, name);
else
fuse_reply_err(req, ENOSYS);
}
@@ -1214,8 +1214,8 @@ static void do_symlink(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
char *name = (char *) inarg;
char *linkname = ((char *) inarg) + strlen((char *) inarg) + 1;
- if (req->f->op.symlink)
- req->f->op.symlink(req, linkname, nodeid, name);
+ if (req->se->op.symlink)
+ req->se->op.symlink(req, linkname, nodeid, name);
else
fuse_reply_err(req, ENOSYS);
}
@@ -1226,8 +1226,8 @@ static void do_rename(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
char *oldname = PARAM(arg);
char *newname = oldname + strlen(oldname) + 1;
- if (req->f->op.rename)
- req->f->op.rename(req, nodeid, oldname, arg->newdir, newname,
+ if (req->se->op.rename)
+ req->se->op.rename(req, nodeid, oldname, arg->newdir, newname,
0);
else
fuse_reply_err(req, ENOSYS);
@@ -1239,8 +1239,8 @@ static void do_rename2(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
char *oldname = PARAM(arg);
char *newname = oldname + strlen(oldname) + 1;
- if (req->f->op.rename)
- req->f->op.rename(req, nodeid, oldname, arg->newdir, newname,
+ if (req->se->op.rename)
+ req->se->op.rename(req, nodeid, oldname, arg->newdir, newname,
arg->flags);
else
fuse_reply_err(req, ENOSYS);
@@ -1250,8 +1250,8 @@ static void do_link(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
{
struct fuse_link_in *arg = (struct fuse_link_in *) inarg;
- if (req->f->op.link)
- req->f->op.link(req, arg->oldnodeid, nodeid, PARAM(arg));
+ if (req->se->op.link)
+ req->se->op.link(req, arg->oldnodeid, nodeid, PARAM(arg));
else
fuse_reply_err(req, ENOSYS);
}
@@ -1260,19 +1260,19 @@ static void do_create(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
{
struct fuse_create_in *arg = (struct fuse_create_in *) inarg;
- if (req->f->op.create) {
+ if (req->se->op.create) {
struct fuse_file_info fi;
char *name = PARAM(arg);
memset(&fi, 0, sizeof(fi));
fi.flags = arg->flags;
- if (req->f->conn.proto_minor >= 12)
+ if (req->se->conn.proto_minor >= 12)
req->ctx.umask = arg->umask;
else
name = (char *) inarg + sizeof(struct fuse_open_in);
- req->f->op.create(req, nodeid, name, arg->mode, &fi);
+ req->se->op.create(req, nodeid, name, arg->mode, &fi);
} else
fuse_reply_err(req, ENOSYS);
}
@@ -1285,8 +1285,8 @@ static void do_open(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
memset(&fi, 0, sizeof(fi));
fi.flags = arg->flags;
- if (req->f->op.open)
- req->f->op.open(req, nodeid, &fi);
+ if (req->se->op.open)
+ req->se->op.open(req, nodeid, &fi);
else
fuse_reply_open(req, &fi);
}
@@ -1295,16 +1295,16 @@ static void do_read(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
{
struct fuse_read_in *arg = (struct fuse_read_in *) inarg;
- if (req->f->op.read) {
+ if (req->se->op.read) {
struct fuse_file_info fi;
memset(&fi, 0, sizeof(fi));
fi.fh = arg->fh;
- if (req->f->conn.proto_minor >= 9) {
+ if (req->se->conn.proto_minor >= 9) {
fi.lock_owner = arg->lock_owner;
fi.flags = arg->flags;
}
- req->f->op.read(req, nodeid, arg->size, arg->offset, &fi);
+ req->se->op.read(req, nodeid, arg->size, arg->offset, &fi);
} else
fuse_reply_err(req, ENOSYS);
}
@@ -1319,7 +1319,7 @@ static void do_write(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
fi.fh = arg->fh;
fi.writepage = (arg->write_flags & 1) != 0;
- if (req->f->conn.proto_minor < 9) {
+ if (req->se->conn.proto_minor < 9) {
param = ((char *) arg) + FUSE_COMPAT_WRITE_IN_SIZE;
} else {
fi.lock_owner = arg->lock_owner;
@@ -1327,8 +1327,8 @@ static void do_write(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
param = PARAM(arg);
}
- if (req->f->op.write)
- req->f->op.write(req, nodeid, param, arg->size,
+ if (req->se->op.write)
+ req->se->op.write(req, nodeid, param, arg->size,
arg->offset, &fi);
else
fuse_reply_err(req, ENOSYS);
@@ -1337,7 +1337,7 @@ static void do_write(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
static void do_write_buf(fuse_req_t req, fuse_ino_t nodeid, const void *inarg,
const struct fuse_buf *ibuf)
{
- struct fuse_session *f = req->f;
+ struct fuse_session *f = req->se;
struct fuse_bufvec bufv = {
.buf[0] = *ibuf,
.count = 1,
@@ -1349,7 +1349,7 @@ static void do_write_buf(fuse_req_t req, fuse_ino_t nodeid, const void *inarg,
fi.fh = arg->fh;
fi.writepage = arg->write_flags & 1;
- if (req->f->conn.proto_minor < 9) {
+ if (req->se->conn.proto_minor < 9) {
bufv.buf[0].mem = ((char *) arg) + FUSE_COMPAT_WRITE_IN_SIZE;
bufv.buf[0].size -= sizeof(struct fuse_in_header) +
FUSE_COMPAT_WRITE_IN_SIZE;
@@ -1370,7 +1370,7 @@ static void do_write_buf(fuse_req_t req, fuse_ino_t nodeid, const void *inarg,
}
bufv.buf[0].size = arg->size;
- req->f->op.write_buf(req, nodeid, &bufv, arg->offset, &fi);
+ req->se->op.write_buf(req, nodeid, &bufv, arg->offset, &fi);
out:
/* Need to reset the pipe if ->write_buf() didn't consume all data */
@@ -1386,11 +1386,11 @@ static void do_flush(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
memset(&fi, 0, sizeof(fi));
fi.fh = arg->fh;
fi.flush = 1;
- if (req->f->conn.proto_minor >= 7)
+ if (req->se->conn.proto_minor >= 7)
fi.lock_owner = arg->lock_owner;
- if (req->f->op.flush)
- req->f->op.flush(req, nodeid, &fi);
+ if (req->se->op.flush)
+ req->se->op.flush(req, nodeid, &fi);
else
fuse_reply_err(req, ENOSYS);
}
@@ -1403,7 +1403,7 @@ static void do_release(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
memset(&fi, 0, sizeof(fi));
fi.flags = arg->flags;
fi.fh = arg->fh;
- if (req->f->conn.proto_minor >= 8) {
+ if (req->se->conn.proto_minor >= 8) {
fi.flush = (arg->release_flags & FUSE_RELEASE_FLUSH) ? 1 : 0;
fi.lock_owner = arg->lock_owner;
}
@@ -1412,8 +1412,8 @@ static void do_release(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
fi.lock_owner = arg->lock_owner;
}
- if (req->f->op.release)
- req->f->op.release(req, nodeid, &fi);
+ if (req->se->op.release)
+ req->se->op.release(req, nodeid, &fi);
else
fuse_reply_err(req, 0);
}
@@ -1426,8 +1426,8 @@ static void do_fsync(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
memset(&fi, 0, sizeof(fi));
fi.fh = arg->fh;
- if (req->f->op.fsync)
- req->f->op.fsync(req, nodeid, arg->fsync_flags & 1, &fi);
+ if (req->se->op.fsync)
+ req->se->op.fsync(req, nodeid, arg->fsync_flags & 1, &fi);
else
fuse_reply_err(req, ENOSYS);
}
@@ -1440,8 +1440,8 @@ static void do_opendir(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
memset(&fi, 0, sizeof(fi));
fi.flags = arg->flags;
- if (req->f->op.opendir)
- req->f->op.opendir(req, nodeid, &fi);
+ if (req->se->op.opendir)
+ req->se->op.opendir(req, nodeid, &fi);
else
fuse_reply_open(req, &fi);
}
@@ -1454,8 +1454,8 @@ static void do_readdir(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
memset(&fi, 0, sizeof(fi));
fi.fh = arg->fh;
- if (req->f->op.readdir)
- req->f->op.readdir(req, nodeid, arg->size, arg->offset, &fi);
+ if (req->se->op.readdir)
+ req->se->op.readdir(req, nodeid, arg->size, arg->offset, &fi);
else
fuse_reply_err(req, ENOSYS);
}
@@ -1468,8 +1468,8 @@ static void do_readdirplus(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
memset(&fi, 0, sizeof(fi));
fi.fh = arg->fh;
- if (req->f->op.readdirplus)
- req->f->op.readdirplus(req, nodeid, arg->size, arg->offset, &fi);
+ if (req->se->op.readdirplus)
+ req->se->op.readdirplus(req, nodeid, arg->size, arg->offset, &fi);
else
fuse_reply_err(req, ENOSYS);
}
@@ -1483,8 +1483,8 @@ static void do_releasedir(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
fi.flags = arg->flags;
fi.fh = arg->fh;
- if (req->f->op.releasedir)
- req->f->op.releasedir(req, nodeid, &fi);
+ if (req->se->op.releasedir)
+ req->se->op.releasedir(req, nodeid, &fi);
else
fuse_reply_err(req, 0);
}
@@ -1497,8 +1497,8 @@ static void do_fsyncdir(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
memset(&fi, 0, sizeof(fi));
fi.fh = arg->fh;
- if (req->f->op.fsyncdir)
- req->f->op.fsyncdir(req, nodeid, arg->fsync_flags & 1, &fi);
+ if (req->se->op.fsyncdir)
+ req->se->op.fsyncdir(req, nodeid, arg->fsync_flags & 1, &fi);
else
fuse_reply_err(req, ENOSYS);
}
@@ -1508,8 +1508,8 @@ static void do_statfs(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
(void) nodeid;
(void) inarg;
- if (req->f->op.statfs)
- req->f->op.statfs(req, nodeid);
+ if (req->se->op.statfs)
+ req->se->op.statfs(req, nodeid);
else {
struct statvfs buf = {
.f_namemax = 255,
@@ -1525,8 +1525,8 @@ static void do_setxattr(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
char *name = PARAM(arg);
char *value = name + strlen(name) + 1;
- if (req->f->op.setxattr)
- req->f->op.setxattr(req, nodeid, name, value, arg->size,
+ if (req->se->op.setxattr)
+ req->se->op.setxattr(req, nodeid, name, value, arg->size,
arg->flags);
else
fuse_reply_err(req, ENOSYS);
@@ -1536,8 +1536,8 @@ static void do_getxattr(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
{
struct fuse_getxattr_in *arg = (struct fuse_getxattr_in *) inarg;
- if (req->f->op.getxattr)
- req->f->op.getxattr(req, nodeid, PARAM(arg), arg->size);
+ if (req->se->op.getxattr)
+ req->se->op.getxattr(req, nodeid, PARAM(arg), arg->size);
else
fuse_reply_err(req, ENOSYS);
}
@@ -1546,8 +1546,8 @@ static void do_listxattr(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
{
struct fuse_getxattr_in *arg = (struct fuse_getxattr_in *) inarg;
- if (req->f->op.listxattr)
- req->f->op.listxattr(req, nodeid, arg->size);
+ if (req->se->op.listxattr)
+ req->se->op.listxattr(req, nodeid, arg->size);
else
fuse_reply_err(req, ENOSYS);
}
@@ -1556,8 +1556,8 @@ static void do_removexattr(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
{
char *name = (char *) inarg;
- if (req->f->op.removexattr)
- req->f->op.removexattr(req, nodeid, name);
+ if (req->se->op.removexattr)
+ req->se->op.removexattr(req, nodeid, name);
else
fuse_reply_err(req, ENOSYS);
}
@@ -1587,8 +1587,8 @@ static void do_getlk(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
fi.lock_owner = arg->owner;
convert_fuse_file_lock(&arg->lk, &flock);
- if (req->f->op.getlk)
- req->f->op.getlk(req, nodeid, &fi, &flock);
+ if (req->se->op.getlk)
+ req->se->op.getlk(req, nodeid, &fi, &flock);
else
fuse_reply_err(req, ENOSYS);
}
@@ -1621,14 +1621,14 @@ static void do_setlk_common(fuse_req_t req, fuse_ino_t nodeid,
if (!sleep)
op |= LOCK_NB;
- if (req->f->op.flock)
- req->f->op.flock(req, nodeid, &fi, op);
+ if (req->se->op.flock)
+ req->se->op.flock(req, nodeid, &fi, op);
else
fuse_reply_err(req, ENOSYS);
} else {
convert_fuse_file_lock(&arg->lk, &flock);
- if (req->f->op.setlk)
- req->f->op.setlk(req, nodeid, &fi, &flock, sleep);
+ if (req->se->op.setlk)
+ req->se->op.setlk(req, nodeid, &fi, &flock, sleep);
else
fuse_reply_err(req, ENOSYS);
}
@@ -1686,7 +1686,7 @@ static int find_interrupted(struct fuse_session *f, struct fuse_req *req)
static void do_interrupt(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
{
struct fuse_interrupt_in *arg = (struct fuse_interrupt_in *) inarg;
- struct fuse_session *f = req->f;
+ struct fuse_session *f = req->se;
(void) nodeid;
if (f->debug)
@@ -1729,8 +1729,8 @@ static void do_bmap(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
{
struct fuse_bmap_in *arg = (struct fuse_bmap_in *) inarg;
- if (req->f->op.bmap)
- req->f->op.bmap(req, nodeid, arg->blocksize, arg->block);
+ if (req->se->op.bmap)
+ req->se->op.bmap(req, nodeid, arg->blocksize, arg->block);
else
fuse_reply_err(req, ENOSYS);
}
@@ -1743,7 +1743,7 @@ static void do_ioctl(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
struct fuse_file_info fi;
if (flags & FUSE_IOCTL_DIR &&
- !(req->f->conn.want & FUSE_CAP_IOCTL_DIR)) {
+ !(req->se->conn.want & FUSE_CAP_IOCTL_DIR)) {
fuse_reply_err(req, ENOTTY);
return;
}
@@ -1751,13 +1751,13 @@ static void do_ioctl(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
memset(&fi, 0, sizeof(fi));
fi.fh = arg->fh;
- if (sizeof(void *) == 4 && req->f->conn.proto_minor >= 16 &&
+ if (sizeof(void *) == 4 && req->se->conn.proto_minor >= 16 &&
!(flags & FUSE_IOCTL_32BIT)) {
req->ioctl_64bit = 1;
}
- if (req->f->op.ioctl)
- req->f->op.ioctl(req, nodeid, arg->cmd,
+ if (req->se->op.ioctl)
+ req->se->op.ioctl(req, nodeid, arg->cmd,
(void *)(uintptr_t)arg->arg, &fi, flags,
in_buf, arg->in_size, arg->out_size);
else
@@ -1778,7 +1778,7 @@ static void do_poll(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
fi.fh = arg->fh;
fi.poll_events = arg->events;
- if (req->f->op.poll) {
+ if (req->se->op.poll) {
struct fuse_pollhandle *ph = NULL;
if (arg->flags & FUSE_POLL_SCHEDULE_NOTIFY) {
@@ -1791,7 +1791,7 @@ static void do_poll(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
ph->se = req->se;
}
- req->f->op.poll(req, nodeid, &fi, ph);
+ req->se->op.poll(req, nodeid, &fi, ph);
} else {
fuse_reply_err(req, ENOSYS);
}
@@ -1805,8 +1805,8 @@ static void do_fallocate(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
memset(&fi, 0, sizeof(fi));
fi.fh = arg->fh;
- if (req->f->op.fallocate)
- req->f->op.fallocate(req, nodeid, arg->mode, arg->offset, arg->length, &fi);
+ if (req->se->op.fallocate)
+ req->se->op.fallocate(req, nodeid, arg->mode, arg->offset, arg->length, &fi);
else
fuse_reply_err(req, ENOSYS);
}
@@ -1815,7 +1815,7 @@ static void do_init(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
{
struct fuse_init_in *arg = (struct fuse_init_in *) inarg;
struct fuse_init_out outarg;
- struct fuse_session *f = req->f;
+ struct fuse_session *f = req->se;
size_t bufsize = f->bufsize;
size_t outargsize = sizeof(outarg);
@@ -1886,7 +1886,7 @@ static void do_init(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
f->conn.max_readahead = 0;
}
- if (req->f->conn.proto_minor >= 14) {
+ if (req->se->conn.proto_minor >= 14) {
#ifdef HAVE_SPLICE
#ifdef HAVE_VMSPLICE
f->conn.capable |= FUSE_CAP_SPLICE_WRITE | FUSE_CAP_SPLICE_MOVE;
@@ -1900,7 +1900,7 @@ static void do_init(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
f->conn.want |= FUSE_CAP_SPLICE_READ;
#endif
}
- if (req->f->conn.proto_minor >= 18)
+ if (req->se->conn.proto_minor >= 18)
f->conn.capable |= FUSE_CAP_IOCTL_DIR;
if (f->atomic_o_trunc)
@@ -2019,7 +2019,7 @@ static void do_init(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
static void do_destroy(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
{
- struct fuse_session *f = req->f;
+ struct fuse_session *f = req->se;
(void) nodeid;
(void) inarg;
@@ -2058,7 +2058,7 @@ static void list_init_nreq(struct fuse_notify_req *nreq)
static void do_notify_reply(fuse_req_t req, fuse_ino_t nodeid,
const void *inarg, const struct fuse_buf *buf)
{
- struct fuse_session *f = req->f;
+ struct fuse_session *f = req->se;
struct fuse_notify_req *nreq;
struct fuse_notify_req *head;
@@ -2241,7 +2241,7 @@ static void fuse_ll_retrieve_reply(struct fuse_notify_req *nreq,
const void *inarg,
const struct fuse_buf *ibuf)
{
- struct fuse_session *f = req->f;
+ struct fuse_session *f = req->se;
struct fuse_retrieve_req *rreq =
container_of(nreq, struct fuse_retrieve_req, nreq);
const struct fuse_notify_retrieve_in *arg = inarg;
@@ -2263,8 +2263,8 @@ static void fuse_ll_retrieve_reply(struct fuse_notify_req *nreq,
}
bufv.buf[0].size = arg->size;
- if (req->f->op.retrieve_reply) {
- req->f->op.retrieve_reply(req, rreq->cookie, ino,
+ if (req->se->op.retrieve_reply) {
+ req->se->op.retrieve_reply(req, rreq->cookie, ino,
arg->offset, &bufv);
} else {
fuse_reply_none(req);
@@ -2326,7 +2326,7 @@ int fuse_lowlevel_notify_retrieve(struct fuse_session *se, fuse_ino_t ino,
void *fuse_req_userdata(fuse_req_t req)
{
- return req->f->userdata;
+ return req->se->userdata;
}
const struct fuse_ctx *fuse_req_ctx(fuse_req_t req)
@@ -2338,10 +2338,10 @@ void fuse_req_interrupt_func(fuse_req_t req, fuse_interrupt_func_t func,
void *data)
{
pthread_mutex_lock(&req->lock);
- pthread_mutex_lock(&req->f->lock);
+ pthread_mutex_lock(&req->se->lock);
req->u.ni.func = func;
req->u.ni.data = data;
- pthread_mutex_unlock(&req->f->lock);
+ pthread_mutex_unlock(&req->se->lock);
if (req->interrupted && func)
func(req, data);
pthread_mutex_unlock(&req->lock);
@@ -2351,9 +2351,9 @@ int fuse_req_interrupted(fuse_req_t req)
{
int interrupted;
- pthread_mutex_lock(&req->f->lock);
+ pthread_mutex_lock(&req->se->lock);
interrupted = req->interrupted;
- pthread_mutex_unlock(&req->f->lock);
+ pthread_mutex_unlock(&req->se->lock);
return interrupted;
}