From: Kanchan Joshi <[email protected]>
To: [email protected], [email protected], [email protected], [email protected]
Cc: [email protected], [email protected],
[email protected], [email protected],
[email protected], [email protected],
[email protected], Kanchan Joshi <[email protected]>
Subject: [RFC PATCH 1/4] block: introduce async ioctl operation
Date: Wed, 27 Jan 2021 20:30:26 +0530 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
Add a new block-dev operation for async-ioctl.
Driver managing the block-dev can choose to implement it.
Signed-off-by: Kanchan Joshi <[email protected]>
---
include/linux/blkdev.h | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index f94ee3089e01..c9f6cc26d675 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -1848,6 +1848,16 @@ static inline void blk_ksm_unregister(struct request_queue *q) { }
#endif /* CONFIG_BLK_INLINE_ENCRYPTION */
+struct pt_ioctl_ctx {
+ /* submitter task context */
+ struct task_struct *task;
+ /* callback supplied by upper layer */
+ void (*pt_complete)(struct pt_ioctl_ctx *ptioc, long ret);
+ /* driver-allocated data */
+ void *ioc_data;
+ /* to schedule task-work */
+ struct callback_head pt_work;
+};
struct block_device_operations {
blk_qc_t (*submit_bio) (struct bio *bio);
@@ -1856,6 +1866,8 @@ struct block_device_operations {
int (*rw_page)(struct block_device *, sector_t, struct page *, unsigned int);
int (*ioctl) (struct block_device *, fmode_t, unsigned, unsigned long);
int (*compat_ioctl) (struct block_device *, fmode_t, unsigned, unsigned long);
+ int (*async_ioctl) (struct block_device *, fmode_t, unsigned, unsigned long,
+ struct pt_ioctl_ctx *);
unsigned int (*check_events) (struct gendisk *disk,
unsigned int clearing);
void (*unlock_native_capacity) (struct gendisk *);
--
2.25.1
next prev parent reply other threads:[~2021-01-27 16:10 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20210127150134epcas5p251fc1de3ff3581dd4c68b3fbe0b9dd91@epcas5p2.samsung.com>
2021-01-27 15:00 ` [RFC PATCH 0/4] Asynchronous passthrough ioctl Kanchan Joshi
[not found] ` <CGME20210127150140epcas5p32832cc0c0db953db199eb9dd326f2d4c@epcas5p3.samsung.com>
2021-01-27 15:00 ` Kanchan Joshi [this message]
[not found] ` <CGME20210127150144epcas5p29ccb35d7e7170aba7947b5ee16fd2db0@epcas5p2.samsung.com>
2021-01-27 15:00 ` [RFC PATCH 2/4] kernel: export task_work_add Kanchan Joshi
[not found] ` <CGME20210127150149epcas5p4fa8edd47712f28ccdd9bac5139fc6e61@epcas5p4.samsung.com>
2021-01-27 15:00 ` [RFC PATCH 3/4] nvme: add async ioctl support Kanchan Joshi
[not found] ` <CGME20210127150156epcas5p26cdf368e4ff6bffb132fa1c7f9430653@epcas5p2.samsung.com>
2021-01-27 15:00 ` [RFC PATCH 4/4] io_uring: add async passthrough " Kanchan Joshi
2021-01-27 15:42 ` [RFC PATCH 0/4] Asynchronous passthrough ioctl Pavel Begunkov
2021-01-27 15:53 ` Pavel Begunkov
2021-01-28 12:04 ` Kanchan Joshi
2021-01-28 14:38 ` Jens Axboe
2021-01-28 17:13 ` Kanchan Joshi
2021-01-28 17:24 ` Jens Axboe
2021-02-22 13:42 ` Kanchan Joshi
2021-02-22 14:33 ` Jens Axboe
2021-02-23 4:41 ` Kanchan Joshi
2021-01-28 14:50 ` Jens Axboe
2021-01-28 17:25 ` Kanchan Joshi
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] \
[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