public inbox for [email protected]
 help / color / mirror / Atom feed
* [PATCH v2 0/7] implement async block discards/etc. via io_uring
@ 2024-08-22  3:35 Pavel Begunkov
  2024-08-22  3:35 ` [PATCH v2 1/7] io_uring/cmd: expose iowq to cmds Pavel Begunkov
                   ` (6 more replies)
  0 siblings, 7 replies; 20+ messages in thread
From: Pavel Begunkov @ 2024-08-22  3:35 UTC (permalink / raw)
  To: io-uring; +Cc: Jens Axboe, asml.silence, Conrad Meyer, linux-block, linux-mm

There is an interest in having asynchronous block operations like
discard and write zeroes. The series implements that as io_uring commands,
which is an io_uring request type allowing to implement custom file
specific operations.

First 4 patches are simple preps, patches 5-7 implement support for
discards, write zeroes and secure erases correspondingly.
While the two latter commands use the same code path, discards only
reuses common callbacks and not bio allocation loop because of
differences in how the range is sliced into bios, see granularity
handling in bio_discard_limit().

Note that there are differences with ioctl() versions, these are
asynchronous and looser on synchronisation with page cache allowing
more races, see comments to patch 5.

liburing tests:

https://github.com/isilence/liburing.git discard-cmd-test

Pavel Begunkov (7):
  io_uring/cmd: expose iowq to cmds
  io_uring/cmd: give inline space in request to cmds
  filemap: introduce filemap_invalidate_pages
  block: introduce blk_validate_write()
  block: implement async discard as io_uring cmd
  block: implement async wire write zeroes
  block: implement async secure erase

 block/blk.h                  |   1 +
 block/fops.c                 |   2 +
 block/ioctl.c                | 231 ++++++++++++++++++++++++++++++++---
 include/linux/blkdev.h       |   4 +
 include/linux/io_uring/cmd.h |  15 +++
 include/linux/pagemap.h      |   2 +
 include/uapi/linux/fs.h      |   4 +
 io_uring/io_uring.c          |  11 ++
 io_uring/io_uring.h          |   1 +
 io_uring/uring_cmd.c         |   7 ++
 mm/filemap.c                 |  18 ++-
 11 files changed, 273 insertions(+), 23 deletions(-)


base-commit: 15dadb5430367959a455818fef80350a68c010f4
-- 
2.45.2


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2024-09-04 14:08 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-22  3:35 [PATCH v2 0/7] implement async block discards/etc. via io_uring Pavel Begunkov
2024-08-22  3:35 ` [PATCH v2 1/7] io_uring/cmd: expose iowq to cmds Pavel Begunkov
2024-08-22  3:35 ` [PATCH v2 2/7] io_uring/cmd: give inline space in request " Pavel Begunkov
2024-08-22  3:35 ` [PATCH v2 3/7] filemap: introduce filemap_invalidate_pages Pavel Begunkov
2024-08-22  6:37   ` Christoph Hellwig
2024-08-22  3:35 ` [PATCH v2 4/7] block: introduce blk_validate_write() Pavel Begunkov
2024-08-22  6:33   ` Christoph Hellwig
2024-08-22 12:36     ` Pavel Begunkov
2024-08-23 11:52       ` Christoph Hellwig
2024-08-22  3:35 ` [PATCH v2 5/7] block: implement async discard as io_uring cmd Pavel Begunkov
2024-08-22  6:46   ` Christoph Hellwig
2024-08-22 13:07     ` Pavel Begunkov
2024-08-23 11:59       ` Christoph Hellwig
2024-09-04 14:08         ` Pavel Begunkov
2024-08-22  3:35 ` [PATCH v2 6/7] block: implement async wire write zeroes Pavel Begunkov
2024-08-22  6:50   ` Christoph Hellwig
2024-08-22 13:09     ` Pavel Begunkov
2024-08-22  3:35 ` [PATCH v2 7/7] block: implement async secure erase Pavel Begunkov
2024-08-22  6:36   ` Christoph Hellwig
2024-08-22 12:36     ` Pavel Begunkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox