From: Luis Henriques <luis@igalia.com>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: fuse-devel@lists.linux.dev, linux-kernel@vger.kernel.org,
Luis Henriques <luis@igalia.com>
Subject: [PATCH] fuse: rename fuse_direct_io() to fuse_sync_direct_io()
Date: Fri, 4 Sep 2026 14:18:38 +0100 [thread overview]
Message-ID: <20260904131838.15365-1-luis@igalia.com> (raw)
FUSE has two functions with very similar name: fuse_direct_io() and
fuse_direct_IO(). Which is very confusing. Rename one of them to remove
the ambiguity.
Signed-off-by: Luis Henriques <luis@igalia.com>
---
Hi!
Maybe fuse_sync_direct_io() isn't the best name either, but at least it'll
stop confusing me (and etags).
fs/fuse/cuse.c | 6 +++---
fs/fuse/dax.c | 2 +-
fs/fuse/file.c | 14 +++++++-------
fs/fuse/fuse_i.h | 8 ++++----
4 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/fs/fuse/cuse.c b/fs/fuse/cuse.c
index 4079cf8e5974..01f61fc8e354 100644
--- a/fs/fuse/cuse.c
+++ b/fs/fuse/cuse.c
@@ -98,7 +98,7 @@ static ssize_t cuse_read_iter(struct kiocb *kiocb, struct iov_iter *to)
struct fuse_io_priv io = FUSE_IO_PRIV_SYNC(kiocb);
loff_t pos = 0;
- return fuse_direct_io(&io, to, &pos, FUSE_DIO_CUSE);
+ return fuse_sync_direct_io(&io, to, &pos, FUSE_DIO_CUSE);
}
static ssize_t cuse_write_iter(struct kiocb *kiocb, struct iov_iter *from)
@@ -109,8 +109,8 @@ static ssize_t cuse_write_iter(struct kiocb *kiocb, struct iov_iter *from)
* No locking or generic_write_checks(), the server is
* responsible for locking and sanity checks.
*/
- return fuse_direct_io(&io, from, &pos,
- FUSE_DIO_WRITE | FUSE_DIO_CUSE);
+ return fuse_sync_direct_io(&io, from, &pos,
+ FUSE_DIO_WRITE | FUSE_DIO_CUSE);
}
static int cuse_open(struct inode *inode, struct file *file)
diff --git a/fs/fuse/dax.c b/fs/fuse/dax.c
index 85cdf0199bc0..86e308960b24 100644
--- a/fs/fuse/dax.c
+++ b/fs/fuse/dax.c
@@ -709,7 +709,7 @@ static ssize_t fuse_dax_direct_write(struct kiocb *iocb, struct iov_iter *from)
struct fuse_io_priv io = FUSE_IO_PRIV_SYNC(iocb);
ssize_t ret;
- ret = fuse_direct_io(&io, from, &iocb->ki_pos, FUSE_DIO_WRITE);
+ ret = fuse_sync_direct_io(&io, from, &iocb->ki_pos, FUSE_DIO_WRITE);
fuse_write_update_attr(inode, iocb->ki_pos, ret);
return ret;
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index 8d6135a6108a..bbdbc2dc3a07 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -1654,8 +1654,8 @@ static int fuse_get_user_pages(struct fuse_args_pages *ap, struct iov_iter *ii,
return ret < 0 ? ret : 0;
}
-ssize_t fuse_direct_io(struct fuse_io_priv *io, struct iov_iter *iter,
- loff_t *ppos, int flags)
+ssize_t fuse_sync_direct_io(struct fuse_io_priv *io, struct iov_iter *iter,
+ loff_t *ppos, int flags)
{
int write = flags & FUSE_DIO_WRITE;
int cuse = flags & FUSE_DIO_CUSE;
@@ -1756,7 +1756,7 @@ ssize_t fuse_direct_io(struct fuse_io_priv *io, struct iov_iter *iter,
return res > 0 ? res : err;
}
-EXPORT_SYMBOL_GPL(fuse_direct_io);
+EXPORT_SYMBOL_GPL(fuse_sync_direct_io);
static ssize_t __fuse_direct_read(struct fuse_io_priv *io,
struct iov_iter *iter,
@@ -1765,7 +1765,7 @@ static ssize_t __fuse_direct_read(struct fuse_io_priv *io,
ssize_t res;
struct inode *inode = file_inode(io->iocb->ki_filp);
- res = fuse_direct_io(io, iter, ppos, 0);
+ res = fuse_sync_direct_io(io, iter, ppos, 0);
fuse_invalidate_atime(inode);
@@ -1807,8 +1807,8 @@ static ssize_t fuse_direct_write_iter(struct kiocb *iocb, struct iov_iter *from)
} else {
struct fuse_io_priv io = FUSE_IO_PRIV_SYNC(iocb);
- res = fuse_direct_io(&io, from, &iocb->ki_pos,
- FUSE_DIO_WRITE);
+ res = fuse_sync_direct_io(&io, from, &iocb->ki_pos,
+ FUSE_DIO_WRITE);
fuse_write_update_attr(inode, iocb->ki_pos, res);
}
if (res > 0 && mapping->nrpages) {
@@ -2788,7 +2788,7 @@ fuse_direct_IO(struct kiocb *iocb, struct iov_iter *iter)
}
if (iov_iter_rw(iter) == WRITE) {
- ret = fuse_direct_io(io, iter, &pos, FUSE_DIO_WRITE);
+ ret = fuse_sync_direct_io(io, iter, &pos, FUSE_DIO_WRITE);
fuse_invalidate_attr_mask(inode, FUSE_STATX_MODSIZE);
} else {
ret = __fuse_direct_read(io, iter, &pos);
diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h
index c8d4c5f3af7e..f892f60d3d22 100644
--- a/fs/fuse/fuse_i.h
+++ b/fs/fuse/fuse_i.h
@@ -1167,17 +1167,17 @@ int fuse_do_open(struct fuse_mount *fm, u64 nodeid, struct file *file,
bool isdir);
/*
- * fuse_direct_io() flags
+ * fuse_sync_direct_io() flags
*/
/** If set, it is WRITE; otherwise - READ */
#define FUSE_DIO_WRITE (1 << 0)
-/** CUSE pass fuse_direct_io() a file which f_mapping->host is not from FUSE */
+/** CUSE pass fuse_sync_direct_io() a file which f_mapping->host is not from FUSE */
#define FUSE_DIO_CUSE (1 << 1)
-ssize_t fuse_direct_io(struct fuse_io_priv *io, struct iov_iter *iter,
- loff_t *ppos, int flags);
+ssize_t fuse_sync_direct_io(struct fuse_io_priv *io, struct iov_iter *iter,
+ loff_t *ppos, int flags);
long fuse_do_ioctl(struct file *file, unsigned int cmd, unsigned long arg,
unsigned int flags);
long fuse_ioctl_common(struct file *file, unsigned int cmd,
next reply other threads:[~2026-09-04 13:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-04 13:18 Luis Henriques [this message]
2026-10-15 12:08 ` [PATCH] fuse: rename fuse_direct_io() to fuse_sync_direct_io() Miklos Szeredi
2026-10-15 17:23 ` Luis Henriques
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260904131838.15365-1-luis@igalia.com \
--to=luis@igalia.com \
--cc=fuse-devel@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.