From: Bernd Schubert <bschubert@ddn.com>
To: linux-fsdevel@vger.kernel.org
Cc: bernd.schubert@fastmail.fm, miklos@szeredi.hu, dsingh@ddn.com,
Bernd Schubert <bschubert@ddn.com>, Hao Xu <howeyxu@tencent.com>
Subject: [PATCH 4/6] fuse: Rename fuse_direct_io
Date: Tue, 29 Aug 2023 18:11:14 +0200 [thread overview]
Message-ID: <20230829161116.2914040-5-bschubert@ddn.com> (raw)
In-Reply-To: <20230829161116.2914040-1-bschubert@ddn.com>
Just to avoid confusion with fuse_direct_IO.
Cc: Hao Xu <howeyxu@tencent.com>
Cc: Miklos Szeredi <miklos@szeredi.hu>
Cc: Dharmendra Singh <dsingh@ddn.com>
Cc: linux-fsdevel@vger.kernel.org
Signed-off-by: Bernd Schubert <bschubert@ddn.com>
---
fs/fuse/cuse.c | 5 ++---
fs/fuse/dax.c | 2 +-
fs/fuse/file.c | 14 +++++++-------
fs/fuse/fuse_i.h | 8 ++++----
4 files changed, 14 insertions(+), 15 deletions(-)
diff --git a/fs/fuse/cuse.c b/fs/fuse/cuse.c
index 91e89e68177e..c267ae9dcba6 100644
--- a/fs/fuse/cuse.c
+++ b/fs/fuse/cuse.c
@@ -96,7 +96,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_send_dio(&io, to, &pos, FUSE_DIO_CUSE);
}
static ssize_t cuse_write_iter(struct kiocb *kiocb, struct iov_iter *from)
@@ -107,8 +107,7 @@ 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_send_dio(&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 8e74f278a3f6..423e40ab3e31 100644
--- a/fs/fuse/dax.c
+++ b/fs/fuse/dax.c
@@ -731,7 +731,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_send_dio(&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 a6b99bc80fe7..f9d21804d313 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -1467,8 +1467,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_send_dio(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;
@@ -1569,7 +1569,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_send_dio);
static ssize_t __fuse_direct_read(struct fuse_io_priv *io,
struct iov_iter *iter,
@@ -1578,7 +1578,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_send_dio(io, iter, ppos, 0);
fuse_invalidate_atime(inode);
@@ -1635,8 +1635,8 @@ static ssize_t fuse_direct_write_iter(struct kiocb *iocb, struct iov_iter *from)
if (!is_sync_kiocb(iocb) && iocb->ki_flags & IOCB_DIRECT) {
res = fuse_direct_IO(iocb, from);
} else {
- res = fuse_direct_io(&io, from, &iocb->ki_pos,
- FUSE_DIO_WRITE);
+ res = fuse_send_dio(&io, from, &iocb->ki_pos,
+ FUSE_DIO_WRITE);
fuse_write_update_attr(inode, iocb->ki_pos, res);
}
}
@@ -2972,7 +2972,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_send_dio(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 bf0b85d0b95c..05c5cae59bad 100644
--- a/fs/fuse/fuse_i.h
+++ b/fs/fuse/fuse_i.h
@@ -1247,17 +1247,17 @@ int fuse_do_open(struct fuse_mount *fm, u64 nodeid, struct file *file,
bool isdir);
/**
- * fuse_direct_io() flags
+ * fuse_send_dio() 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_send_dio() 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_send_dio(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,
--
2.39.2
next prev parent reply other threads:[~2023-08-29 16:12 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-29 16:11 [PATCH 0/5 v3] fuse direct write consolidation and parallel IO Bernd Schubert
2023-08-29 16:11 ` [PATCH 1/6] fuse: direct IO can use the write-through code path Bernd Schubert
2023-08-29 16:11 ` [PATCH 2/6] fuse: Create helper function if DIO write needs exclusive lock Bernd Schubert
2023-08-30 10:57 ` Miklos Szeredi
2023-08-30 12:13 ` Bernd Schubert
2023-08-30 12:14 ` Miklos Szeredi
2023-08-29 16:11 ` [PATCH 3/6] fuse: Allow parallel direct writes for O_DIRECT Bernd Schubert
2023-08-30 13:28 ` Miklos Szeredi
2023-08-30 14:38 ` Bernd Schubert
2023-08-30 14:50 ` Miklos Szeredi
2023-08-31 8:30 ` Hao Xu
2023-08-31 8:33 ` Bernd Schubert
2023-08-29 16:11 ` Bernd Schubert [this message]
2023-08-29 16:11 ` [PATCH 5/6] fuse: Remove fuse_direct_write_iter code path / use IOCB_DIRECT Bernd Schubert
2023-08-31 9:19 ` Hao Xu
2023-08-31 9:34 ` Bernd Schubert
2023-09-01 2:54 ` Hao Xu
2023-08-29 16:11 ` [PATCH 6/6] fuse: Remove page flush/invaliation in fuse_direct_io Bernd Schubert
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=20230829161116.2914040-5-bschubert@ddn.com \
--to=bschubert@ddn.com \
--cc=bernd.schubert@fastmail.fm \
--cc=dsingh@ddn.com \
--cc=howeyxu@tencent.com \
--cc=linux-fsdevel@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.