From: Luis Henriques <luis@igalia.com>
To: Bernd Schubert <bschubert@ddn.com>
Cc: Miklos Szeredi <miklos@szeredi.hu>, Jens Axboe <axboe@kernel.dk>,
Pavel Begunkov <asml.silence@gmail.com>,
linux-fsdevel@vger.kernel.org, io-uring@vger.kernel.org,
Joanne Koong <joannelkoong@gmail.com>,
Josef Bacik <josef@toxicpanda.com>,
Amir Goldstein <amir73il@gmail.com>,
Ming Lei <tom.leiming@gmail.com>, David Wei <dw@davidwei.uk>,
bernd@bsbernd.com
Subject: Re: [PATCH v10 09/17] fuse: {io-uring} Make hash-list req unique finding functions non-static
Date: Wed, 22 Jan 2025 15:56:10 +0000 [thread overview]
Message-ID: <87y0z2etb9.fsf@igalia.com> (raw)
In-Reply-To: <20250120-fuse-uring-for-6-10-rfc4-v10-9-ca7c5d1007c0@ddn.com> (Bernd Schubert's message of "Mon, 20 Jan 2025 02:29:02 +0100")
On Mon, Jan 20 2025, Bernd Schubert wrote:
> fuse-over-io-uring uses existing functions to find requests based
> on their unique id - make these functions non-static.
>
Single comment below.
> Signed-off-by: Bernd Schubert <bschubert@ddn.com>
> Reviewed-by: Joanne Koong <joannelkoong@gmail.com>
> ---
> fs/fuse/dev.c | 6 +++---
> fs/fuse/fuse_dev_i.h | 6 ++++++
> fs/fuse/fuse_i.h | 5 +++++
> fs/fuse/inode.c | 2 +-
> 4 files changed, 15 insertions(+), 4 deletions(-)
>
> diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
> index 8b03a540e151daa1f62986aa79030e9e7a456059..aa33eba51c51dff6af2cdcf60bed9c3f6b4bc0d0 100644
> --- a/fs/fuse/dev.c
> +++ b/fs/fuse/dev.c
> @@ -220,7 +220,7 @@ u64 fuse_get_unique(struct fuse_iqueue *fiq)
> }
> EXPORT_SYMBOL_GPL(fuse_get_unique);
>
> -static unsigned int fuse_req_hash(u64 unique)
> +unsigned int fuse_req_hash(u64 unique)
> {
> return hash_long(unique & ~FUSE_INT_REQ_BIT, FUSE_PQ_HASH_BITS);
> }
> @@ -1910,7 +1910,7 @@ static int fuse_notify(struct fuse_conn *fc, enum fuse_notify_code code,
> }
>
> /* Look up request on processing list by unique ID */
> -static struct fuse_req *request_find(struct fuse_pqueue *fpq, u64 unique)
> +struct fuse_req *fuse_request_find(struct fuse_pqueue *fpq, u64 unique)
> {
> unsigned int hash = fuse_req_hash(unique);
> struct fuse_req *req;
> @@ -1994,7 +1994,7 @@ static ssize_t fuse_dev_do_write(struct fuse_dev *fud,
> spin_lock(&fpq->lock);
> req = NULL;
> if (fpq->connected)
> - req = request_find(fpq, oh.unique & ~FUSE_INT_REQ_BIT);
> + req = fuse_request_find(fpq, oh.unique & ~FUSE_INT_REQ_BIT);
>
> err = -ENOENT;
> if (!req) {
> diff --git a/fs/fuse/fuse_dev_i.h b/fs/fuse/fuse_dev_i.h
> index 4a8a4feb2df53fb84938a6711e6bcfd0f1b9f615..599a61536f8c85b3631b8584247a917bda92e719 100644
> --- a/fs/fuse/fuse_dev_i.h
> +++ b/fs/fuse/fuse_dev_i.h
> @@ -7,6 +7,7 @@
> #define _FS_FUSE_DEV_I_H
>
> #include <linux/types.h>
> +#include <linux/fs.h>
Looking at these changes, it seems like this extra include isn't really
necessary. Is it a leftover from older revs?
Cheers,
--
Luís
>
> /* Ordinary requests have even IDs, while interrupts IDs are odd */
> #define FUSE_INT_REQ_BIT (1ULL << 0)
> @@ -14,6 +15,8 @@
>
> struct fuse_arg;
> struct fuse_args;
> +struct fuse_pqueue;
> +struct fuse_req;
>
> struct fuse_copy_state {
> int write;
> @@ -42,6 +45,9 @@ static inline struct fuse_dev *fuse_get_dev(struct file *file)
> return READ_ONCE(file->private_data);
> }
>
> +unsigned int fuse_req_hash(u64 unique);
> +struct fuse_req *fuse_request_find(struct fuse_pqueue *fpq, u64 unique);
> +
> void fuse_dev_end_requests(struct list_head *head);
>
> void fuse_copy_init(struct fuse_copy_state *cs, int write,
> diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h
> index d75dd9b59a5c35b76919db760645464f604517f5..e545b0864dd51e82df61cc39bdf65d3d36a418dc 100644
> --- a/fs/fuse/fuse_i.h
> +++ b/fs/fuse/fuse_i.h
> @@ -1237,6 +1237,11 @@ void fuse_change_entry_timeout(struct dentry *entry, struct fuse_entry_out *o);
> */
> struct fuse_conn *fuse_conn_get(struct fuse_conn *fc);
>
> +/**
> + * Initialize the fuse processing queue
> + */
> +void fuse_pqueue_init(struct fuse_pqueue *fpq);
> +
> /**
> * Initialize fuse_conn
> */
> diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
> index e4f9bbacfc1bc6f51d5d01b4c47b42cc159ed783..328797b9aac9a816a4ad2c69b6880dc6ef6222b0 100644
> --- a/fs/fuse/inode.c
> +++ b/fs/fuse/inode.c
> @@ -938,7 +938,7 @@ static void fuse_iqueue_init(struct fuse_iqueue *fiq,
> fiq->priv = priv;
> }
>
> -static void fuse_pqueue_init(struct fuse_pqueue *fpq)
> +void fuse_pqueue_init(struct fuse_pqueue *fpq)
> {
> unsigned int i;
>
>
> --
> 2.43.0
>
next prev parent reply other threads:[~2025-01-22 15:56 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-20 1:28 [PATCH v10 00/17] fuse: fuse-over-io-uring Bernd Schubert
2025-01-20 1:28 ` [PATCH v10 01/17] fuse: rename to fuse_dev_end_requests and make non-static Bernd Schubert
2025-01-20 1:28 ` [PATCH v10 02/17] fuse: Move fuse_get_dev to header file Bernd Schubert
2025-01-20 1:28 ` [PATCH v10 03/17] fuse: Move request bits Bernd Schubert
2025-01-20 1:28 ` [PATCH v10 04/17] fuse: Add fuse-io-uring design documentation Bernd Schubert
2025-01-20 1:28 ` [PATCH v10 05/17] fuse: make args->in_args[0] to be always the header Bernd Schubert
2025-01-20 1:28 ` [PATCH v10 06/17] fuse: {io-uring} Handle SQEs - register commands Bernd Schubert
2025-01-22 15:56 ` Luis Henriques
2025-01-23 13:17 ` Bernd Schubert
2025-01-20 1:29 ` [PATCH v10 07/17] fuse: Make fuse_copy non static Bernd Schubert
2025-01-20 1:29 ` [PATCH v10 08/17] fuse: Add fuse-io-uring handling into fuse_copy Bernd Schubert
2025-01-20 1:29 ` [PATCH v10 09/17] fuse: {io-uring} Make hash-list req unique finding functions non-static Bernd Schubert
2025-01-22 15:56 ` Luis Henriques [this message]
2025-01-23 13:24 ` Bernd Schubert
2025-01-20 1:29 ` [PATCH v10 10/17] fuse: Add io-uring sqe commit and fetch support Bernd Schubert
2025-01-22 15:56 ` Luis Henriques
2025-01-23 13:32 ` Bernd Schubert
2025-01-20 1:29 ` [PATCH v10 11/17] fuse: {io-uring} Handle teardown of ring entries Bernd Schubert
2025-01-20 1:29 ` [PATCH v10 12/17] fuse: {io-uring} Make fuse_dev_queue_{interrupt,forget} non-static Bernd Schubert
2025-01-20 1:29 ` [PATCH v10 13/17] fuse: Allow to queue fg requests through io-uring Bernd Schubert
2025-01-20 1:29 ` [PATCH v10 14/17] fuse: Allow to queue bg " Bernd Schubert
2025-01-20 1:29 ` [PATCH v10 15/17] fuse: {io-uring} Prevent mount point hang on fuse-server termination Bernd Schubert
2025-01-20 1:29 ` [PATCH v10 16/17] fuse: block request allocation until io-uring init is complete Bernd Schubert
2025-01-20 1:29 ` [PATCH v10 17/17] fuse: enable fuse-over-io-uring 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=87y0z2etb9.fsf@igalia.com \
--to=luis@igalia.com \
--cc=amir73il@gmail.com \
--cc=asml.silence@gmail.com \
--cc=axboe@kernel.dk \
--cc=bernd@bsbernd.com \
--cc=bschubert@ddn.com \
--cc=dw@davidwei.uk \
--cc=io-uring@vger.kernel.org \
--cc=joannelkoong@gmail.com \
--cc=josef@toxicpanda.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=tom.leiming@gmail.com \
/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.