From: Jens Axboe <[email protected]>
To: "Matthew Wilcox (Oracle)" <[email protected]>
Cc: [email protected], [email protected],
[email protected], [email protected],
[email protected], Kanchan Joshi <[email protected]>,
Javier Gonzalez <[email protected]>
Subject: Re: [PATCH 2/2] fs: Remove kiocb->ki_complete
Date: Wed, 8 Jul 2020 16:38:51 -0600 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
On 7/8/20 4:26 PM, Matthew Wilcox (Oracle) wrote:
> @@ -341,12 +343,25 @@ struct kiocb {
> randomized_struct_fields_end
> };
>
> +static inline int kiocb_completion_id(struct kiocb *kiocb)
> +{
> + return kiocb->ki_flags >> _IOCB_COMPLETION_SHIFT;
> +}
> +
> +static inline void kiocb_set_completion(struct kiocb *kiocb, int id)
> +{
> + kiocb->ki_flags = (kiocb->ki_flags & (~IOCB_COMPLETION_FNS)) |
> + (id << _IOCB_COMPLETION_SHIFT);
> +}
> +
> static inline bool is_sync_kiocb(struct kiocb *kiocb)
> {
> - return kiocb->ki_complete == NULL;
> + return kiocb_completion_id(kiocb) == 0;
> }
>
> void complete_kiocb(struct kiocb *kiocb, long ret, long ret2);
> +int register_kiocb_completion(void (*)(struct kiocb *, long, long));
> +void unregister_kiocb_completion(int id);
Same here, you seem to mix and match whether you prefix with kiocb or
not. Why not make them all kiocb_*?
kiocb_register_completion() and so forth.
--
Jens Axboe
next prev parent reply other threads:[~2020-07-08 22:39 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-08 22:26 [PATCH 0/2] Remove kiocb ki_complete Matthew Wilcox (Oracle)
2020-07-08 22:26 ` [PATCH 1/2] fs: Abstract calling the kiocb completion function Matthew Wilcox (Oracle)
2020-07-08 22:37 ` Jens Axboe
2020-07-08 22:40 ` Matthew Wilcox
2020-07-08 22:50 ` Jens Axboe
2020-07-08 22:26 ` [PATCH 2/2] fs: Remove kiocb->ki_complete Matthew Wilcox (Oracle)
2020-07-08 22:38 ` Jens Axboe [this message]
2020-07-09 3:25 ` Jens Axboe
2020-07-09 5:23 ` kernel test robot
2020-07-08 22:33 ` [PATCH 0/2] Remove kiocb ki_complete Jens Axboe
2020-07-09 10:17 ` Christoph Hellwig
2020-07-09 11:10 ` Matthew Wilcox
2020-07-09 13:26 ` Christoph Hellwig
2020-07-09 13:32 ` Matthew Wilcox
2020-07-09 13:53 ` Jens Axboe
2020-07-09 13:37 ` Pavel Begunkov
2020-07-09 13:43 ` Matthew Wilcox
2020-07-09 13:49 ` Pavel Begunkov
2020-07-09 13:53 ` Matthew Wilcox
2020-07-09 13:59 ` Pavel Begunkov
2020-07-09 13:55 ` Jens Axboe
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 \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox